class Twig_Test_Method

Represents a method template test.

@package twig @author Fabien Potencier <fabien@symfony.com>

Hierarchy

Expanded class hierarchy of Twig_Test_Method

File

drupal/core/vendor/twig/twig/lib/Twig/Test/Method.php, line 18

View source
class Twig_Test_Method implements Twig_TestInterface {
  protected $extension;
  protected $method;
  public function __construct(Twig_ExtensionInterface $extension, $method) {
    $this->extension = $extension;
    $this->method = $method;
  }
  public function compile() {
    return sprintf('$this->env->getExtension(\'%s\')->%s', $this->extension
      ->getName(), $this->method);
  }

}

Members