/**
  * Get this response.
  * It performs view action.
  *
  * @return Phoenix\Http\Response
  */
 public function getResponse()
 {
     try {
         $this->performViewAction();
     } catch (NoticeException $e) {
         $this->response = ResponseFactory::createResponse($this->response_format);
         $this->response->setException($e);
     } catch (WarningException $e) {
         Logger::log($e, $this->db);
         $this->response = ResponseFactory::createResponse($this->response_format);
         $this->response->setException($e);
     } catch (FailureException $e) {
         Logger::log($e);
         $this->response = ResponseFactory::createResponse($this->response_format);
         $this->response->setException($e);
     } catch (Exception $e) {
         Logger::log($e);
         $this->response = ResponseFactory::createResponse($this->response_format);
         $this->response->setException($e);
     }
     return $this->response;
 }
Beispiel #2
0
 /**
  * Run proxy detection.
  * 
  * @throws Phoenix\Exceptions\FailureException
  * @return void
  */
 private function runProxy()
 {
     try {
         if ($this->isFrontControllerRequest() === true) {
             $this->performFrontControllerRequest();
             return;
         }
         if ($this->isProxyRequest() === true) {
             $this->performProxyRequest();
         }
     } catch (NoticeException $e) {
         $this->response = ResponseFactory::createResponse($this->response_format);
         $this->response->setException($e);
     } catch (WarningException $e) {
         Logger::log($e, $this->db);
         $this->response = ResponseFactory::createResponse($this->response_format);
         $this->response->setException($e);
     } catch (FailureException $e) {
         Logger::log($e);
         $this->response = ResponseFactory::createResponse($this->response_format);
         $this->response->setException($e);
     } catch (Exception $e) {
         Logger::log($e);
         $this->response = ResponseFactory::createResponse($this->response_format);
         $this->response->setException($e);
     }
 }