1 | <?php |
||
12 | final class CitySearchBuilder |
||
13 | { |
||
14 | /** |
||
15 | * @var array |
||
16 | */ |
||
17 | private $query; |
||
18 | |||
19 | private function __construct() |
||
25 | |||
26 | /** |
||
27 | * @param int $page |
||
28 | * |
||
29 | * @return CitySearchBuilder |
||
30 | */ |
||
31 | public function page(int $page): self |
||
37 | |||
38 | /** |
||
39 | * @param string $name |
||
40 | * |
||
41 | * @return CitySearchBuilder |
||
42 | */ |
||
43 | public function withName(string $name): self |
||
49 | |||
50 | /** |
||
51 | * @param string $country |
||
52 | * |
||
53 | * @return CitySearchBuilder |
||
54 | */ |
||
55 | public function withCountry(string $country): self |
||
61 | |||
62 | /** |
||
63 | * @param string $name |
||
64 | * |
||
65 | * @return CitySearchBuilder |
||
66 | */ |
||
67 | public function withState(string $name): self |
||
73 | |||
74 | /** |
||
75 | * @param string $code |
||
76 | * |
||
77 | * @return CitySearchBuilder |
||
78 | */ |
||
79 | public function withStateCode(string $code): self |
||
85 | |||
86 | /** |
||
87 | * @return array |
||
88 | */ |
||
89 | public function getQuery(): array |
||
93 | } |
||
94 |