PHP Class SimpleSoftwareIO\SMS\Drivers\PlivoSMS

Inheritance: extends AbstractSMS, implements SimpleSoftwareIO\SMS\Drivers\DriverInterface
Datei anzeigen Open project: simplesoftwareio/simple-sms

Protected Properties

Property Type Description
$authToken The authentication token
$plivo Plivo\RestAPI The Plivo Library.

Public Methods

Method Description
__construct ( $authId, $authToken ) Constructs the PlivoSMS object.
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.

Protected Methods

Method Description
processReceive ( $raw ) Processing the raw information from a request and inputs it into the IncomingMessage object.
validateRequest ( ) Checks if a message is authentic from Plivo.

Method Details

__construct() public method

Constructs the PlivoSMS object.
public __construct ( $authId, $authToken )
$authId
$authToken

checkMessages() public method

Checks the server for messages and returns their results.
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

processReceive() protected method

Processing the raw information from a request and inputs it into the IncomingMessage object.
protected processReceive ( $raw )
$raw

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 )
$message SimpleSoftwareIO\SMS\OutgoingMessage

validateRequest() protected method

Checks if a message is authentic from Plivo.
protected validateRequest ( )

Property Details

$authToken protected_oe property

The authentication token
protected $authToken

$plivo protected_oe property

The Plivo Library.
protected RestAPI,Plivo $plivo
return Plivo\RestAPI