| 1 | <?php |
||
| 5 | class LobAddress |
||
| 6 | { |
||
| 7 | /** @var string */ |
||
| 8 | protected $line1 = 'postcards'; |
||
| 9 | |||
| 10 | /** @var string */ |
||
| 11 | protected $line2; |
||
| 12 | |||
| 13 | /** @var string */ |
||
| 14 | protected $country; |
||
| 15 | |||
| 16 | /** @var string */ |
||
| 17 | protected $city; |
||
| 18 | |||
| 19 | /** @var string */ |
||
| 20 | protected $state; |
||
| 21 | |||
| 22 | /** @var string */ |
||
| 23 | protected $zip; |
||
| 24 | |||
| 25 | /** @var string */ |
||
| 26 | protected $name = 'name'; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @param string $line1 |
||
| 30 | * @param string $country |
||
| 31 | * |
||
| 32 | * @return static |
||
| 33 | */ |
||
| 34 | public static function create($line1, $country = 'US') |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @param string $line1 |
||
| 41 | * @param string $country |
||
| 42 | */ |
||
| 43 | public function __construct($line1, $country = 'US') |
||
| 49 | |||
| 50 | /** |
||
| 51 | * @param string $line2 |
||
| 52 | * |
||
| 53 | * @return $this |
||
| 54 | */ |
||
| 55 | public function line2($line2) |
||
| 61 | |||
| 62 | /** |
||
| 63 | * @param string $country |
||
| 64 | * |
||
| 65 | * @return $this |
||
| 66 | */ |
||
| 67 | public function country($country) |
||
| 73 | |||
| 74 | /** |
||
| 75 | * @param string $city |
||
| 76 | * |
||
| 77 | * @return $this |
||
| 78 | */ |
||
| 79 | public function city($city) |
||
| 85 | |||
| 86 | /** |
||
| 87 | * @param string $state |
||
| 88 | * |
||
| 89 | * @return $this |
||
| 90 | */ |
||
| 91 | public function state($state) |
||
| 97 | |||
| 98 | /** |
||
| 99 | * @param string $zip |
||
| 100 | * |
||
| 101 | * @return $this |
||
| 102 | */ |
||
| 103 | public function zip($zip) |
||
| 109 | |||
| 110 | /** |
||
| 111 | * @param string $name |
||
| 112 | * |
||
| 113 | * @return $this |
||
| 114 | */ |
||
| 115 | public function name($name) |
||
| 121 | |||
| 122 | /** |
||
| 123 | * Get an array representation of the address. |
||
| 124 | * |
||
| 125 | * @return array |
||
| 126 | */ |
||
| 127 | public function toArray() |
||
| 139 | } |
||
| 140 |