diff options
| author | Michael Foster <savetheinternet@tinyboard.org> | 2013-08-01 15:20:12 -0400 |
|---|---|---|
| committer | Michael Foster <savetheinternet@tinyboard.org> | 2013-08-01 15:20:12 -0400 |
| commit | 0fe552857468aa12097a74e08f51f5aaa983be07 (patch) | |
| tree | 22dbca1be90d7086b20a077752552296abf23325 /inc/lib/Twig/Node.php | |
| parent | 22f3a95e0e421de05a11633eac846df96a2a4768 (diff) | |
Upgrade Twig library
Diffstat (limited to 'inc/lib/Twig/Node.php')
| -rw-r--r-- | inc/lib/Twig/Node.php | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/inc/lib/Twig/Node.php b/inc/lib/Twig/Node.php index 22e65d45..931b4635 100644 --- a/inc/lib/Twig/Node.php +++ b/inc/lib/Twig/Node.php @@ -13,10 +13,9 @@ /** * Represents a node in the AST. * - * @package twig - * @author Fabien Potencier <fabien@symfony.com> + * @author Fabien Potencier <fabien@symfony.com> */ -class Twig_Node implements Twig_NodeInterface, Countable, IteratorAggregate +class Twig_Node implements Twig_NodeInterface { protected $nodes; protected $attributes; @@ -134,12 +133,12 @@ class Twig_Node implements Twig_NodeInterface, Countable, IteratorAggregate * * @param string The attribute name * - * @return mixed The attribute value + * @return mixed The attribute value */ public function getAttribute($name) { if (!array_key_exists($name, $this->attributes)) { - throw new Twig_Error_Runtime(sprintf('Attribute "%s" does not exist for Node "%s".', $name, get_class($this))); + throw new LogicException(sprintf('Attribute "%s" does not exist for Node "%s".', $name, get_class($this))); } return $this->attributes[$name]; @@ -188,7 +187,7 @@ class Twig_Node implements Twig_NodeInterface, Countable, IteratorAggregate public function getNode($name) { if (!array_key_exists($name, $this->nodes)) { - throw new Twig_Error_Runtime(sprintf('Node "%s" does not exist for Node "%s".', $name, get_class($this))); + throw new LogicException(sprintf('Node "%s" does not exist for Node "%s".', $name, get_class($this))); } return $this->nodes[$name]; |
