You are here

public function Twig_Node::getAttribute in Zircon Profile 8.0

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

Gets an attribute value by name.

Parameters

string $name:

Return value

mixed

24 calls to Twig_Node::getAttribute()
Twig_Node_BlockReference::compile in vendor/twig/twig/lib/Twig/Node/BlockReference.php
Compiles the node to PHP.
Twig_Node_Expression_BlockReference::compile in vendor/twig/twig/lib/Twig/Node/Expression/BlockReference.php
Compiles the node to PHP.
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

... See full list

File

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

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];
}