123456789101112131415161718192021222324252627282930313233 |
- <?php
-
-
-
-
- class Twig_Test_Method implements Twig_TestInterface
- {
- protected $extension, $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);
- }
- }
|