code/libraries/joomlatools/library/template/engine/twig.php
protected function _load($url)
    {
        $file = $this->_locate($url);
        $type = pathinfo($file, PATHINFO_EXTENSION);

        if(in_array($type, $this->getFileTypes()))
        {
            if(!$this->_source = file_get_contents($file)) {
                throw new RuntimeException(sprintf('The template "%s" cannot be loaded.', $file));
            }
        }
        else $this->_source = $this->getTemplate()->loadFile($file)->render($this->getData());

        return $this->_source;
    }
protected function _load($url)
    {
        $file = $this->_locate($url);
        $type = pathinfo($file, PATHINFO_EXTENSION);

        if(in_array($type, $this->getFileTypes()))
        {
            if(!$this->_source = file_get_contents($file)) {
                throw new RuntimeException(sprintf('The template "%s" cannot be loaded.', $file));
            }
        }
        else $this->_source = $this->getTemplate()->loadFile($file)->render($this->getData());

        return $this->_source;
    }
protected function _load ( $ url ) { $ file = $ this -> _locate ( $ url ) ; $ type = pathinfo ( $ file , PATHINFO_EXTENSION ) ; if ( in_array ( $ type , $ this -> getFileTypes ( ) ) ) { if ( ! $ this -> _source = file_get_contents ( $ file ) ) { throw new RuntimeException ( sprintf ( 'The template "%s" cannot be loaded.' , $ file ) ) ; } } else $ this -> _source = $ this -> getTemplate ( ) -> loadFile ( $ file ) -> render ( $ this -> getData ( ) ) ; return $ this -> _source ; }
Load the template source

@param   string  $url The template url
@throws \RuntimeException         If the template could not be loaded
@return string   The template source
Load the template source