1 | <?php |
||
23 | class Address extends Api |
||
24 | { |
||
25 | /** |
||
26 | * The response array. |
||
27 | * |
||
28 | * @var array|null |
||
29 | */ |
||
30 | protected $response = null; |
||
31 | |||
32 | /** |
||
33 | * The cache directory. |
||
34 | * |
||
35 | * @var string|null |
||
36 | */ |
||
37 | protected $cacheDir = __DIR__ . '/cache/'; |
||
38 | |||
39 | /** |
||
40 | * The cache file name. |
||
41 | * |
||
42 | * @var string|null |
||
43 | */ |
||
44 | protected $file = __DIR__ . '/cache/' . 'address_'; |
||
45 | |||
46 | /** |
||
47 | * Returns a list of all the addresses from a string. |
||
48 | * |
||
49 | * @param string $address |
||
50 | * @param int $page |
||
51 | * @param string $lang |
||
52 | * @return Address |
||
53 | */ |
||
54 | public function find($address, $page = 1, $lang = 'A') |
||
104 | |||
105 | /** |
||
106 | * Returns all the addresses found. |
||
107 | * |
||
108 | * @return array |
||
109 | */ |
||
110 | public function all() |
||
116 | |||
117 | /** |
||
118 | * Returns all the addresses found. |
||
119 | * |
||
120 | * @return array |
||
121 | */ |
||
122 | public function get() |
||
126 | |||
127 | /** |
||
128 | * Verify an address. |
||
129 | * |
||
130 | * @param int $buildingNumber |
||
131 | * @param int $zip |
||
132 | * @param int $additionalNumber |
||
133 | * @param string $lang |
||
134 | * @return array |
||
135 | */ |
||
136 | public function verify($buildingNumber, $zip, $additionalNumber, $lang = 'A') |
||
150 | |||
151 | /** |
||
152 | * Check if find() method was called first. |
||
153 | * |
||
154 | * @return void |
||
155 | * @throws \BadMethodCallException |
||
156 | */ |
||
157 | protected function check() |
||
163 | } |
||
164 |