forked from leftypol/leftypol
upgrade twig library
This commit is contained in:
parent
01857d176a
commit
9c48084f3b
163 changed files with 275 additions and 94 deletions
4
inc/lib/Twig/Node/Macro.php
Normal file → Executable file
4
inc/lib/Twig/Node/Macro.php
Normal file → Executable file
|
@ -18,7 +18,7 @@ class Twig_Node_Macro extends Twig_Node
|
|||
{
|
||||
public function __construct($name, Twig_NodeInterface $body, Twig_NodeInterface $arguments, $lineno, $tag = null)
|
||||
{
|
||||
parent::__construct(array('body' => $body, 'arguments' => $arguments), array('name' => $name), $lineno, $tag);
|
||||
parent::__construct(array('body' => $body, 'arguments' => $arguments), array('name' => $name, 'method' => 'get'.ucfirst($name)), $lineno, $tag);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -30,7 +30,7 @@ class Twig_Node_Macro extends Twig_Node
|
|||
{
|
||||
$compiler
|
||||
->addDebugInfo($this)
|
||||
->write(sprintf("public function get%s(", $this->getAttribute('name')))
|
||||
->write(sprintf("public function %s(", $this->getAttribute('method')))
|
||||
;
|
||||
|
||||
$count = count($this->getNode('arguments'));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue