lithium\data\model\Relationship::get PHP Method

get() public method

Gets a related object (or objects) for the given object connected to it by this relationship.
public get ( object $object, array $options = [] ) : object
$object object The object to get the related data for.
$options array Additional options to merge into the query to be performed, where applicable.
return object Returns the object(s) for this relationship.
    public function get($object, array $options = array())
    {
        $link = $this->link();
        $strategies = $this->_strategies();
        if (!isset($strategies[$link]) || !is_callable($strategies[$link])) {
            $msg = "Attempted to get object for invalid relationship link type `{$link}`.";
            throw new ConfigException($msg);
        }
        return $strategies[$link]($object, $this, $options);
    }