Twig_Environment::getLexer PHP 메소드

getLexer() 공개 메소드

public getLexer ( )
    public function getLexer()
    {
        return $this->lexer;
    }

Same methods

Twig_Environment::getLexer ( ) : Twig_LexerInterface

Usage Example

예제 #1
0
 public static function getLineAndFile()
 {
     $o = self::$env->getLexer();
     $c = new \ReflectionClass(get_class($o));
     foreach ($c->getProperties() as $p) {
         if ($p->name == 'lineno') {
             $p->setAccessible(true);
             $lineno = $p->getValue($o);
         }
         if ($p->name == 'filename') {
             $p->setAccessible(true);
             $filename = $p->getValue($o);
         }
     }
     return $lineno . ' ' . trim($filename);
 }
All Usage Examples Of Twig_Environment::getLexer