Please explain in detail of registerTag function.
What does it register??
for example: if I add new tag <he>
So, does it recognize the new tag??
I get this code.
$test = function($params)
{
$value = $params[0];
return 'Translate: <b>$value</b>';
};
// add a function
RainTpl::registerTag( '({@.*?@})', '{@(.*?)@}', $test );
---- reference ----
/**
* Allows the developer to register a tag.
*
* @param string $tag nombre del tag
* @param regexp $parse regular expression to parse the tag
* @param anonymous function $function: action to do when the tag is parsed
*/
public static function registerTag($tag, $parse, $function) {
static::$registered_tags[$tag] = array("parse" => $parse, "function" => $function);
}