public function getHtml()
{
$attributes = ["rel", "tabindex", "accesskey", "title", "target", "class"];
$attribs = [];
foreach ($attributes as $a) {
if ($this->{$a}) {
$attribs[] = $a . '="' . $this->{$a} . '"';
}
}
if ($this->getAttributes()) {
$attribs[] = $this->getAttributes();
}
if (empty($this->text)) {
return "";
}
return '<a href="' . $this->getHref() . '" ' . implode(" ", $attribs) . '>' . htmlspecialchars($this->getText()) . '</a>';
}