/** * Executes the framework. This executes the pre and post execution events. * Between these two events we call the correct request event. The * routing table from the RouteManager returns the needed event name. * * @access public */ public function execute() { // Execute the before execution event $this->runtimeManager->executeEvent('\\Zepi\\Turbo\\Event\\BeforeExecution'); // Get the event name for the request and execute the event $eventName = $this->routeManager->getEventNameForRoute($this->request); $eventName = $this->runtimeManager->executeFilter('\\Zepi\\Turbo\\Filter\\VerifyEventName', $eventName); if ($eventName !== false && $eventName != '') { $this->runtimeManager->executeEvent($eventName); } else { $this->runtimeManager->executeEvent('\\Zepi\\Turbo\\Event\\RouteNotFound'); } // Execute the after execution event $this->runtimeManager->executeEvent('\\Zepi\\Turbo\\Event\\AfterExecution'); // Finalize the output $this->runtimeManager->executeEvent('\\Zepi\\Turbo\\Event\\FinalizeOutput'); // Execute the before output event $this->runtimeManager->executeEvent('\\Zepi\\Turbo\\Event\\BeforeOutput'); // Print the output echo $this->response->getOutput(); // Execute the after output event $this->runtimeManager->executeEvent('\\Zepi\\Turbo\\Event\\AfterOutput'); }