You are here

public function Twig_Function_Method::compile in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/twig/twig/lib/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/twig/lib/Twig/Function/Method.php, line 39

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);
}