| 1 | <?php |
||
| 13 | class SMSRecipient |
||
| 14 | { |
||
| 15 | protected $number; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * SMSRecipient constructor. |
||
| 19 | * |
||
| 20 | * Gets the recipient's phone number and validates |
||
| 21 | * @param string $number |
||
| 22 | */ |
||
| 23 | public function __construct($number = '') |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Validates that the recipient's phone number is 12 digits long (as required by the service) |
||
| 31 | * |
||
| 32 | * @throws \InvalidArgumentException |
||
| 33 | */ |
||
| 34 | protected function validateNumber() |
||
| 40 | |||
| 41 | /** |
||
| 42 | * __toString |
||
| 43 | * @return string |
||
| 44 | */ |
||
| 45 | public function __toString() |
||
| 49 | } |