You are here

public function Twig_Environment::getParser in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/twig/twig/lib/Twig/Environment.php \Twig_Environment::getParser()

Gets the Parser instance.

Return value

Twig_ParserInterface A Twig_ParserInterface instance

File

vendor/twig/twig/lib/Twig/Environment.php, line 585

Class

Twig_Environment
Stores the Twig configuration.

Code

public function getParser() {
  if (null === $this->parser) {
    $this->parser = new Twig_Parser($this);
  }
  return $this->parser;
}