src/Compiler.php
private function tryCompile($string, \Closure $afterEvents = null, $flags = null) // todo: after events + flags (?)
    {
        foreach ($this->compilers as $compiler => $priority) {
            if (! class_exists($compiler)) {
                throw new NotFoundException("PytoTPL compiler ({$compiler}) couldn't be found!");
            } elseif (! is_subclass_of($compiler, "PytoTPL\Compilers\AbstractCompiler")) {
                throw new InvalidCompilerException("Compiler ({$compiler}) must extend (PytoTPL\Compilers\AbstractCompiler)!");
            }

            $string = $this->run($compiler, $string);
        }

        return $string;
    }
private function tryCompile($string, \Closure $afterEvents = null, $flags = null) // todo: after events + flags (?)
    {
        foreach ($this->compilers as $compiler => $priority) {
            if (! class_exists($compiler)) {
                throw new NotFoundException("PytoTPL compiler ({$compiler}) couldn't be found!");
            } elseif (! is_subclass_of($compiler, "PytoTPL\Compilers\AbstractCompiler")) {
                throw new InvalidCompilerException("Compiler ({$compiler}) must extend (PytoTPL\Compilers\AbstractCompiler)!");
            }

            $string = $this->run($compiler, $string);
        }

        return $string;
    }
private function tryCompile ( $ string , \ Closure $ afterEvents = null , $ flags = null ) // todo: after events + flags (?) { foreach ( $ this -> compilers as $ compiler => $ priority ) { if ( ! class_exists ( $ compiler ) ) { throw new NotFoundException ( "PytoTPL compiler ({$compiler}) couldn't be found!" ) ; } elseif ( ! is_subclass_of ( $ compiler , "PytoTPL\Compilers\AbstractCompiler" ) ) { throw new InvalidCompilerException ( "Compiler ({$compiler}) must extend (PytoTPL\Compilers\AbstractCompiler)!" ) ; } $ string = $ this -> run ( $ compiler , $ string ) ; } return $ string ; }
Load all the available compilers and run each one

@param  string        $string
@param  \Closure|null $afterEvents
@param  mixed         $flags
@return type
Load all the available compilers and run each one