Pheasant\Relationship::getter PHP Method

getter() public method

delegate double dispatch calls to type
public getter ( $key, $cache = null )
    public function getter($key, $cache = null)
    {
        $rel = $this;
        return function ($object) use($key, $rel, $cache) {
            return $rel->get($object, $key, $cache);
        };
    }