PHP 클래스 SimpleSoftwareIO\SMS\Drivers\NexmoSMS

상속: extends AbstractSMS, implements SimpleSoftwareIO\SMS\Drivers\DriverInterface
파일 보기 프로젝트 열기: simplesoftwareio/simple-sms

보호된 프로퍼티들

프로퍼티 타입 설명
$apiBase string The API's URL.
$apiEnding array The ending of the URL that all requests must have.
$apiKey string The API key.
$apiSecret string The API secret key.
$client GuzzleHttp\Client The Guzzle HTTP Client.

공개 메소드들

메소드 설명
__construct ( Client $client, $apiKey, $apiSecret ) Create the CallFire instance.
checkMessages ( array $options = [] ) : array Checks the server for messages and returns their results.
getMessage ( string | integer $messageId ) : IncomingMessage Gets a single message by it's ID.
receive ( mixed $raw ) : IncomingMessage Receives an incoming message via REST call.
send ( OutgoingMessage $message ) Sends a SMS message.

보호된 메소드들

메소드 설명
getFirstMessage ( $body ) Get the first message in the response from Nexmo
handleError ( $body ) Log the error message which ocurred
hasAResponseMessage ( $body ) Check for a message in the response from Nexmo
hasError ( $body ) : boolean Checks if the transaction has an error
hasProperty ( $message, $property ) : boolean Check if the message from Nexmo has a given property
processReceive ( $rawMessage ) : mixed Creates many IncomingMessage objects and sets all of the properties.

메소드 상세

__construct() 공개 메소드

Create the CallFire instance.
public __construct ( Client $client, $apiKey, $apiSecret )
$client GuzzleHttp\Client The Guzzle Client

checkMessages() 공개 메소드

Checks the server for messages and returns their results.
public checkMessages ( array $options = [] ) : array
$options array
리턴 array

getFirstMessage() 보호된 메소드

Get the first message in the response from Nexmo
protected getFirstMessage ( $body )
$body

getMessage() 공개 메소드

Gets a single message by it's ID.
public getMessage ( string | integer $messageId ) : IncomingMessage
$messageId string | integer
리턴 SimpleSoftwareIO\SMS\IncomingMessage

handleError() 보호된 메소드

Log the error message which ocurred
protected handleError ( $body )
$body

hasAResponseMessage() 보호된 메소드

Check for a message in the response from Nexmo
protected hasAResponseMessage ( $body )
$body

hasError() 보호된 메소드

Checks if the transaction has an error
protected hasError ( $body ) : boolean
$body
리턴 boolean

hasProperty() 보호된 메소드

Check if the message from Nexmo has a given property
protected hasProperty ( $message, $property ) : boolean
$message
$property
리턴 boolean

processReceive() 보호된 메소드

Creates many IncomingMessage objects and sets all of the properties.
protected processReceive ( $rawMessage ) : mixed
$rawMessage
리턴 mixed

receive() 공개 메소드

Receives an incoming message via REST call.
public receive ( mixed $raw ) : IncomingMessage
$raw mixed
리턴 SimpleSoftwareIO\SMS\IncomingMessage

send() 공개 메소드

Sends a SMS message.
public send ( OutgoingMessage $message )
$message SimpleSoftwareIO\SMS\OutgoingMessage

프로퍼티 상세

$apiBase 보호되어 있는 프로퍼티

The API's URL.
protected string $apiBase
리턴 string

$apiEnding 보호되어 있는 프로퍼티

The ending of the URL that all requests must have.
protected array $apiEnding
리턴 array

$apiKey 보호되어 있는 프로퍼티

The API key.
protected string $apiKey
리턴 string

$apiSecret 보호되어 있는 프로퍼티

The API secret key.
protected string $apiSecret
리턴 string

$client 보호되어 있는 프로퍼티

The Guzzle HTTP Client.
protected Client,GuzzleHttp $client
리턴 GuzzleHttp\Client