diff -r 000000000000 -r 7f95f8617b0b vendor/twig/lib/Twig/Function/Method.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vendor/twig/lib/Twig/Function/Method.php Sat Sep 24 15:40:41 2011 +0200 @@ -0,0 +1,35 @@ + + */ +class Twig_Function_Method extends Twig_Function +{ + protected $extension, $method; + + public function __construct(Twig_ExtensionInterface $extension, $method, array $options = array()) + { + parent::__construct($options); + + $this->extension = $extension; + $this->method = $method; + } + + public function compile() + { + return sprintf('$this->env->getExtension(\'%s\')->%s', $this->extension->getName(), $this->method); + } +}