/** * 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); }
/** * Flush and reload handers. */ private function reload() { $this->eventManager->flushHandlers(); $this->loadRuntimeHandlers(); }