mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 10:11:38 +09:00
Add CoolSMS PHP SDK, and update Composer dependencies
This commit is contained in:
parent
40c43e8fa0
commit
c719fc0500
242 changed files with 3487 additions and 28983 deletions
35
vendor/coolsms/php-sdk/app/Nurigo/Exceptions/CoolsmsServerException.php
vendored
Normal file
35
vendor/coolsms/php-sdk/app/Nurigo/Exceptions/CoolsmsServerException.php
vendored
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
<?php
|
||||
/* vi:set sw=4 ts=4 expandtab: */
|
||||
|
||||
namespace Nurigo\Exceptions;
|
||||
|
||||
/**
|
||||
* @class CoolsmsServerException
|
||||
* @brief Thrown when an Server call returns an exception.
|
||||
*/
|
||||
class CoolsmsServerException extends CoolsmsException
|
||||
{
|
||||
/**
|
||||
* Coolsms API Response data
|
||||
*/
|
||||
protected $response;
|
||||
protected $response_data;
|
||||
|
||||
/**
|
||||
* @brief Make a new SDK Exception with the given result.
|
||||
* @param string $response [required] response from the API server & SDK Client
|
||||
* @param integer $code [required] response code
|
||||
*/
|
||||
public function __construct($response, $code) {
|
||||
$this->response = $response;
|
||||
$response_data = $response;
|
||||
parent::__construct(json_encode($response), $code);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief return json decoded response data
|
||||
*/
|
||||
public function getResponseData() {
|
||||
return $this->response_data;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue