public function view() { /** * Determine called Pathname */ $path = $this->getRequestPath(); if (strpos($path, $this->apiHandler->getBasePath()) === 0) { $this->apiHandler->processCall($path); return; } /** * Get the Widget to use for this Request from the Widget-Repository */ $widget = Xinc_Gui_Widget_Repository::getInstance()->getWidgetForPath($path); if (!$widget instanceof Xinc_Gui_Widget_Interface) { /** * Try Api Handler */ header('HTTP/1.0 404 Not Found'); die; } /** * Start session */ session_start(); if (!isset($_SESSION['Xinc_Gui_Handler'])) { $_SESSION['Xinc_Gui_Handler'] = 1; /** * Trigger the session_start event on the widget */ $widget->handleEvent(Xinc_Gui_Event::SESSION_START); } /** * trigger the page-load event */ try { $widget->handleEvent(Xinc_Gui_Event::PAGE_LOAD); } catch (Exception $e) { if ($widget->hasExceptionHandler()) { $widget->handleException($e); } else { $this->handleException($e); } } }