/** * TuiyoInitiate::TuiyoInitiate() * Application Initiation metod * @return */ public function TuiyoInitiate() { TuiyoInitiate::_setDefines(); TuiyoInitiate::_loadErrorHandler(); TuiyoInitiate::_localize(); jimport('joomla.cache.cache'); $conf =& JFactory::getConfig(); $options = array('defaultgroup' => 'com_tuiyo', 'cachebase' => $conf->getValue('config.cache_path'), 'lifetime' => $conf->getValue('config.cachetime') * 60, 'language' => $conf->getValue('config.language'), 'storage' => 'file'); $cache = new JCache($options); $cache->setCaching($conf->getValue('config.caching')); $GLOBALS['TUIYO_CACHE'] = $cache; //Load the parameters for the site! if (class_exists('JSite')) { TuiyoInitiate::_params(); } //load all the plugins TuiyoInitiate::registerPlugins(); }
} /** * Tuiyo Interface */ JRequest::setVar('tmpl', 'component'); /** * Main Requires */ require_once TUIYO_PATH . DS . 'helpers' . DS . 'defines.php'; require_once TUIYO_PATH . DS . 'helpers' . DS . 'loader.php'; require_once TUIYO_PATH . DS . 'helpers' . DS . 'timer.php'; require_once TUIYO_PATH . DS . 'helpers' . DS . 'initiate.php'; /** * Initiate the Application Interface */ $START =& TuiyoInitiate::start(); $DOCU =& $GLOBALS['API']->get('document'); // Require specific controller if requested require_once TUIYO_ADMIN_PATH . DS . 'controllers' . DS . 'tuiyo.php'; /** * Prepare the controllers **/ $controller = JRequest::getWord('context', ''); $path = TUIYO_ADMIN_PATH . DS . 'controllers' . DS . strtolower($controller) . '.php'; if (file_exists($path)) { require_once $path; } else { $controller = 'Tuiyo'; } // Create the controller $classname = 'TuiyoController' . ucfirst($controller);