Represents a method template function.
@package twig @author Arnaud Le Blanc <arnaud.lb@gmail.com>
Expanded class hierarchy of Twig_Function_Method
class Twig_Function_Method extends Twig_Function {
protected $extension;
protected $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);
}
}
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Twig_Function:: |
protected | property | ||
Twig_Function:: |
protected | property | ||
Twig_Function:: |
public | function |
Overrides Twig_FunctionInterface:: |
|
Twig_Function:: |
public | function |
Overrides Twig_FunctionInterface:: |
|
Twig_Function:: |
public | function |
Overrides Twig_FunctionInterface:: |
|
Twig_Function:: |
public | function |
Overrides Twig_FunctionInterface:: |
|
Twig_Function:: |
public | function |
Overrides Twig_FunctionInterface:: |
|
Twig_Function_Method:: |
protected | property | ||
Twig_Function_Method:: |
protected | property | ||
Twig_Function_Method:: |
public | function |
Compiles a function. Overrides Twig_FunctionInterface:: |
|
Twig_Function_Method:: |
public | function |
Overrides Twig_Function:: |