You are here

public function Twig_Node::hasNode in Translation template extractor 6.3

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

Returns true if the node with the given identifier exists.

Parameters

string The node name:

Return value

bool true if the node with the given name exists, false otherwise

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

File

vendor/Twig/Node.php, line 178

Class

Twig_Node
Represents a node in the AST.

Code

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