Example #1
0
	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);
	}
Example #2
0
	public function addMacro($name, $begin, $end = NULL)
	{
		$this->macros[$name] = array($begin, $end);
		$this->parser->addMacro($name, $this);
		return $this;
	}