]>
Raphaƫl G. Git Repositories - packbundle/blob - Twig/PackNode.php
   2 // src/Rapsys/PackBundle/Twig/PackTokenParser.php 
   3 namespace Rapsys\PackBundle\Twig
; 
   5 class PackNode 
extends \Twig_Node 
{ 
   6         #public function __construct($name, $value, $line, $tag = null) { 
   7         #       parent::__construct(array('value' => $value), array('name' => $name), $line, $tag); 
   9         public function __construct(array $nodes = array(), array $attributes = array(), $lineno = 0, $tag = null) { 
  10                 parent
::__construct($nodes, $attributes, $lineno, $tag); 
  11                 #$this->output = $attributes['output']; 
  12                 #$this->setAttribute($this->getAttribute('name'), $attributes['name']); 
  15         public function compile(\Twig_Compiler 
$compiler) { 
  17                 #header('Content-Type: text/plain'); 
  18                 #var_dump($this->getNode(0)); 
  19                 #var_dump($this->attributes); 
  20                 #var_dump($compiler->subcompile($this->getNode(0))); 
  22                 #$compiler->addDebugInfo($this)->write('echo \'<pre>'.json_encode(array('nodes' => $this->nodes, 'attributes' => $this->attributes)).'</pre>\';'); 
  25                         ->write('$context[\''.$this->getAttribute('name').'\'] = ') 
  26                         ->repr($this->getAttribute('output')) 
  28                         ->subcompile($this->getNode('value'))