public function Twig_Node_Expression_Array::addElement in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/twig/twig/lib/Twig/Node/Expression/Array.php \Twig_Node_Expression_Array::addElement()
File
- vendor/
twig/ twig/ lib/ Twig/ Node/ Expression/ Array.php, line 54
Class
Code
public function addElement(Twig_Node_Expression $value, Twig_Node_Expression $key = null) {
if (null === $key) {
$key = new Twig_Node_Expression_Constant(++$this->index, $value
->getLine());
}
array_push($this->nodes, $key, $value);
}