예제 #1
0
 public function __construct(array $usedFilters, array $usedTags, array $usedFunctions)
 {
     $this->usedFilters = $usedFilters;
     $this->usedTags = $usedTags;
     $this->usedFunctions = $usedFunctions;
     parent::__construct();
 }
예제 #2
0
파일: For.php 프로젝트: apishka/templater
 public function __construct(Apishka_Templater_Node_Expression_AssignName $keyTarget, Apishka_Templater_Node_Expression_AssignName $valueTarget, Apishka_Templater_Node_ExpressionAbstract $seq, Apishka_Templater_Node_ExpressionAbstract $ifexpr = null, Apishka_Templater_NodeAbstract $body, Apishka_Templater_NodeAbstract $else = null, $lineno, $tag = null)
 {
     $body = Apishka_Templater_Node::apishka(array($body, $this->loop = Apishka_Templater_Node_ForLoop::apishka($lineno, $tag)));
     if (null !== $ifexpr) {
         $body = Apishka_Templater_Node_If::apishka(Apishka_Templater_Node::apishka(array($ifexpr, $body)), null, $lineno, $tag);
     }
     parent::__construct(array('key_target' => $keyTarget, 'value_target' => $valueTarget, 'seq' => $seq, 'body' => $body, 'else' => $else), array('with_loop' => true, 'ifexpr' => null !== $ifexpr), $lineno, $tag);
 }
예제 #3
0
파일: Set.php 프로젝트: apishka/templater
 public function __construct($capture, Apishka_Templater_NodeAbstract $names, Apishka_Templater_NodeAbstract $values, $lineno, $tag = null)
 {
     parent::__construct(array('names' => $names, 'values' => $values), array('capture' => $capture, 'safe' => false), $lineno, $tag);
     /*
      * Optimizes the node when capture is used for a large block of text.
      *
      * {% set foo %}foo{% endset %} is compiled to $context['foo'] = new Apishka_Templater_Markup("foo");
      */
     if ($this->getAttribute('capture')) {
         $this->setAttribute('safe', true);
         $values = $this->getNode('values');
         if ($values instanceof Apishka_Templater_Node_Text) {
             $this->setNode('values', Apishka_Templater_Node_Expression_Constant::apishka($values->getAttribute('data'), $values->getLine()));
             $this->setAttribute('capture', false);
         }
     }
 }
예제 #4
0
파일: If.php 프로젝트: apishka/templater
 public function __construct(Apishka_Templater_NodeAbstract $tests, Apishka_Templater_NodeAbstract $else = null, $lineno, $tag = null)
 {
     parent::__construct(array('tests' => $tests, 'else' => $else), array(), $lineno, $tag);
 }
예제 #5
0
파일: Block.php 프로젝트: apishka/templater
 public function __construct($name, Apishka_Templater_NodeAbstract $body, $lineno, $tag = null)
 {
     parent::__construct(array('body' => $body), array('name' => $name), $lineno, $tag);
 }
예제 #6
0
 public function __construct($lineno, $tag = null)
 {
     parent::__construct(array(), array('with_loop' => false, 'ifexpr' => false, 'else' => false), $lineno, $tag);
 }
예제 #7
0
파일: Do.php 프로젝트: apishka/templater
 public function __construct(Apishka_Templater_Node_ExpressionAbstract $expr, $lineno, $tag = null)
 {
     parent::__construct(array('expr' => $expr), array(), $lineno, $tag);
 }
예제 #8
0
 public function __construct(Apishka_Templater_NodeAbstract $body, Apishka_Templater_Node_ExpressionAbstract $parent = null, Apishka_Templater_NodeAbstract $blocks, Apishka_Templater_NodeAbstract $macros, Apishka_Templater_NodeAbstract $traits, $embeddedTemplates, $filename)
 {
     // embedded templates are set as attributes so that they are only visited once by the visitors
     parent::__construct(array('parent' => $parent, 'body' => $body, 'blocks' => $blocks, 'macros' => $macros, 'traits' => $traits, 'display_start' => Apishka_Templater_Node::apishka(), 'display_end' => Apishka_Templater_Node::apishka(), 'constructor_start' => Apishka_Templater_Node::apishka(), 'constructor_end' => Apishka_Templater_Node::apishka(), 'class_end' => Apishka_Templater_Node::apishka()), array('filename' => $filename, 'index' => null, 'embedded_templates' => $embeddedTemplates), 1);
 }
예제 #9
0
 public function __construct($value, Apishka_Templater_NodeAbstract $body, $lineno, $tag = 'autoescape')
 {
     parent::__construct(array('body' => $body), array('value' => $value), $lineno, $tag);
 }
예제 #10
0
 public function __construct($extensionName, $type, $name, $varName)
 {
     parent::__construct(array(), array('extension_name' => $extensionName, 'name' => $name, 'type' => $type, 'var_name' => $varName));
 }
예제 #11
0
 public function __construct($varName)
 {
     parent::__construct(array(), array('var_name' => $varName));
 }
예제 #12
0
파일: Text.php 프로젝트: apishka/templater
 public function __construct($data, $lineno)
 {
     parent::__construct(array(), array('data' => $data), $lineno);
 }
예제 #13
0
 public function __construct($name, $lineno, $tag = null)
 {
     parent::__construct(array(), array('name' => $name), $lineno, $tag);
 }