| 1 | <?php |
||
| 10 | class Receiver { |
||
| 11 | const TYPE_ID = 'to'; |
||
| 12 | const TYPE_PHONE = 'phone'; |
||
| 13 | const TYPE_EMAIL = 'email'; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @var string |
||
| 17 | */ |
||
| 18 | private $type = self::TYPE_ID; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @var string |
||
| 22 | */ |
||
| 23 | private $value; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @param string $value |
||
| 27 | * @param string $type |
||
| 28 | */ |
||
| 29 | public function __construct($value, $type = self::TYPE_ID) { |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @param string $threemaId |
||
| 35 | * @return $this |
||
| 36 | */ |
||
| 37 | public function setToThreemaId($threemaId) { |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @param string $phoneNo |
||
| 44 | * @return $this |
||
| 45 | */ |
||
| 46 | public function setToPhoneNo($phoneNo) { |
||
| 50 | |||
| 51 | /** |
||
| 52 | * @param string $emailAddress |
||
| 53 | * @return $this |
||
| 54 | */ |
||
| 55 | public function setToEmail($emailAddress) { |
||
| 59 | |||
| 60 | /** |
||
| 61 | * @param string $value |
||
| 62 | * @param string $type |
||
| 63 | * @return $this |
||
| 64 | */ |
||
| 65 | private function setValue($value, $type) { |
||
| 70 | |||
| 71 | /** |
||
| 72 | * @return array |
||
| 73 | * @throws \InvalidArgumentException |
||
| 74 | */ |
||
| 75 | public function getParams() { |
||
| 94 | } |
||
| 95 |