public function Twig_Node::getAttribute

Gets an attribute.

Parameters

string The attribute name:

Return value

mixed The attribute value

23 calls to Twig_Node::getAttribute()

File

drupal/core/vendor/twig/twig/lib/Twig/Node.php, line 138

Class

Twig_Node
Represents a node in the AST.

Code

public function getAttribute($name) {
  if (!array_key_exists($name, $this->attributes)) {
    throw new LogicException(sprintf('Attribute "%s" does not exist for Node "%s".', $name, get_class($this)));
  }
  return $this->attributes[$name];
}