public function loadFile($filename) {
		$this->filename = $filename;


		// If a cache directory was specified,
        // try to load from it
		if ($this->cachePath) {
		    if (! $this->templatesRoot) {
		        $this->templatesRoot = dirname($filename);
            }
		    $cacheFile = $this->makeCacheFilename($this->cachePath, $this->templatesRoot, $this->filename);
            if ( file_exists($cacheFile)
                 && (! file_exists($this->filename) || (filemtime($this->filename) < filemtime($cacheFile)) )
            ) {
                $this->loadFromSerialized(file_get_contents($cacheFile));
                return;
            }
        }

		if(file_exists($filename)) {
			$this->source = file_get_contents($filename);
		} else {
			$message = "File not found: $filename";
			throw new FileNotFoundException($message, $filename);
		}
	}
public function loadFile($filename) {
		$this->filename = $filename;


		// If a cache directory was specified,
        // try to load from it
		if ($this->cachePath) {
		    if (! $this->templatesRoot) {
		        $this->templatesRoot = dirname($filename);
            }
		    $cacheFile = $this->makeCacheFilename($this->cachePath, $this->templatesRoot, $this->filename);
            if ( file_exists($cacheFile)
                 && (! file_exists($this->filename) || (filemtime($this->filename) < filemtime($cacheFile)) )
            ) {
                $this->loadFromSerialized(file_get_contents($cacheFile));
                return;
            }
        }

		if(file_exists($filename)) {
			$this->source = file_get_contents($filename);
		} else {
			$message = "File not found: $filename";
			throw new FileNotFoundException($message, $filename);
		}
	}
public function loadFile ( $ filename ) { $ this -> filename = $ filename ; // If a cache directory was specified, // try to load from it if ( $ this -> cachePath ) { if ( ! $ this -> templatesRoot ) { $ this -> templatesRoot = dirname ( $ filename ) ; } $ cacheFile = $ this -> makeCacheFilename ( $ this -> cachePath , $ this -> templatesRoot , $ this -> filename ) ; if ( file_exists ( $ cacheFile ) && ( ! file_exists ( $ this -> filename ) || ( filemtime ( $ this -> filename ) < filemtime ( $ cacheFile ) ) ) ) { $ this -> loadFromSerialized ( file_get_contents ( $ cacheFile ) ) ; return ; } } if ( file_exists ( $ filename ) ) { $ this -> source = file_get_contents ( $ filename ) ; } else { $ message = "File not found: $filename" ; throw new FileNotFoundException ( $ message , $ filename ) ; } }
Load from source file.

@param string $filename
@throws FileNotFoundException
Load from source file .