Represents a method template test.
@package twig @author Fabien Potencier <fabien@symfony.com>
Expanded class hierarchy of Twig_Test_Method
class Twig_Test_Method implements Twig_TestInterface {
protected $extension;
protected $method;
public function __construct(Twig_ExtensionInterface $extension, $method) {
$this->extension = $extension;
$this->method = $method;
}
public function compile() {
return sprintf('$this->env->getExtension(\'%s\')->%s', $this->extension
->getName(), $this->method);
}
}
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
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 |