protected function getTwig()
    {
        if (null === $this->twig) {
            $this->twig = new \Twig_Environment(new \Twig_Loader_Filesystem(self::TEMPLATE_DIR), [
                'debug'            => true,
                'cache'            => false,
                'strict_variables' => true,
                'autoescape'       => false,
            ]);

            $this->twig->addExtension(new StringExtension());

            $class = sprintf(
                '\Gdbots\Pbjc\Generator\Twig\%sGeneratorExtension',
                StringUtils::toCamelFromSlug(static::LANGUAGE)
            );

            $this->twig->addExtension(new $class($this->compileOptions, $this));
        }

        return $this->twig;
    }
protected function getTwig()
    {
        if (null === $this->twig) {
            $this->twig = new \Twig_Environment(new \Twig_Loader_Filesystem(self::TEMPLATE_DIR), [
                'debug'            => true,
                'cache'            => false,
                'strict_variables' => true,
                'autoescape'       => false,
            ]);

            $this->twig->addExtension(new StringExtension());

            $class = sprintf(
                '\Gdbots\Pbjc\Generator\Twig\%sGeneratorExtension',
                StringUtils::toCamelFromSlug(static::LANGUAGE)
            );

            $this->twig->addExtension(new $class($this->compileOptions, $this));
        }

        return $this->twig;
    }
protected function getTwig ( ) { if ( null === $ this -> twig ) { $ this -> twig = new \ Twig_Environment ( new \ Twig_Loader_Filesystem ( self :: TEMPLATE_DIR ) , [ 'debug' => true , 'cache' => false , 'strict_variables' => true , 'autoescape' => false , ] ) ; $ this -> twig -> addExtension ( new StringExtension ( ) ) ; $ class = sprintf ( '\Gdbots\Pbjc\Generator\Twig\%sGeneratorExtension' , StringUtils :: toCamelFromSlug ( static :: LANGUAGE ) ) ; $ this -> twig -> addExtension ( new $ class ( $ this -> compileOptions , $ this ) ) ; } return $ this -> twig ; }
Get the twig environment that will render skeletons.

@return \Twig_Environment
Get the twig environment that will render skeletons .