You are here

public function Twig_Test_Method::compile in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/twig/twig/lib/Twig/Test/Method.php \Twig_Test_Method::compile()

Compiles a test.

Return value

string The PHP code for the test

Overrides Twig_TestInterface::compile

File

vendor/twig/twig/lib/Twig/Test/Method.php, line 36

Class

Twig_Test_Method
Represents a method template test.

Code

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