/**
  * @param HttpRequest $request
  * @return mixed
  */
 public function handleRequest(HttpRequest $request)
 {
     if ($request->getCode() >= HttpRequest::HTTP_CLIENT_ERROR && $request->getCode() < HttpRequest::HTTP_SERVER_ERROR) {
         echo 'Handling client error request';
     } else {
         parent::handleRequest($request);
     }
 }
예제 #2
0
 /**
  * @param HttpRequest $request
  * @return mixed
  */
 public function handleRequest(HttpRequest $request)
 {
     if ($request->getCode() < HttpRequest::HTTP_CLIENT_ERROR && $request->getCode() >= HttpRequest::HTTP_OK) {
         echo 'Handling successful request';
         return true;
     } else {
         parent::handleRequest($request);
     }
 }
 /**
  * @param HttpRequest $request
  * @return mixed
  */
 public function handleRequest(HttpRequest $request)
 {
     if ($request->getCode() >= HttpRequest::HTTP_SERVER_ERROR) {
         echo 'Handling server error request';
     } else {
         parent::handleRequest($request);
     }
 }