コード例 #1
0
ファイル: MQTTClient.php プロジェクト: attm2x/m2x-php-mqtt
 /**
  * Checks the MQTTResponse for errors and throws an exception, if
  * no errors are encountered, the MQTTResponse is returned.
  *
  * @param MQTTResponse $response
  * @return HttpResponse
  * @throws M2XException
  */
 protected function handleResponse(MQTTResponse $response)
 {
     $this->lastResponse = $response;
     if ($response->success()) {
         return $response;
     }
     throw new M2XException($response);
 }