public function __construct() { $this->parser = new Parser(); Macros\CoreMacros::install($this->parser); $this->parser->addMacro('cache', new Macros\CacheMacro($this->parser)); Macros\UIMacros::install($this->parser); Macros\FormMacros::install($this->parser); }
public function addMacro($name, $begin, $end = NULL) { $this->macros[$name] = array($begin, $end); $this->parser->addMacro($name, $this); }