예제 #1
0
파일: Module.php 프로젝트: esase/dream-cms
 /**
  * Init application
  *
  * @return void
  */
 public function initApplication()
 {
     // init php settings
     $this->initPhpSettings();
     // init a strict sql mode
     $this->initSqlStrictMode();
     // set the service manager
     ServiceLocatorService::setServiceLocator($this->serviceLocator);
     $request = $this->serviceLocator->get('Request');
     if (!$request instanceof ConsoleRequest) {
         // init session
         $this->initSession();
     }
     $eventManager = LocalizationEvent::getEventManager();
     $eventManager->attach(LocalizationEvent::UNINSTALL, function () {
         ApplicationCacheUtility::clearSettingCache();
     });
 }