Test.php 905 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. /*
  3. * This file is part of Twig.
  4. *
  5. * (c) 2012 Fabien Potencier
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. @trigger_error('The Twig_Test class is deprecated since version 1.12 and will be removed in 2.0. Use Twig_SimpleTest instead.', E_USER_DEPRECATED);
  11. /**
  12. * Represents a template test.
  13. *
  14. * @author Fabien Potencier <fabien@symfony.com>
  15. *
  16. * @deprecated since 1.12 (to be removed in 2.0)
  17. */
  18. abstract class Twig_Test implements Twig_TestInterface, Twig_TestCallableInterface
  19. {
  20. protected $options;
  21. protected $arguments = array();
  22. public function __construct(array $options = array())
  23. {
  24. $this->options = array_merge(array(
  25. 'callable' => null,
  26. ), $options);
  27. }
  28. public function getCallable()
  29. {
  30. return $this->options['callable'];
  31. }
  32. }