Compiler.php
public function compileFile($path)
    {

        $fullPath = $this->resolvePath($path);

        if (!$fullPath)
            $this->throwException(
                "Template file [$path] could not be resolved in the following paths: [".
                implode(', ', $this->options['paths']).
                "], Extensions: [".implode(', ', $this->options['extensions']).
                "], Include path: ".get_include_path()."]\n\n".
                "Make sure the paths are configured correctly. If you're missing a path, add it with the [`paths`] ".
                "option or the [`->addPath`]-method."
            );

        return $this->compile(file_get_contents($fullPath), $fullPath);
    }
public function compileFile($path)
    {

        $fullPath = $this->resolvePath($path);

        if (!$fullPath)
            $this->throwException(
                "Template file [$path] could not be resolved in the following paths: [".
                implode(', ', $this->options['paths']).
                "], Extensions: [".implode(', ', $this->options['extensions']).
                "], Include path: ".get_include_path()."]\n\n".
                "Make sure the paths are configured correctly. If you're missing a path, add it with the [`paths`] ".
                "option or the [`->addPath`]-method."
            );

        return $this->compile(file_get_contents($fullPath), $fullPath);
    }
public function compileFile ( $ path ) { $ fullPath = $ this -> resolvePath ( $ path ) ; if ( ! $ fullPath ) $ this -> throwException ( "Template file [$path] could not be resolved in the following paths: [" . implode ( ', ' , $ this -> options [ 'paths' ] ) . "], Extensions: [" . implode ( ', ' , $ this -> options [ 'extensions' ] ) . "], Include path: " . get_include_path ( ) . "]\n\n" . "Make sure the paths are configured correctly. If you're missing a path, add it with the [`paths`] " . "option or the [`->addPath`]-method." ) ; return $ this -> compile ( file_get_contents ( $ fullPath ) , $ fullPath ) ; }
Compiles a file to PHTML.

The given path will automatically passed as
compile()'s $path argument

The path should always be relative to the paths-option paths

@see Compiler->compile

@param string $path the path to the jade file

@return mixed|string the compiled PHTML

@throws \Exception when the file is not found
@throws Exception when the compilation fails
@throws Parser\Exception when the parsing fails
@throws Lexer\Exception when the lexing fails
Compiles a file to PHTML .