PEEL Shopping
Open source ecommerce : PEEL Shopping
Embed.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of Twig.
5  *
6  * (c) 2012 Fabien Potencier
7  *
8  * For the full copyright and license information, please view the LICENSE
9  * file that was distributed with this source code.
10  */
11 
18 {
19  // we don't inject the module to avoid node visitors to traverse it twice (as it will be already visited in the main module)
20  public function __construct($filename, $index, Twig_Node_Expression $variables = null, $only = false, $ignoreMissing = false, $lineno, $tag = null)
21  {
22  parent::__construct(new Twig_Node_Expression_Constant('not_used', $lineno), $variables, $only, $ignoreMissing, $lineno, $tag);
23 
24  $this->setAttribute('filename', $filename);
25  $this->setAttribute('index', $index);
26  }
27 
28  protected function addGetTemplate(Twig_Compiler $compiler)
29  {
30  $compiler
31  ->write("\$this->env->loadTemplate(")
32  ->string($this->getAttribute('filename'))
33  ->raw(', ')
34  ->string($this->getAttribute('index'))
35  ->raw(")")
36  ;
37  }
38 }
Represents an embed node.
Definition: Embed.php:17
Compiles a node to PHP code.
Definition: Compiler.php:18
addGetTemplate(Twig_Compiler $compiler)
Definition: Embed.php:28
Represents an include node.
Definition: Include.php:18
getAttribute($name)
Gets an attribute.
Definition: Node.php:138
$lineno
Definition: Node.php:22
Abstract class for all nodes that represents an expression.
Definition: Expression.php:18
setAttribute($name, $value)
Sets an attribute.
Definition: Node.php:153
__construct($filename, $index, Twig_Node_Expression $variables=null, $only=false, $ignoreMissing=false, $lineno, $tag=null)
Definition: Embed.php:20
$filename
write()
Writes a string to the compiled code by adding indentation.
Definition: Compiler.php:121

This documentation for Open ecommerce PEEL Shopping and PEEL.fr has been generated by Doxygen on Thu Oct 15 2015 14:41:18 - Peel ecommerce is a product of Agence web Advisto SAS. All rights reserved.