FOF30\Hal\Render\Json::_getLink PHP Метод

    protected function _getLink(Link $link)
    {
        $ret = array('href' => $link->href);
        if ($link->templated) {
            $ret['templated'] = 'true';
        }
        if ($link->name) {
            $ret['name'] = $link->name;
        }
        if ($link->hreflang) {
            $ret['hreflang'] = $link->hreflang;
        }
        if ($link->title) {
            $ret['title'] = $link->title;
        }
        return (object) $ret;
    }