Twig_Environment::getCompiler PHP Method

getCompiler() public method

public getCompiler ( )
    public function getCompiler()
    {
        return $this->compiler;
    }

Same methods

Twig_Environment::getCompiler ( ) : Twig_CompilerInterface

Usage Example

 public function testCompileClassConstant()
 {
     $expression = new StaticConstantExpression('\\StaticConstantExpressionTest::SOME_VALUE', 1);
     $this->assertEquals('\\StaticConstantExpressionTest::SOME_VALUE', $this->environment->getCompiler()->compile($expression)->getSource());
 }