4 * This file is part of Twig.
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
13 * Represents a template test.
17 * @author Fabien Potencier <fabien@symfony.com>
25 public function __construct($name, $callable, array $options = array())
28 $this->callable = $callable;
29 $this->options = array_merge(array(
30 'is_variadic' => false,
31 'node_class' => 'Twig_Node_Expression_Test',
32 'deprecated' => false,
33 'alternative' => null,
37 public function getName()
42 public function getCallable()
44 return $this->callable;
47 public function getNodeClass()
49 return $this->options['node_class'];
52 public function isVariadic()
54 return $this->options['is_variadic'];
57 public function isDeprecated()
59 return (bool) $this->options['deprecated'];
62 public function getDeprecatedVersion()
64 return $this->options['deprecated'];
67 public function getAlternative()
69 return $this->options['alternative'];