public function loadFile($file, $data = array(), $process = true)
    {
        //tracks the recursive paths
        $this->_load_stack[] = $file;

        $data['__FILE__'] = $file;
        $data['__DIR__'] = dirname($file);

        // get the file contents
        $contents = file_get_contents($file);
        
        // load the contents
        $this->loadString($contents, $data, $process);

        array_pop($this->_load_stack);
        //the path
        $this->_path = end($this->_load_stack);

        return $this;
    }
public function loadFile($file, $data = array(), $process = true)
    {
        //tracks the recursive paths
        $this->_load_stack[] = $file;

        $data['__FILE__'] = $file;
        $data['__DIR__'] = dirname($file);

        // get the file contents
        $contents = file_get_contents($file);
        
        // load the contents
        $this->loadString($contents, $data, $process);

        array_pop($this->_load_stack);
        //the path
        $this->_path = end($this->_load_stack);

        return $this;
    }
public function loadFile ( $ file , $ data = array ( ) , $ process = true ) { //tracks the recursive paths $ this -> _load_stack [ ] = $ file ; $ data [ '__FILE__' ] = $ file ; $ data [ '__DIR__' ] = dirname ( $ file ) ; // get the file contents $ contents = file_get_contents ( $ file ) ; // load the contents $ this -> loadString ( $ contents , $ data , $ process ) ; array_pop ( $ this -> _load_stack ) ; //the path $ this -> _path = end ( $ this -> _load_stack ) ; return $ this ; }
Load a template by path.

@param   string 	The template path
@param	array	An associative array of data to be extracted in local template scope
@param	bool	If TRUE process the data using a tmpl stream. Default TRUE.

@return LibBaseTemplateAbstract
Load a template by path .