src/generators/FileGenerator.php
protected function compileTemplate($templateFile, array $templateData)
    {
        if (!isset(self::$compiler)) {
            self::$compiler = new Compiler();
        }

        if (!is_file($templateFile)) {
            throw new Exception("Could not find template file '$templateFile'.");
        }

        return self::$compiler->compile(file_get_contents($templateFile), $templateData);
    }
protected function compileTemplate($templateFile, array $templateData)
    {
        if (!isset(self::$compiler)) {
            self::$compiler = new Compiler();
        }

        if (!is_file($templateFile)) {
            throw new Exception("Could not find template file '$templateFile'.");
        }

        return self::$compiler->compile(file_get_contents($templateFile), $templateData);
    }
protected function compileTemplate ( $ templateFile , array $ templateData ) { if ( ! isset ( self :: $ compiler ) ) { self :: $ compiler = new Compiler ( ) ; } if ( ! is_file ( $ templateFile ) ) { throw new Exception ( "Could not find template file '$templateFile'." ) ; } return self :: $ compiler -> compile ( file_get_contents ( $ templateFile ) , $ templateData ) ; }
Compiles a specific template file using the given data.

@param string $templateFile path to the template file.
@param array $templateData an array of data to pass to the template.
@return string the compiled template.
@throws Exception if the template file cannot be found.
Compiles a specific template file using the given data .