code/libraries/joomlatools/library/template/engine/markdown.php
public function loadFile($url)
    {
        if(!$this->_source)
        {
            //Locate the template
            if (!$file = $this->getObject('template.locator.factory')->locate($url)) {
                throw new InvalidArgumentException(sprintf('The template "%s" cannot be located.', $url));
            }

            if(!$cache_file = $this->isCached($file))
            {
                //Load the template
                if(!$source = file_get_contents($file)) {
                    throw new RuntimeException(sprintf('The template "%s" cannot be loaded.', $file));
                }

                //Compile the template
                if(!$source = $this->_compile($source)) {
                    throw new RuntimeException(sprintf('The template "%s" cannot be compiled.', $file));
                }

                $this->cache($file, $source);
                $this->_source = $source;
            }
            else  $this->_source = include $cache_file;
        }

        return $this;
    }
public function loadFile($url)
    {
        if(!$this->_source)
        {
            //Locate the template
            if (!$file = $this->getObject('template.locator.factory')->locate($url)) {
                throw new InvalidArgumentException(sprintf('The template "%s" cannot be located.', $url));
            }

            if(!$cache_file = $this->isCached($file))
            {
                //Load the template
                if(!$source = file_get_contents($file)) {
                    throw new RuntimeException(sprintf('The template "%s" cannot be loaded.', $file));
                }

                //Compile the template
                if(!$source = $this->_compile($source)) {
                    throw new RuntimeException(sprintf('The template "%s" cannot be compiled.', $file));
                }

                $this->cache($file, $source);
                $this->_source = $source;
            }
            else  $this->_source = include $cache_file;
        }

        return $this;
    }
public function loadFile ( $ url ) { if ( ! $ this -> _source ) { //Locate the template if ( ! $ file = $ this -> getObject ( 'template.locator.factory' ) -> locate ( $ url ) ) { throw new InvalidArgumentException ( sprintf ( 'The template "%s" cannot be located.' , $ url ) ) ; } if ( ! $ cache_file = $ this -> isCached ( $ file ) ) { //Load the template if ( ! $ source = file_get_contents ( $ file ) ) { throw new RuntimeException ( sprintf ( 'The template "%s" cannot be loaded.' , $ file ) ) ; } //Compile the template if ( ! $ source = $ this -> _compile ( $ source ) ) { throw new RuntimeException ( sprintf ( 'The template "%s" cannot be compiled.' , $ file ) ) ; } $ this -> cache ( $ file , $ source ) ; $ this -> _source = $ source ; } else $ this -> _source = include $ cache_file ; } return $ this ; }
Load a template by url

@param   string  $url The template url
@throws InvalidArgumentException If the template could not be located
@throws RuntimeException         If the template could not be loaded
@throws RuntimeException         If the template could not be compiled
@return KTemplateEngineMarkdown
Load a template by url