Lines Matching defs:context
216 * @param \Handlebars\Context $context context object
223 public function helperIf($template, $context, $args, $source)
227 $tmp = $context->get($args);
238 $buffer = $template->render($context);
249 $args = $this->parseArgs($context, substr($name, 7));
261 $buffer = $template->render($context);
268 return $this->renderElse($template, $context);
272 return $this->renderElse($template, $context);
289 * @param \Handlebars\Context $context context object
296 public function helperEach($template, $context, $args, $source)
299 $tmp = $context->get($keyname);
307 return $this->renderElse($template, $context);
318 $context->pushIndex($key);
320 // If data variables are enabled, push the data related to this #each context
322 $context->pushData([
330 $context->pushKey($key);
332 // If data variables are enabled, push the data related to this #each context
334 $context->pushData([
339 $context->push($var);
341 $buffer .= $tpl->render($context);
342 $context->pop();
344 $context->popIndex();
346 $context->popKey();
350 $context->popData();
356 return $this->renderElse($template, $context);
364 * @param \Handlebars\Context $context
367 private function renderElse($template, $context)
372 return $template->render($context);
384 * @param \Handlebars\Context $context context object
391 public function helperUnless($template, $context, $args, $source)
393 $tmp = $context->get($args);
396 $buffer = $template->render($context);
401 return $this->renderElse($template, $context);
411 * @param \Handlebars\Context $context context object
418 public function helperWith($template, $context, $args, $source)
420 $tmp = $context->get($args);
421 $context->push($tmp);
422 $buffer = $template->render($context);
423 $context->pop();
434 * @param \Handlebars\Context $context context object
441 public function helperBindAttr($template, $context, $args, $source)
452 * @param \Handlebars\Context $context context object
459 public function helperUpper($template, $context, $args, $source)
461 return strtoupper($context->get($args));
470 * @param \Handlebars\Context $context context object
477 public function helperLower($template, $context, $args, $source)
479 return strtolower($context->get($args));
488 * @param \Handlebars\Context $context context object
495 public function helperCapitalize($template, $context, $args, $source)
497 return ucfirst($context->get($args));
506 * @param \Handlebars\Context $context context object
513 public function helperCapitalizeWords($template, $context, $args, $source)
515 return ucwords($context->get($args));
524 * @param \Handlebars\Context $context context object
531 public function helperReverse($template, $context, $args, $source)
533 return strrev($context->get($args));
542 * @param \Handlebars\Context $context context object
549 public function helperFormatDate($template, $context, $args, $source)
555 $date = $context->get($keyname);
574 * @param \Handlebars\Context $context context object
581 public function helperInflect($template, $context, $args, $source)
587 $value = $context->get($keyname);
598 * @param \Handlebars\Context $context context object
605 public function helperDefault($template, $context, $args, $source)
610 $value = $context->get($keyname);
620 * @param \Handlebars\Context $context context object
627 public function helperTruncate($template, $context, $args, $source)
633 $value = substr($context->get($keyname), 0, $limit);
634 if ($ellipsis && strlen($context->get($keyname)) > $limit) {
646 * @param \Handlebars\Context $context context object
653 public function helperRaw($template, $context, $args, $source)
667 * @param \Handlebars\Context $context context object
674 public function helperRepeat($template, $context, $args, $source)
676 $buffer = $template->render($context);
696 * @param \Handlebars\Context $context context object
703 public function helperDefine($template, $context, $args, $source)
723 * @param \Handlebars\Context $context context object
730 public function helperInvoke($template, $context, $args, $source)
735 return $this->tpl["DEFINE"][$args]->render($context);
780 * @param \Handlebars\Context $context context object
784 private function parseArgs($context, $args)
794 $val = $context->get($ele);