public function init() { $this->iaDb = $this->factory('db'); $this->factory(array('sanitize', 'validate', 'language', 'users')); $this->iaView = $this->factory('view'); $this->iaCache = $this->factory('cache'); iaSystem::renderTime('core', 'Basic Classes Initialized'); $this->getConfig(); iaSystem::renderTime('core', 'Configuration Loaded'); iaSystem::setDebugMode(); $this->_parseUrl(); setlocale(LC_COLLATE | LC_TIME, $this->get('locale')); // we can only load strings when we know if a specific language is requested based on URL iaLanguage::load($this->iaView->language); $this->_fetchHooks(); iaSystem::renderTime('core', 'Hooks Loaded'); $this->startHook('phpCoreUrlRewrite'); $this->_setConstants(); $this->startHook('init'); $this->_authorize(); $this->_forgeryCheck(); $this->getCustomConfig(); $this->startHook('phpCoreBeforePageDefine'); $this->iaView->definePage(); $this->iaView->loadSmarty(); $this->startHook('bootstrap'); $this->_defineModule(); $this->iaView->defineOutput(); $this->_checkPermissions(); $this->_executeModule(); $this->startHook('phpCoreBeforeJsCache'); $this->iaCache->createJsCache(); if (self::ACCESS_FRONT == $this->getAccessType() && iaView::REQUEST_HTML == $this->iaView->getRequestType() && iaView::PAGE_ERROR != $this->iaView->name()) { $this->factory('users')->registerVisitor(); } $this->startHook('phpCoreBeforePageDisplay'); $this->iaView->output(); $this->startHook('finalize'); }