You are here

public function Twig_Node::hasAttribute in Zircon Profile 8.0

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

Returns true if the attribute is defined.

Parameters

string $name 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/twig/lib/Twig/Node/Expression/Call.php
Twig_Node_Expression_Call::compileCallable 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

File

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

Class

Twig_Node
Represents a node in the AST.

Code

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