public function toArray()
{
$href = $this->getHref();
if (empty($href)) {
return array();
}
$link = array('href' => $href);
if ($this->getTitle()) {
$link['title'] = $this->getTitle();
}
if ($this->getTitle()) {
$link['title'] = $this->getTitle();
}
if ($this->getName()) {
$link['name'] = $this->getName();
}
if ($this->getHreflang()) {
$link['hreflang'] = $this->getHreflang();
}
if ($this->getTemplated()) {
$link['templated'] = $this->getTemplated();
}
return $link;
}