if (isset($this->functions[$name])) {
return $this->functions[$name];
}
-
+
return null;
}
{
return array();
}
-
+
/**
* Returns a list of functions to add to the existing list.
*
/**
* Represents a local private variable.
- *
+ *
* Such variables are not visible from templates.
*
* @package twig
{
if (null === $name) {
$uniq = self::$counter++;
- $name = '__' . $uniq;
+ $name = '__'.$uniq;
}
parent::__construct(array(), array('name' => $name), $lineno);
public function compile($compiler)
{
- $compiler->raw('$' . $this->getAttribute('name'));
+ $compiler->raw('$'.$this->getAttribute('name'));
}
}
$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'));
}