You are here

public function Twig_Node::hasNode in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/twig/twig/lib/Twig/Node.php \Twig_Node::hasNode()

Returns true if the node with the given name exists.

Parameters

string $name:

Return value

bool

3 calls to Twig_Node::hasNode()
Twig_Node_Expression_Call::compileArguments in vendor/twig/twig/lib/Twig/Node/Expression/Call.php
Twig_Node_Expression_Call::getArguments in vendor/twig/twig/lib/Twig/Node/Expression/Call.php
Twig_Node_If::compile in vendor/twig/twig/lib/Twig/Node/If.php
Compiles the node to PHP.

File

vendor/twig/twig/lib/Twig/Node.php, line 180

Class

Twig_Node
Represents a node in the AST.

Code

public function hasNode($name) {
  return array_key_exists($name, $this->nodes);
}