PHP Class SimpleSoftwareIO\SMS\Drivers\TwilioSMS

Inheritance: extends AbstractSMS, implements SimpleSoftwareIO\SMS\Drivers\DriverInterface
Afficher le fichier Open project: simplesoftwareio/simple-sms

Protected Properties

Свойство Type Description
$authToken string Holds the Twilio auth token.
$twilio Services_Twilio The Twilio SDK.
$url string Holds the request URL to verify a Twilio push.
$verify boolean Determines if requests should be checked to be authentic.

Méthodes publiques

Méthode Description
__construct ( Services_Twilio $twilio, $authToken, $url, boolean $verify = false ) Constructs the TwilioSMS 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.

Méthodes protégées

Méthode 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 Twilio.

Method Details

__construct() public méthode

Constructs the TwilioSMS object.
public __construct ( Services_Twilio $twilio, $authToken, $url, boolean $verify = false )
$twilio Services_Twilio
$authToken
$url
$verify boolean

checkMessages() public méthode

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

getMessage() public méthode

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

processReceive() protected méthode

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

receive() public méthode

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

send() public méthode

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

validateRequest() protected méthode

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

Property Details

$authToken protected_oe property

Holds the Twilio auth token.
protected string $authToken
Résultat string

$twilio protected_oe property

The Twilio SDK.
protected Services_Twilio $twilio
Résultat Services_Twilio

$url protected_oe property

Holds the request URL to verify a Twilio push.
protected string $url
Résultat string

$verify protected_oe property

Determines if requests should be checked to be authentic.
protected bool $verify
Résultat boolean