class Twig_Function_Method in Translation template extractor 7.3
Same name and namespace in other branches
- 6.3 vendor/Twig/Function/Method.php \Twig_Function_Method
Represents a method template function.
Use Twig_SimpleFunction instead.
@author Arnaud Le Blanc <arnaud.lb@gmail.com>
Hierarchy
- class \Twig_Function implements Twig_FunctionCallableInterface, Twig_FunctionInterface- class \Twig_Function_Method
 
Expanded class hierarchy of Twig_Function_Method
Deprecated
since 1.12 (to be removed in 2.0)
File
- vendor/Twig/ Function/ Method.php, line 24 
View source
class Twig_Function_Method extends Twig_Function {
  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_Function:: | protected | property | ||
| Twig_Function:: | protected | property | ||
| Twig_Function:: | public | function | Overrides Twig_FunctionInterface:: | |
| Twig_Function:: | public | function | Overrides Twig_FunctionCallableInterface:: | |
| 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:: | 
