You are here

public function Twig_Function_Method::compile in Translation template extractor 6.3

Same name and namespace in other branches
  1. 7.3 vendor/Twig/Function/Method.php \Twig_Function_Method::compile()

Compiles a function.

Return value

string The PHP code for the function

Overrides Twig_FunctionInterface::compile

File

vendor/Twig/Function/Method.php, line 36

Class

Twig_Function_Method
Represents a method template function.

Code

public function compile() {
  return sprintf('$this->env->getExtension(\'%s\')->%s', $this->extension
    ->getName(), $this->method);
}