public function setFrom($number)
| $number |
| wild |
public function getFrom()
| wild |
public function setTo($number)
| $number |
| wild |
public function getTo()
| wild |
public function setBody($body)
| $body |
| wild |
public function getBody()
| wild |
abstract public function getProviderShortName()
16 characters or less, to be used in database columns and exposed to administrators during configuration directly.
| wild |
abstract public function send()
Send the message. Generally, this means connecting to some service and handing data to it. SMS APIs are generally asynchronous, so truly determining success or failure is probably impossible synchronously.
That said, if the adapter determines that the SMS will never be deliverable, or there is some other known failure, it should throw an exception.
| null |
abstract public function getSMSDataFromResult($result)
Most (all?) SMS APIs are asynchronous, but some do send back some initial information. Use this hook to determine what the updated sentStatus should be and what the provider is using for an SMS ID, as well as throw exceptions if there are any failures.
| $result |
| array | Tuple of ($sms_id and $sent_status) |
abstract public function pollSMSSentStatus($sms)
Due to the asynchronous nature of sending SMS messages, it can be necessary to poll the provider regarding the sent status of a given sms.
For now, this *MUST* be implemented and *MUST* work.
| PhabricatorSMS | $sms |
| wild |
public static function sendSMS($to_numbers, $body)
Convenience function to handle sending an SMS.
| array | $to_numbers | |
| $body |
| wild |