Generates an HTML anchor tag, linking to this resource.
If no text is given, then the URI also uses as the link text.
string $text Text for the link.:
array $options Associative array of attributes for the anchor tag:
string The HTML link string
public function htmlLink($text = null, $options = array()) {
$options = array_merge(array(
'href' => $this->uri,
), $options);
if ($text === null) {
$text = $this->uri;
}
$html = "<a";
foreach ($options as $key => $value) {
$html .= " " . htmlspecialchars($key) . "=\"" . htmlspecialchars($value) . "\"";
}
$html .= ">" . htmlspecialchars($text) . "</a>";
return $html;
}