public function getRelation($key)
    {
        $relation = new AVRelation($this, $key);
        if (isset($this->estimatedData[$key]))
        {
            $object = $this->estimatedData[$key];
            if ($object instanceof AVRelation)
            {
                $relation->setTargetClass($object->getTargetClass());
            }
        }

        return $relation;
    }
public function getRelation($key)
    {
        $relation = new AVRelation($this, $key);
        if (isset($this->estimatedData[$key]))
        {
            $object = $this->estimatedData[$key];
            if ($object instanceof AVRelation)
            {
                $relation->setTargetClass($object->getTargetClass());
            }
        }

        return $relation;
    }
public function getRelation ( $ key ) { $ relation = new AVRelation ( $ this , $ key ) ; if ( isset ( $ this -> estimatedData [ $ key ] ) ) { $ object = $ this -> estimatedData [ $ key ] ; if ( $ object instanceof AVRelation ) { $ relation -> setTargetClass ( $ object -> getTargetClass ( ) ) ; } } return $ relation ; }
Access or create a Relation value for a key.

@param string $key The key to access the relation for.
@return AVRelation The AVRelation object if the relation already
exists for the key or can be created for this key.
Access or create a Relation value for a key .