Beispiel #1
0
 /**
  * @param Oxygen_Http_Request          $request
  * @param Oxygen_Util_RequestData|null $requestData
  * @param                              $exception
  *
  * @return null|Oxygen_Http_Response
  */
 private function handleException(Oxygen_Http_Request $request, $requestData, $exception)
 {
     $exceptionEvent = new Oxygen_Event_ExceptionEvent($request, $requestData, $exception);
     $this->container->getDispatcher()->dispatch(Oxygen_Event_Events::EXCEPTION, $exceptionEvent);
     if (!$exceptionEvent->hasResponse()) {
         throw new RuntimeException('The response was not set after an exception.');
     }
     return $exceptionEvent->getResponse();
 }
Beispiel #2
0
 public static function createFromContainer(Oxygen_Container_Interface $container)
 {
     return new self($container->getSessionManager());
 }