Phrozn\Processor\Twig::getEnvironment PHP Method

getEnvironment() protected method

Get (init if necessary) twig environment
protected getEnvironment ( boolean $reset = false ) : Twig_Environment
$reset boolean Force re-initialization (helpful for UTs)
return Twig_Environment
    protected function getEnvironment($reset = false)
    {
        if ($reset === true || null === $this->twig) {
            $this->twig = new \Twig_Environment($this->getLoader(), $this->getConfig());
            $this->twig->removeExtension('escaper');
        }
        return $this->twig;
    }