public function getLink($rel) { foreach ($this->links as $link) { if ($link->getRel() == $rel) { return $link->getHref(); } } return null; }