class Twig_Test_Method in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/twig/twig/lib/Twig/Test/Method.php \Twig_Test_Method
Represents a method template test.
@author Fabien Potencier <fabien@symfony.com>
Hierarchy
- class \Twig_Test implements Twig_TestCallableInterface, Twig_TestInterface
- class \Twig_Test_Method
Expanded class hierarchy of Twig_Test_Method
Deprecated
since 1.12 (to be removed in 2.0)
File
- vendor/
twig/ twig/ lib/ Twig/ Test/ Method.php, line 21
View source
class Twig_Test_Method extends Twig_Test {
protected $extension;
protected $method;
public function __construct(Twig_ExtensionInterface $extension, $method, array $options = array()) {
$options['callable'] = array(
$extension,
$method,
);
parent::__construct($options);
$this->extension = $extension;
$this->method = $method;
}
public function compile() {
return sprintf('$this->env->getExtension(\'%s\')->%s', $this->extension
->getName(), $this->method);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Twig_Test:: |
protected | property | ||
Twig_Test:: |
protected | property | ||
Twig_Test:: |
public | function |
Overrides Twig_TestCallableInterface:: |
|
Twig_Test_Method:: |
protected | property | ||
Twig_Test_Method:: |
protected | property | ||
Twig_Test_Method:: |
public | function |
Compiles a test. Overrides Twig_TestInterface:: |
|
Twig_Test_Method:: |
public | function |
Overrides Twig_Test:: |