public function __construct() { $this->parser = new NParser; NCoreMacros::install($this->parser); $this->parser->addMacro('cache', new NCacheMacro($this->parser)); NUIMacros::install($this->parser); NFormMacros::install($this->parser); }
public function addMacro($name, $begin, $end = NULL) { $this->macros[$name] = array($begin, $end); $this->parser->addMacro($name, $this); return $this; }