Source for file a.php
Documentation is available at a.php
* Outputs a html <a> tag
* * href : the target URI where the link must point
* * rest : any other attributes you want to add to the tag can be added as named parameters
* {* Create a simple link out of an url variable and add a special class attribute: *}
* {a $url class="external" /}
* {* Mark a link as active depending on some other variable : *}
* {a $link.url class=tif($link.active "active"); $link.title /}
* {* This is similar to: <a href="{$link.url}" class="{if $link.active}active{/if}">{$link.title}</a> *}
* This software is provided 'as-is', without any express or implied warranty.
* In no event will the authors be held liable for any damages arising from the use of this software.
* @author Jordi Boggiano <j.boggiano@seld.be>
* @copyright Copyright (c) 2008, Jordi Boggiano
* @license http://dwoo.org/LICENSE Modified BSD License
public function init($href, array $rest=
array())
public static function preProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $type)
$p =
$compiler->getCompiledParams($params);
public static function postProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $content)
$p =
$compiler->getCompiledParams($params);
// no content was provided so use the url as display text
// merge </a> into the href if href is a string
if (substr($p['href'], -
1) ===
'"' ||
substr($p['href'], -
1) ===
'\'') {
return $content .
'</a>';
Documentation generated on Sun, 07 Feb 2010 17:53:06 +0000 by phpDocumentor 1.4.0