protected function getViewCompiler(IContainer $container) : ICompiler
    {
        $registry = new CompilerRegistry();
        $viewCompiler = new Compiler($registry);

        // Setup our various sub-compilers
        $transpiler = new Transpiler(new Lexer(), new Parser(), $this->viewCache, new XssFilter());
        $container->bindInstance(ITranspiler::class, $transpiler);
        $fortuneCompiler = new FortuneCompiler($transpiler, $this->viewFactory);
        $registry->registerCompiler('fortune', $fortuneCompiler);
        $registry->registerCompiler('fortune.php', $fortuneCompiler);
        $registry->registerCompiler('php', new PhpCompiler());

        return $viewCompiler;
    }
protected function getViewCompiler(IContainer $container) : ICompiler
    {
        $registry = new CompilerRegistry();
        $viewCompiler = new Compiler($registry);

        // Setup our various sub-compilers
        $transpiler = new Transpiler(new Lexer(), new Parser(), $this->viewCache, new XssFilter());
        $container->bindInstance(ITranspiler::class, $transpiler);
        $fortuneCompiler = new FortuneCompiler($transpiler, $this->viewFactory);
        $registry->registerCompiler('fortune', $fortuneCompiler);
        $registry->registerCompiler('fortune.php', $fortuneCompiler);
        $registry->registerCompiler('php', new PhpCompiler());

        return $viewCompiler;
    }
protected function getViewCompiler ( IContainer $ container ) : ICompiler { $ registry = new CompilerRegistry ( ) ; $ viewCompiler = new Compiler ( $ registry ) ; // Setup our various sub-compilers $ transpiler = new Transpiler ( new Lexer ( ) , new Parser ( ) , $ this -> viewCache , new XssFilter ( ) ) ; $ container -> bindInstance ( ITranspiler :: class , $ transpiler ) ; $ fortuneCompiler = new FortuneCompiler ( $ transpiler , $ this -> viewFactory ) ; $ registry -> registerCompiler ( 'fortune' , $ fortuneCompiler ) ; $ registry -> registerCompiler ( 'fortune.php' , $ fortuneCompiler ) ; $ registry -> registerCompiler ( 'php' , new PhpCompiler ( ) ) ; return $ viewCompiler ; }
Gets the view compiler
To use a different view compiler than the one returned here, extend this class and override this method

@param IContainer $container The dependency injection container
@return ICompiler The view compiler
Gets the view compiler To use a different view compiler than the one returned here extend this class and override this method