/** * protected method to create the template object * If no directory ($dir) is secified, the engine * will use the global TEMPLATE_DIR * * @param string $dir The optional template directory * @return object patTemplate */ protected function &createPatTemplate($dir = null) { global $option, $mosConfig_absolute_path; require_once 'patTemplate/patTemplate.php'; $pat =& patFactory::createTemplate($option, true, false); if ($dir != null) { $pat->setRoot($dir . '/'); } else { $pat->setRoot(TEMPLATE_DIR . '/'); } $pat->applyInputFilter('ShortModifiers'); return $pat; }
/** * cria template para a propria classe usar * @access private * @return patTemplate */ function &_createTemplate() { global $option, $mosConfig_absolute_path; if (defined('_VALID_MOS')) { require_once $mosConfig_absolute_path . '/includes/patTemplate/patTemplate.php'; $tmpl =& patFactory::createTemplate(); $tmpl->setRoot(dirname(__FILE__) . '/templates'); } else { require_once $this->classSelfPath . '/classes/pat/patErrorManager.php'; require_once $this->classSelfPath . '/classes/pat/patTemplate.php'; $tmpl = new patTemplate(); $tmpl->setNamespace("mos"); } $this->_objTmpl = $tmpl; return $tmpl; }