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();
        }
    }