| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | interface SmsHandlerInterface |
||
| 18 | { |
||
| 19 | |||
| 20 | |||
| 21 | /** |
||
| 22 | * Set the default From address or number |
||
| 23 | * @param string $from |
||
| 24 | */ |
||
| 25 | public function setDefaultFrom($from); |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Lookup, validate a number and convert to E.164 |
||
| 29 | * @param string $number Phone number in any format |
||
| 30 | * @param string $countryCode ISO Country code |
||
| 31 | * @return string Validated number in E.164 format |
||
| 32 | * @throws Apiary\SmsLoginProvider\Exception\InvalidPhoneNumberException |
||
| 33 | */ |
||
| 34 | public function lookupNumber($number, $countryCode); |
||
| 35 | |||
| 36 | |||
| 37 | /** |
||
| 38 | * Send a single SMS message |
||
| 39 | * @param $from |
||
| 40 | * @param $to |
||
| 41 | * @param $body |
||
| 42 | * @return string identifier of sent message |
||
| 43 | * @throws Apiary\SmsLoginProvider\Exception\SMSSendFailException |
||
| 44 | */ |
||
| 45 | public function sendSMS($to, $body, $from = null); |
||
| 46 | |||
| 47 | } |
||
|
|
Below you find some examples: