// Initialize debug $GLOBALS['debug'] = Debug::getInstance(); //Initialize sessions $GLOBALS['session'] = Session::getInstance(); //Initialize Smarty $GLOBALS['smarty'] = new Smarty(); $GLOBALS['smarty']->muteExpectedErrors(); $GLOBALS['smarty']->error_reporting = E_ALL & ~E_NOTICE & ~E_WARNING; $GLOBALS['smarty']->compile_dir = CC_SKIN_CACHE_DIR; $GLOBALS['smarty']->config_dir = CC_SKIN_CACHE_DIR; $GLOBALS['smarty']->cache_dir = CC_SKIN_CACHE_DIR; $GLOBALS['smarty']->debugging = false; //Initialize language $GLOBALS['language'] = Language::getInstance(); //Initialize hooks $GLOBALS['hooks'] = HookLoader::getInstance(); //Initialize SEO $GLOBALS['seo'] = SEO::getInstance(); if (isset($_GET['seo_path']) && !empty($_GET['seo_path'])) { $_GET['seo_path'] = preg_replace('/(\\/\\~[a-z0-9]{1,}\\/)/', '', $_GET['seo_path']); // Remove /~username/ from seo_path $GLOBALS['seo']->getItem($_GET['seo_path']); } //Initialize SSL $GLOBALS['ssl'] = SSL::getInstance(); //Initialize GUI $GLOBALS['gui'] = GUI::getInstance(); //Initialize Taxes $GLOBALS['tax'] = Tax::getInstance(); //Initialize catalogue $GLOBALS['catalogue'] = Catalogue::getInstance();
/** * Setup the instance (singleton) * * @return HookLoader */ public static function getInstance() { if (!self::$_instance instanceof self) { self::$_instance = new self(); } return self::$_instance; }