| 1 | <?php |
||
| 12 | class Contact implements CreatableFromArray |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @var string |
||
| 16 | */ |
||
| 17 | private $name; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var string |
||
| 21 | */ |
||
| 22 | private $email; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @var string |
||
| 26 | */ |
||
| 27 | private $phone; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @var string |
||
| 31 | */ |
||
| 32 | private $www; |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @return string |
||
| 36 | */ |
||
| 37 | public function getName() |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @param string $name |
||
| 44 | * |
||
| 45 | * @return Contact |
||
| 46 | */ |
||
| 47 | public function withName(string $name) |
||
| 54 | |||
| 55 | /** |
||
| 56 | * @return string |
||
| 57 | */ |
||
| 58 | public function getEmail() |
||
| 62 | |||
| 63 | /** |
||
| 64 | * @param string $email |
||
| 65 | * |
||
| 66 | * @return Contact |
||
| 67 | */ |
||
| 68 | public function setEmail(string $email) |
||
| 75 | |||
| 76 | /** |
||
| 77 | * @return string |
||
| 78 | */ |
||
| 79 | public function getPhone() |
||
| 83 | |||
| 84 | /** |
||
| 85 | * @param string $phone |
||
| 86 | * |
||
| 87 | * @return Contact |
||
| 88 | */ |
||
| 89 | public function setPhone(string $phone) |
||
| 96 | |||
| 97 | /** |
||
| 98 | * @return string |
||
| 99 | */ |
||
| 100 | public function getWww(): string |
||
| 104 | |||
| 105 | /** |
||
| 106 | * @param string $www |
||
| 107 | * |
||
| 108 | * @return Contact |
||
| 109 | */ |
||
| 110 | public function setWww(string $www) |
||
| 117 | |||
| 118 | 1 | public function toArray() |
|
| 137 | |||
| 138 | /** |
||
| 139 | * Create an API response object from the HTTP response from the API server. |
||
| 140 | * |
||
| 141 | * @param array $data |
||
| 142 | * |
||
| 143 | * @return Contact |
||
| 144 | */ |
||
| 145 | 2 | public static function createFromArray(array $data) |
|
| 155 | } |
||
| 156 |