예제 #1
0
 /**
  * @param Response\Response $response
  */
 private function setSuccess($response)
 {
     $response->setSuccess($response->getHttpStatusCode() === 200);
     if ($response->getSuccess() === false) {
         $response->setApiError($response->getApiResponse('error')['message']);
     }
 }
예제 #2
0
 /**
  * @param Response\Response $response
  */
 private function setSuccess($response)
 {
     $response->setSuccess($response->getHttpStatusCode() === 200);
     if ($response->getSuccess() === false) {
         $message = $response->getApiResponse('message');
         if ($message == null) {
             $message = $response->getHttpStatusCode();
         }
         $response->setApiError($message);
     }
 }
예제 #3
0
 /**
  * @param Response\Response $response
  * @param $success
  */
 private function setSuccess(Response\Response $response, $success)
 {
     $response->setSuccess($success);
     if ($response->getSuccess() === false) {
         $message = $response->getApiResponse('TextResponse') ?: 'Unknown Error';
         $response->setApiError($message);
     }
 }
예제 #4
0
 private function setSuccess(Response\Response $response, $success)
 {
     $response->setSuccess($success);
     if ($response->getSuccess() === false) {
         $response->setApiError($response->getApiResponse('StatusMsg'));
     }
 }