You are here

public function Twig_Node::hasAttribute in Translation template extractor 6.3

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

Returns true if the attribute is defined.

Parameters

string The attribute name:

Return value

bool true if the attribute is defined, false otherwise

3 calls to Twig_Node::hasAttribute()
Twig_Node_Expression_Call::compileArguments in vendor/Twig/Node/Expression/Call.php
Twig_Node_Expression_Call::compileCallable in vendor/Twig/Node/Expression/Call.php
Twig_Node_Expression_Call::getArguments in vendor/Twig/Node/Expression/Call.php

File

vendor/Twig/Node.php, line 129

Class

Twig_Node
Represents a node in the AST.

Code

public function hasAttribute($name) {
  return array_key_exists($name, $this->attributes);
}