From 0fe552857468aa12097a74e08f51f5aaa983be07 Mon Sep 17 00:00:00 2001 From: Michael Foster Date: Thu, 1 Aug 2013 15:20:12 -0400 Subject: Upgrade Twig library --- inc/lib/Twig/Node.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'inc/lib/Twig/Node.php') 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 + * @author Fabien Potencier */ -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]; -- cgit v1.3