Lines Matching refs:this

114             $this->setHelpers($options['helpers']);
118 $this->setLoader($options['loader']);
122 $this->setPartialsLoader($options['partials_loader']);
126 $this->setCache($options['cache']);
135 $this->escape = $options['escape'];
142 $this->escapeArgs = $options['escapeArgs'];
148 $this->aliases = $options['partials_alias'];
157 $this->enableDataVariables = $options[self::OPTION_ENABLE_DATA_VARIABLES];
174 return $this->loadTemplate($template)->render($data);
177 * To invoke when this object is called as a function
185 return $this->render($template, $data);
197 $this->helpers = $helpers;
207 if (!isset($this->helpers)) {
208 $this->helpers = new Helpers();
210 return $this->helpers;
223 $this->getHelpers()->add($name, $helper);
234 return $this->getHelpers()->__get($name);
238 * Check whether this instance has a helper.
245 return $this->getHelpers()->has($name);
256 $this->getHelpers()->remove($name);
267 $this->loader = $loader;
277 if (! isset($this->loader)) {
278 $this->loader = new StringLoader();
280 return $this->loader;
291 $this->partialsLoader = $loader;
301 if (!isset($this->partialsLoader)) {
302 $this->partialsLoader = new StringLoader();
304 return $this->partialsLoader;
315 $this->cache = $cache;
325 if (!isset($this->cache)) {
326 $this->cache = new Dummy();
328 return $this->cache;
338 return $this->escape;
355 $this->escape = $escape;
365 return $this->escapeArgs;
379 $this->escapeArgs = $escapeArgs;
391 $this->tokenizer = $tokenizer;
397 * If no Tokenizer instance has been explicitly specified, this method will
404 if (! isset($this->tokenizer)) {
405 $this->tokenizer = new Tokenizer();
408 return $this->tokenizer;
419 $this->parser = $parser;
425 * If no Parser instance has been explicitly specified, this method will
432 if (! isset($this->parser)) {
433 $this->parser = new Parser();
435 return $this->parser;
444 return $this->enableDataVariables;
456 $source = $this->getLoader()->load($name);
457 $tree = $this->tokenize($source);
458 return new Template($this, $tree, $source);
470 if (isset($this->aliases[$name])) {
471 $name = $this->aliases[$name];
473 $source = $this->getPartialsLoader()->load($name);
474 $tree = $this->tokenize($source);
475 return new Template($this, $tree, $source);
487 $this->aliases[$alias] = $content;
498 if (isset($this->aliases[$alias])) {
499 unset($this->aliases[$alias]);
511 $tree = $this->tokenize($source);
512 return new Template($this, $tree, $source);
524 $tree = $this->getCache()->get($hash);
526 $tokens = $this->getTokenizer()->scan($source);
527 $tree = $this->getParser()->parse($tokens);
528 $this->getCache()->set($hash, $tree);