PHP Class SimpleSoftwareIO\SMS\Drivers\FlowrouteSMS

Inheritance: extends AbstractSMS, implements SimpleSoftwareIO\SMS\Drivers\DriverInterface, use trait SimpleSoftwareIO\SMS\MakesRequests
Mostra file Open project: simplesoftwareio/simple-sms

Protected Properties

Property Type Description
$apiBase string The API's URL.
$client GuzzleHttp\Client The Guzzle HTTP Client.

Public Methods

Method Description
__construct ( Client $client, $accessKey, $secretKey ) Create the Flowroute 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 ) : void Sends a SMS message.

Protected Methods

Method Description
postRequest ( ) : mixed Creates and sends a POST request to the requested URL.
processReceive ( $rawMessage ) : mixed Creates many IncomingMessage objects and sets all of the properties.

Method Details

__construct() public method

Create the Flowroute instance.
public __construct ( Client $client, $accessKey, $secretKey )
$client GuzzleHttp\Client The Guzzle Client

checkMessages() public method

See https://developer.flowroute.com/docs/lookup-a-set-of-messages
public checkMessages ( array $options = [] ) : array
$options array
return array

getMessage() public method

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

postRequest() protected method

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

processReceive() protected method

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

receive() public method

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

send() public method

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

Property Details

$apiBase protected_oe property

The API's URL.
protected string $apiBase
return string

$client protected_oe property

The Guzzle HTTP Client.
protected Client,GuzzleHttp $client
return GuzzleHttp\Client