diff --git a/src/HtmlBuilder.php b/src/HtmlBuilder.php index 44954d3..1e9f797 100755 --- a/src/HtmlBuilder.php +++ b/src/HtmlBuilder.php @@ -96,6 +96,25 @@ class HtmlBuilder { return 'attributes($attributes).'>'; } + + /** + * Generate a link to a Favicon file. + * + * @param string $url + * @param array $attributes + * @param bool $secure + * @return string + */ + public function favicon($url, $attributes = array(), $secure = null) + { + $defaults = array('rel' => 'shortcut icon', 'type' => 'image/x-icon'); + + $attributes = $attributes + $defaults; + + $attributes['href'] = $this->url->asset($url, $secure); + + return 'attributes($attributes).'>'.PHP_EOL; + } /** * Generate a HTML link.