This commit is contained in:
Fabien Potencier
2010-12-28 19:50:01 +01:00
parent 43ec3036f7
commit 5c0d907e08
5 changed files with 6 additions and 7 deletions
+1 -1
View File
@@ -482,7 +482,7 @@ class Twig_Environment
if (isset($this->functions[$name])) {
return $this->functions[$name];
}
return null;
}
+1 -1
View File
@@ -60,7 +60,7 @@ abstract class Twig_Extension implements Twig_ExtensionInterface
{
return array();
}
/**
* Returns a list of functions to add to the existing list.
*
+1 -1
View File
@@ -12,7 +12,7 @@
/**
* Represents a local private variable.
*
*
* Such variables are not visible from templates.
*
* @package twig
+2 -2
View File
@@ -26,7 +26,7 @@ class Twig_Node_Expression_LocalName extends Twig_Node_Expression
{
if (null === $name) {
$uniq = self::$counter++;
$name = '__' . $uniq;
$name = '__'.$uniq;
}
parent::__construct(array(), array('name' => $name), $lineno);
@@ -34,7 +34,7 @@ class Twig_Node_Expression_LocalName extends Twig_Node_Expression
public function compile($compiler)
{
$compiler->raw('$' . $this->getAttribute('name'));
$compiler->raw('$'.$this->getAttribute('name'));
}
}
+1 -2
View File
@@ -47,8 +47,7 @@ class Twig_TokenParser_From extends Twig_TokenParser
$node = new Twig_Node_From($macro, $token->getLine(), $this->getTag());
foreach($targets as $name => $alias)
{
foreach($targets as $name => $alias) {
$this->parser->addImportedFunction($alias, $name, $node->getNode('var'));
}