/** * Runs the the FLOW3 Framework by resolving an appropriate Request Handler and passing control to it. * If the Framework is not initialized yet, it will be initialized. * * @return void * @author Robert Lemke <*****@*****.**> * @api */ public function run() { if (!$this->siteLocked) { $requestHandlerResolver = $this->objectManager->getObject('F3\\FLOW3\\MVC\\RequestHandlerResolver'); $requestHandler = $requestHandlerResolver->resolveRequestHandler(); $requestHandler->handleRequest(); if ($this->settings['persistence']['enable'] === TRUE) { $this->objectManager->getObject('F3\\FLOW3\\Persistence\\PersistenceManagerInterface')->persistAll(); } $this->emitFinishedNormalRun(); $this->systemLogger->log('Shutting down ...', LOG_INFO); $this->configurationManager->shutdown(); $this->objectManager->shutdown(); $this->reflectionService->shutdown(); $this->objectManager->getObject('F3\\FLOW3\\Object\\SessionRegistry')->writeDataToSession(); $this->objectManager->getObject('F3\\FLOW3\\Session\\SessionInterface')->close(); } else { header('HTTP/1.1 503 Service Temporarily Unavailable'); readfile('package://FLOW3/Private/Core/LockHoldingStackPage.html'); $this->systemLogger->log('Site is locked, exiting.', LOG_NOTICE); } }