public function fetch($tpl = null)
    {
        // make sure we have a template source to work with
        if (is_null($tpl)) {
            $tpl = $this->configList[self::TPL_FILE];
        }
        $result = $this->getPathToTemplate($tpl);

        if (! $result || $this->isError($result)) { //if no path
            return $result;
        } else {
            $this->configList[self::FETCHED_TPL_FILE] = $result;
            unset($result);
            unset($tpl);

            // buffer output so we can return it instead of displaying.
            ob_start();

            include $this->configList[self::FETCHED_TPL_FILE];
            $this->configList[self::FETCHED_TPL_FILE] = null; //flush fetched script value

            return ob_get_clean();
        }
    }
public function fetch($tpl = null)
    {
        // make sure we have a template source to work with
        if (is_null($tpl)) {
            $tpl = $this->configList[self::TPL_FILE];
        }
        $result = $this->getPathToTemplate($tpl);

        if (! $result || $this->isError($result)) { //if no path
            return $result;
        } else {
            $this->configList[self::FETCHED_TPL_FILE] = $result;
            unset($result);
            unset($tpl);

            // buffer output so we can return it instead of displaying.
            ob_start();

            include $this->configList[self::FETCHED_TPL_FILE];
            $this->configList[self::FETCHED_TPL_FILE] = null; //flush fetched script value

            return ob_get_clean();
        }
    }
public function fetch ( $ tpl = null ) { // make sure we have a template source to work with if ( is_null ( $ tpl ) ) { $ tpl = $ this -> configList [ self :: TPL_FILE ] ; } $ result = $ this -> getPathToTemplate ( $ tpl ) ; if ( ! $ result || $ this -> isError ( $ result ) ) { //if no path return $ result ; } else { $ this -> configList [ self :: FETCHED_TPL_FILE ] = $ result ; unset ( $ result ) ; unset ( $ tpl ) ; // buffer output so we can return it instead of displaying. ob_start ( ) ; include $ this -> configList [ self :: FETCHED_TPL_FILE ] ; $ this -> configList [ self :: FETCHED_TPL_FILE ] = null ; //flush fetched script value return ob_get_clean ( ) ; } }
Gets & executes a template source.

@access public
@param string $tpl The template to process; if null, uses the
default template set with setTemplate().
@return mixed The template output string, or a SavantPHPerror.
Gets & executes a template source .