PHP 클래스 SimpleSoftwareIO\SMS\Drivers\ZenviaSMS

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

보호된 프로퍼티들

프로퍼티 타입 설명
$apiBase string The API's URL.
$callbackOption string The callbackOption to receive message delivery notifications.
$client GuzzleHttp\Client The Guzzle HTTP Client.

공개 메소드들

메소드 설명
__construct ( Client $client, $accountKey, $passCode, string $callbackOption = 'NONE' ) ZenviaSMS constructor.
checkMessages ( array $options = [] ) : array Checks the server for messages and returns their results.
getMessage ( integer | string $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.

보호된 메소드들

메소드 설명
getRequest ( ) : mixed Creates and sends a GET request to the requested URL.
postRequest ( ) : mixed Creates and sends a POST request to the requested URL.
processReceive ( $rawMessage ) : IncomingMessage Parse a response from messageId check and returns a Message.

비공개 메소드들

메소드 설명
generateMessageBody ( $from, $number, $composeMessage ) : array Message body generator based on the attributes.

메소드 상세

__construct() 공개 메소드

ZenviaSMS constructor.
public __construct ( Client $client, $accountKey, $passCode, string $callbackOption = 'NONE' )
$client GuzzleHttp\Client
$accountKey
$passCode
$callbackOption string

checkMessages() 공개 메소드

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

getMessage() 공개 메소드

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

getRequest() 보호된 메소드

Creates and sends a GET request to the requested URL.
protected getRequest ( ) : mixed
리턴 mixed

postRequest() 보호된 메소드

Creates and sends a POST request to the requested URL.
protected postRequest ( ) : mixed
리턴 mixed

processReceive() 보호된 메소드

Parse a response from messageId check and returns a Message.
protected processReceive ( $rawMessage ) : IncomingMessage
$rawMessage
리턴 SimpleSoftwareIO\SMS\IncomingMessage

receive() 공개 메소드

Contact Zenvia Support to get this enabled to your account before using.
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

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

The callbackOption to receive message delivery notifications.
protected string $callbackOption
리턴 string

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

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