Exemplo n.º 1
0
 /**
  * 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();
     });
 }