예제 #1
0
파일: Core.php 프로젝트: projectesIF/Sirius
 /**
  * Reboot.
  *
  * Shutdown the system flushing all event handlers, services and service arguments.
  *
  * @return void
  */
 public function reboot()
 {
     $event = new Zikula_Event('shutdown', $this);
     $this->eventManager->notify($event);
     // flush handlers
     $this->eventManager->flushHandlers();
     // flush all services
     $services = $this->serviceManager->listServices();
     rsort($services);
     foreach ($services as $id) {
         if (!in_array($id, array('zikula', 'zikula.servicemanager', 'zikula.eventmanager'))) {
             $this->serviceManager->unregisterService($id);
         }
     }
     // flush arguments.
     $this->serviceManager->setArguments(array());
     $this->attachedHandlers = array();
     $this->stage = 0;
     $this->bootime = microtime(true);
     $this->attachHandlers($this->handlerDir);
 }
예제 #2
0
 /**
  * Flush and reload handers.
  */
 private function reload()
 {
     $this->eventManager->flushHandlers();
     $this->loadRuntimeHandlers();
 }