Свойство | Type | Description | |
---|---|---|---|
$apiBase | string | The API's URL. | |
$callbackOption | string | The callbackOption to receive message delivery notifications. | |
$client | The Guzzle HTTP Client. |
Méthode | Description | |
---|---|---|
__construct ( |
ZenviaSMS constructor. | |
checkMessages ( array $options = [] ) : array | Checks the server for messages and returns their results. | |
getMessage ( integer | string $messageId ) : |
Gets a single message by it's ID. | |
receive ( mixed $raw ) : |
Receives an incoming message via REST call. | |
send ( |
Sends a SMS message. |
Méthode | Description | |
---|---|---|
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 ) : |
Parse a response from messageId check and returns a Message. |
Méthode | Description | |
---|---|---|
generateMessageBody ( $from, $number, $composeMessage ) : array | Message body generator based on the attributes. |
public __construct ( |
||
$client | ||
$accountKey | ||
$passCode | ||
$callbackOption | string |
public checkMessages ( array $options = [] ) : array | ||
$options | array | |
Résultat | array |
public getMessage ( integer | string $messageId ) : |
||
$messageId | integer | string | |
Résultat |
protected getRequest ( ) : mixed | ||
Résultat | mixed |
protected postRequest ( ) : mixed | ||
Résultat | mixed |
protected processReceive ( $rawMessage ) : |
||
$rawMessage | ||
Résultat |
public send ( |
||
$message |
protected string $callbackOption | ||
Résultat | string |