]> dev.renevier.net Git - syj.git/blob - application/views/helpers/Anchor.php
update copyright headers
[syj.git] / application / views / helpers / Anchor.php
1 <?php
2 /*  This file is part of Syj, Copyright (c) 2010-2011 Arnaud Renevier,
3     and is published under the AGPL license. */
4
5 class Syj_View_Helper_Anchor extends Zend_View_Helper_HtmlElement
6 {
7     public function Anchor($href, $text = null, array $attribs=array(), $escape = true) {
8         $attribs = array_merge(array('href' => $href), $attribs);
9         if (!isset($text)) {
10             $text = $href;
11         }
12         $content = $escape ? $this->view->escape($text) : $text;
13         $html = '<a' . $this->_htmlAttribs($attribs) . '>' . $content . '</a>';
14         return $html;
15     }
16 }
17