@@ -54,7 +54,7 @@ |
||
54 | 54 | foreach ($this->typeCheck as $field_name => $field_type) { |
55 | 55 | if (empty($args[$field_name]) || is_null($args[$field_name])) { |
56 | 56 | if ($this->isFieldRequired($field_name)) { |
57 | - $this->addError('Missing "' . $field_name . '" in ' . static::class); |
|
57 | + $this->addError('Missing "'.$field_name.'" in '.static::class); |
|
58 | 58 | } |
59 | 59 | } else { |
60 | 60 | $this->$field_name = $this->parseFieldValue($field_type, $args[$field_name]); |
@@ -20,173 +20,173 @@ |
||
20 | 20 | abstract class AbstractObject |
21 | 21 | { |
22 | 22 | |
23 | - /** |
|
24 | - * @var array |
|
25 | - */ |
|
26 | - protected $typeCheck = []; |
|
27 | - |
|
28 | - /** |
|
29 | - * @var array |
|
30 | - */ |
|
31 | - protected $required = []; |
|
32 | - |
|
33 | - /** |
|
34 | - * @var array |
|
35 | - */ |
|
36 | - protected $errors = []; |
|
37 | - |
|
38 | - /** |
|
39 | - * AbstractObject constructor. |
|
40 | - * |
|
41 | - * @param array $args |
|
42 | - */ |
|
43 | - public function __construct(?array $args = []) |
|
44 | - { |
|
45 | - |
|
46 | - if (is_null($args)) { |
|
47 | - $args = []; |
|
48 | - } |
|
49 | - |
|
50 | - $this->setArgs($args); |
|
51 | - } |
|
52 | - |
|
53 | - /** |
|
54 | - * @param array $args |
|
55 | - * |
|
56 | - * @throws Exception |
|
57 | - */ |
|
58 | - protected function setArgs(array $args) |
|
59 | - { |
|
60 | - |
|
61 | - foreach ($this->typeCheck as $field_name => $field_type) { |
|
62 | - if (empty($args[$field_name]) || is_null($args[$field_name])) { |
|
63 | - if ($this->isFieldRequired($field_name)) { |
|
64 | - $this->addError('Missing "' . $field_name . '" in ' . static::class); |
|
65 | - } |
|
66 | - } else { |
|
67 | - $this->$field_name = $this->parseFieldValue($field_type, $args[$field_name]); |
|
68 | - } |
|
69 | - } |
|
70 | - $this->throwErrors(); |
|
71 | - } |
|
72 | - |
|
73 | - /** |
|
74 | - * @param string $field_name |
|
75 | - * |
|
76 | - * @return bool |
|
77 | - */ |
|
78 | - protected function isFieldRequired(string $field_name): bool |
|
79 | - { |
|
80 | - |
|
81 | - return in_array($field_name, $this->required); |
|
82 | - } |
|
83 | - |
|
84 | - /** |
|
85 | - * @param string $error |
|
86 | - * |
|
87 | - * @return array |
|
88 | - */ |
|
89 | - protected function addError(string $error): array |
|
90 | - { |
|
91 | - |
|
92 | - array_push($this->errors, $error); |
|
93 | - |
|
94 | - return $this->errors; |
|
95 | - } |
|
96 | - |
|
97 | - /** |
|
98 | - * @param string $field_type |
|
99 | - * @param string $field_value |
|
100 | - * |
|
101 | - * @return mixed |
|
102 | - */ |
|
103 | - protected function parseFieldValue(string $field_type, $field_value) |
|
104 | - { |
|
105 | - |
|
106 | - switch ($field_type) { |
|
107 | - case 'string': |
|
108 | - case 'int': |
|
109 | - case 'float': |
|
110 | - case 'array': |
|
111 | - case 'json': |
|
112 | - return $field_value; |
|
113 | - default: |
|
114 | - return ($field_value instanceof $field_type) ? $field_value : new $field_type($field_value); |
|
115 | - } |
|
116 | - } |
|
117 | - |
|
118 | - /** |
|
119 | - * @throws Exception |
|
120 | - */ |
|
121 | - protected function throwErrors() |
|
122 | - { |
|
123 | - |
|
124 | - if (count($this->errors)) { |
|
125 | - throw new Exception(implode(', ', $this->errors)); |
|
126 | - } |
|
127 | - } |
|
128 | - |
|
129 | - /** |
|
130 | - * @return string |
|
131 | - */ |
|
132 | - public function toJson(): string |
|
133 | - { |
|
134 | - |
|
135 | - return json_encode($this->toArray()); |
|
136 | - } |
|
137 | - |
|
138 | - /** |
|
139 | - * @return array |
|
140 | - */ |
|
141 | - public function toArray(): array |
|
142 | - { |
|
143 | - |
|
144 | - $fields = get_object_vars($this); |
|
145 | - |
|
146 | - foreach ($fields as $field_name => $field_value) { |
|
147 | - |
|
148 | - if (!is_scalar($field_value) && method_exists($field_value, 'toJson')) { |
|
149 | - $fields[$field_name] = $field_value->toArray(); |
|
150 | - } |
|
151 | - } |
|
152 | - |
|
153 | - return $fields; |
|
154 | - } |
|
155 | - |
|
156 | - /** |
|
157 | - * @return string |
|
158 | - */ |
|
159 | - public function __toString(): string |
|
160 | - { |
|
161 | - |
|
162 | - return implode(',', $this->toArray()); |
|
163 | - } |
|
164 | - |
|
165 | - /** |
|
166 | - * @param $name |
|
167 | - * @param $arguments |
|
168 | - * |
|
169 | - * @return mixed |
|
170 | - */ |
|
171 | - public function __call($name, $arguments) |
|
172 | - { |
|
173 | - |
|
174 | - preg_match('/(?<=(g|s)et)([A-Za-z0-9])\w+/', $name, $match); |
|
175 | - |
|
176 | - $camel_field = (empty($match[0])) ? '' : $match[0]; |
|
177 | - |
|
178 | - $snake_field = camel2Snake($camel_field); |
|
179 | - |
|
180 | - $field_type = (empty($this->typeCheck[$snake_field])) ? null : $this->typeCheck[$snake_field]; |
|
181 | - |
|
182 | - if (!empty($match[1]) && $field_type) { |
|
183 | - switch ($match[1]) { |
|
184 | - case 's': |
|
185 | - return $this->$snake_field = $this->parseFieldValue($field_type, current($arguments)); |
|
186 | - case 'g': |
|
187 | - return $this->$snake_field; |
|
188 | - } |
|
189 | - } |
|
190 | - } |
|
23 | + /** |
|
24 | + * @var array |
|
25 | + */ |
|
26 | + protected $typeCheck = []; |
|
27 | + |
|
28 | + /** |
|
29 | + * @var array |
|
30 | + */ |
|
31 | + protected $required = []; |
|
32 | + |
|
33 | + /** |
|
34 | + * @var array |
|
35 | + */ |
|
36 | + protected $errors = []; |
|
37 | + |
|
38 | + /** |
|
39 | + * AbstractObject constructor. |
|
40 | + * |
|
41 | + * @param array $args |
|
42 | + */ |
|
43 | + public function __construct(?array $args = []) |
|
44 | + { |
|
45 | + |
|
46 | + if (is_null($args)) { |
|
47 | + $args = []; |
|
48 | + } |
|
49 | + |
|
50 | + $this->setArgs($args); |
|
51 | + } |
|
52 | + |
|
53 | + /** |
|
54 | + * @param array $args |
|
55 | + * |
|
56 | + * @throws Exception |
|
57 | + */ |
|
58 | + protected function setArgs(array $args) |
|
59 | + { |
|
60 | + |
|
61 | + foreach ($this->typeCheck as $field_name => $field_type) { |
|
62 | + if (empty($args[$field_name]) || is_null($args[$field_name])) { |
|
63 | + if ($this->isFieldRequired($field_name)) { |
|
64 | + $this->addError('Missing "' . $field_name . '" in ' . static::class); |
|
65 | + } |
|
66 | + } else { |
|
67 | + $this->$field_name = $this->parseFieldValue($field_type, $args[$field_name]); |
|
68 | + } |
|
69 | + } |
|
70 | + $this->throwErrors(); |
|
71 | + } |
|
72 | + |
|
73 | + /** |
|
74 | + * @param string $field_name |
|
75 | + * |
|
76 | + * @return bool |
|
77 | + */ |
|
78 | + protected function isFieldRequired(string $field_name): bool |
|
79 | + { |
|
80 | + |
|
81 | + return in_array($field_name, $this->required); |
|
82 | + } |
|
83 | + |
|
84 | + /** |
|
85 | + * @param string $error |
|
86 | + * |
|
87 | + * @return array |
|
88 | + */ |
|
89 | + protected function addError(string $error): array |
|
90 | + { |
|
91 | + |
|
92 | + array_push($this->errors, $error); |
|
93 | + |
|
94 | + return $this->errors; |
|
95 | + } |
|
96 | + |
|
97 | + /** |
|
98 | + * @param string $field_type |
|
99 | + * @param string $field_value |
|
100 | + * |
|
101 | + * @return mixed |
|
102 | + */ |
|
103 | + protected function parseFieldValue(string $field_type, $field_value) |
|
104 | + { |
|
105 | + |
|
106 | + switch ($field_type) { |
|
107 | + case 'string': |
|
108 | + case 'int': |
|
109 | + case 'float': |
|
110 | + case 'array': |
|
111 | + case 'json': |
|
112 | + return $field_value; |
|
113 | + default: |
|
114 | + return ($field_value instanceof $field_type) ? $field_value : new $field_type($field_value); |
|
115 | + } |
|
116 | + } |
|
117 | + |
|
118 | + /** |
|
119 | + * @throws Exception |
|
120 | + */ |
|
121 | + protected function throwErrors() |
|
122 | + { |
|
123 | + |
|
124 | + if (count($this->errors)) { |
|
125 | + throw new Exception(implode(', ', $this->errors)); |
|
126 | + } |
|
127 | + } |
|
128 | + |
|
129 | + /** |
|
130 | + * @return string |
|
131 | + */ |
|
132 | + public function toJson(): string |
|
133 | + { |
|
134 | + |
|
135 | + return json_encode($this->toArray()); |
|
136 | + } |
|
137 | + |
|
138 | + /** |
|
139 | + * @return array |
|
140 | + */ |
|
141 | + public function toArray(): array |
|
142 | + { |
|
143 | + |
|
144 | + $fields = get_object_vars($this); |
|
145 | + |
|
146 | + foreach ($fields as $field_name => $field_value) { |
|
147 | + |
|
148 | + if (!is_scalar($field_value) && method_exists($field_value, 'toJson')) { |
|
149 | + $fields[$field_name] = $field_value->toArray(); |
|
150 | + } |
|
151 | + } |
|
152 | + |
|
153 | + return $fields; |
|
154 | + } |
|
155 | + |
|
156 | + /** |
|
157 | + * @return string |
|
158 | + */ |
|
159 | + public function __toString(): string |
|
160 | + { |
|
161 | + |
|
162 | + return implode(',', $this->toArray()); |
|
163 | + } |
|
164 | + |
|
165 | + /** |
|
166 | + * @param $name |
|
167 | + * @param $arguments |
|
168 | + * |
|
169 | + * @return mixed |
|
170 | + */ |
|
171 | + public function __call($name, $arguments) |
|
172 | + { |
|
173 | + |
|
174 | + preg_match('/(?<=(g|s)et)([A-Za-z0-9])\w+/', $name, $match); |
|
175 | + |
|
176 | + $camel_field = (empty($match[0])) ? '' : $match[0]; |
|
177 | + |
|
178 | + $snake_field = camel2Snake($camel_field); |
|
179 | + |
|
180 | + $field_type = (empty($this->typeCheck[$snake_field])) ? null : $this->typeCheck[$snake_field]; |
|
181 | + |
|
182 | + if (!empty($match[1]) && $field_type) { |
|
183 | + switch ($match[1]) { |
|
184 | + case 's': |
|
185 | + return $this->$snake_field = $this->parseFieldValue($field_type, current($arguments)); |
|
186 | + case 'g': |
|
187 | + return $this->$snake_field; |
|
188 | + } |
|
189 | + } |
|
190 | + } |
|
191 | 191 | |
192 | 192 | } |
193 | 193 | \ No newline at end of file |
@@ -58,7 +58,7 @@ |
||
58 | 58 | $params = []; |
59 | 59 | |
60 | 60 | foreach ($this->params as $param_name => $param_value) { |
61 | - $params[$param_name] = (string)$param_value; |
|
61 | + $params[$param_name] = (string) $param_value; |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | return http_build_query($params); |
@@ -17,80 +17,80 @@ |
||
17 | 17 | class GoogleMapsRequest |
18 | 18 | { |
19 | 19 | |
20 | - /** |
|
21 | - * @var string |
|
22 | - * @since 0.5.0 |
|
23 | - */ |
|
24 | - protected $endpoint = null; |
|
25 | - |
|
26 | - /** |
|
27 | - * @var array |
|
28 | - */ |
|
29 | - private $params = []; |
|
30 | - |
|
31 | - /** |
|
32 | - * GoogleMapsRequest constructor. |
|
33 | - * |
|
34 | - * @param array $params |
|
35 | - * @param null|string $endpoint |
|
36 | - */ |
|
37 | - public function __construct(array $params = [], ?string $endpoint = null) |
|
38 | - { |
|
39 | - |
|
40 | - if ($params) { |
|
41 | - foreach ($params as $param_name => $param_value) { |
|
42 | - $this->setParam($param_name, $param_value); |
|
43 | - } |
|
44 | - } |
|
45 | - |
|
46 | - $this->endpoint = $endpoint; |
|
47 | - } |
|
48 | - |
|
49 | - /** |
|
50 | - * @param string $param_name |
|
51 | - * @param mixed $param_value |
|
52 | - * |
|
53 | - * @return GoogleMapsRequest |
|
54 | - */ |
|
55 | - public function setParam(string $param_name, $param_value): GoogleMapsRequest |
|
56 | - { |
|
57 | - |
|
58 | - $this->params[$param_name] = $param_value; |
|
59 | - |
|
60 | - return $this; |
|
61 | - } |
|
62 | - |
|
63 | - /** |
|
64 | - * @return string |
|
65 | - */ |
|
66 | - public function getQuery(): string |
|
67 | - { |
|
68 | - |
|
69 | - $params = []; |
|
70 | - |
|
71 | - foreach ($this->params as $param_name => $param_value) { |
|
72 | - $params[$param_name] = (string)$param_value; |
|
73 | - } |
|
74 | - |
|
75 | - return http_build_query($params); |
|
76 | - } |
|
77 | - |
|
78 | - /** |
|
79 | - * @return array |
|
80 | - */ |
|
81 | - public function getParams(): array |
|
82 | - { |
|
83 | - |
|
84 | - return $this->params; |
|
85 | - } |
|
86 | - |
|
87 | - /** |
|
88 | - * @return null|string |
|
89 | - */ |
|
90 | - public function getEndpoint(): ?string |
|
91 | - { |
|
92 | - |
|
93 | - return $this->endpoint; |
|
94 | - } |
|
20 | + /** |
|
21 | + * @var string |
|
22 | + * @since 0.5.0 |
|
23 | + */ |
|
24 | + protected $endpoint = null; |
|
25 | + |
|
26 | + /** |
|
27 | + * @var array |
|
28 | + */ |
|
29 | + private $params = []; |
|
30 | + |
|
31 | + /** |
|
32 | + * GoogleMapsRequest constructor. |
|
33 | + * |
|
34 | + * @param array $params |
|
35 | + * @param null|string $endpoint |
|
36 | + */ |
|
37 | + public function __construct(array $params = [], ?string $endpoint = null) |
|
38 | + { |
|
39 | + |
|
40 | + if ($params) { |
|
41 | + foreach ($params as $param_name => $param_value) { |
|
42 | + $this->setParam($param_name, $param_value); |
|
43 | + } |
|
44 | + } |
|
45 | + |
|
46 | + $this->endpoint = $endpoint; |
|
47 | + } |
|
48 | + |
|
49 | + /** |
|
50 | + * @param string $param_name |
|
51 | + * @param mixed $param_value |
|
52 | + * |
|
53 | + * @return GoogleMapsRequest |
|
54 | + */ |
|
55 | + public function setParam(string $param_name, $param_value): GoogleMapsRequest |
|
56 | + { |
|
57 | + |
|
58 | + $this->params[$param_name] = $param_value; |
|
59 | + |
|
60 | + return $this; |
|
61 | + } |
|
62 | + |
|
63 | + /** |
|
64 | + * @return string |
|
65 | + */ |
|
66 | + public function getQuery(): string |
|
67 | + { |
|
68 | + |
|
69 | + $params = []; |
|
70 | + |
|
71 | + foreach ($this->params as $param_name => $param_value) { |
|
72 | + $params[$param_name] = (string)$param_value; |
|
73 | + } |
|
74 | + |
|
75 | + return http_build_query($params); |
|
76 | + } |
|
77 | + |
|
78 | + /** |
|
79 | + * @return array |
|
80 | + */ |
|
81 | + public function getParams(): array |
|
82 | + { |
|
83 | + |
|
84 | + return $this->params; |
|
85 | + } |
|
86 | + |
|
87 | + /** |
|
88 | + * @return null|string |
|
89 | + */ |
|
90 | + public function getEndpoint(): ?string |
|
91 | + { |
|
92 | + |
|
93 | + return $this->endpoint; |
|
94 | + } |
|
95 | 95 | |
96 | 96 | } |
97 | 97 | \ No newline at end of file |
@@ -17,13 +17,13 @@ |
||
17 | 17 | class LatLngBoundsFields |
18 | 18 | { |
19 | 19 | |
20 | - /** |
|
21 | - * string : northeast |
|
22 | - */ |
|
23 | - const NORTHEAST = 'northeast'; |
|
20 | + /** |
|
21 | + * string : northeast |
|
22 | + */ |
|
23 | + const NORTHEAST = 'northeast'; |
|
24 | 24 | |
25 | - /** |
|
26 | - * string : southwest |
|
27 | - */ |
|
28 | - const SOUTHWEST = 'southwest'; |
|
25 | + /** |
|
26 | + * string : southwest |
|
27 | + */ |
|
28 | + const SOUTHWEST = 'southwest'; |
|
29 | 29 | } |
30 | 30 | \ No newline at end of file |
@@ -17,145 +17,145 @@ |
||
17 | 17 | class GoogleMapsRequestFields |
18 | 18 | { |
19 | 19 | |
20 | - /** |
|
21 | - * @var string key |
|
22 | - */ |
|
23 | - const KEY = 'key'; |
|
24 | - |
|
25 | - /** |
|
26 | - * @var string sensor |
|
27 | - */ |
|
28 | - const SENSOR = 'sensor'; |
|
29 | - |
|
30 | - /** |
|
31 | - * @var string latlng |
|
32 | - */ |
|
33 | - const LATLNG = 'latlng'; |
|
34 | - |
|
35 | - /** |
|
36 | - * @var string address |
|
37 | - */ |
|
38 | - const ADDRESS = 'address'; |
|
39 | - |
|
40 | - /** |
|
41 | - * @var string place_id |
|
42 | - */ |
|
43 | - const PLACE_ID = 'place_id'; |
|
44 | - |
|
45 | - /** |
|
46 | - * @var string location |
|
47 | - * @since 0.5.0 |
|
48 | - */ |
|
49 | - const LOCATION = 'location'; |
|
50 | - |
|
51 | - /** |
|
52 | - * @var string locations |
|
53 | - */ |
|
54 | - const LOCATIONS = 'locations'; |
|
55 | - |
|
56 | - /** |
|
57 | - * @var string path |
|
58 | - */ |
|
59 | - const PATH = 'path'; |
|
60 | - |
|
61 | - /** |
|
62 | - * @var string samples |
|
63 | - */ |
|
64 | - const SAMPLES = 'samples'; |
|
65 | - |
|
66 | - /** |
|
67 | - * @var string input |
|
68 | - * @since 0.5.0 |
|
69 | - */ |
|
70 | - const INPUT = 'input'; |
|
71 | - |
|
72 | - /** |
|
73 | - * @var string inputtype |
|
74 | - * @since 0.5.0 |
|
75 | - */ |
|
76 | - const INPUTTYPE = 'inputtype'; |
|
77 | - |
|
78 | - /** |
|
79 | - * @var string language |
|
80 | - * @since 0.5.0 |
|
81 | - */ |
|
82 | - const LANGUAGE = 'language'; |
|
83 | - |
|
84 | - /** |
|
85 | - * @var string fields |
|
86 | - * @since 0.5.0 |
|
87 | - */ |
|
88 | - const FIELDS = 'fields'; |
|
89 | - |
|
90 | - /** |
|
91 | - * @var string locationbias |
|
92 | - * @since 0.5.0 |
|
93 | - */ |
|
94 | - const LOCATIONBIAS = 'locationbias'; |
|
95 | - |
|
96 | - /** |
|
97 | - * @var string radius |
|
98 | - * @since 0.5.0 |
|
99 | - */ |
|
100 | - const RADIUS = 'radius'; |
|
101 | - |
|
102 | - /** |
|
103 | - * @var string rankby |
|
104 | - * @since 0.5.0 |
|
105 | - */ |
|
106 | - const RANKBY = 'rankby'; |
|
107 | - |
|
108 | - /** |
|
109 | - * @var string keyword |
|
110 | - * @since 0.5.0 |
|
111 | - */ |
|
112 | - const KEYWORD = 'keyword'; |
|
113 | - |
|
114 | - /** |
|
115 | - * @var string minprice |
|
116 | - * @since 0.5.0 |
|
117 | - */ |
|
118 | - const MINPRICE = 'minprice'; |
|
119 | - |
|
120 | - /** |
|
121 | - * @var string maxprice |
|
122 | - * @since 0.5.0 |
|
123 | - */ |
|
124 | - const MAXPRICE = 'maxprice'; |
|
125 | - |
|
126 | - /** |
|
127 | - * @var string name |
|
128 | - * @since 0.5.0 |
|
129 | - */ |
|
130 | - const NAME = 'name'; |
|
131 | - |
|
132 | - /** |
|
133 | - * @var string opennow |
|
134 | - * @since 0.5.0 |
|
135 | - */ |
|
136 | - const OPENNOW = 'opennow'; |
|
137 | - |
|
138 | - /** |
|
139 | - * @var string pagetoken |
|
140 | - * @since 0.5.0 |
|
141 | - */ |
|
142 | - const PAGETOKEN = 'pagetoken'; |
|
143 | - |
|
144 | - /** |
|
145 | - * @var string type |
|
146 | - * @since 0.5.0 |
|
147 | - */ |
|
148 | - const TYPE = 'type'; |
|
149 | - |
|
150 | - /** |
|
151 | - * @var string query |
|
152 | - * @since 0.5.0 |
|
153 | - */ |
|
154 | - const QUERY = 'query'; |
|
155 | - |
|
156 | - /** |
|
157 | - * @var string next_page_token |
|
158 | - * @since 0.5.0 |
|
159 | - */ |
|
160 | - const NEXT_PAGE_TOKEN = 'next_page_token'; |
|
20 | + /** |
|
21 | + * @var string key |
|
22 | + */ |
|
23 | + const KEY = 'key'; |
|
24 | + |
|
25 | + /** |
|
26 | + * @var string sensor |
|
27 | + */ |
|
28 | + const SENSOR = 'sensor'; |
|
29 | + |
|
30 | + /** |
|
31 | + * @var string latlng |
|
32 | + */ |
|
33 | + const LATLNG = 'latlng'; |
|
34 | + |
|
35 | + /** |
|
36 | + * @var string address |
|
37 | + */ |
|
38 | + const ADDRESS = 'address'; |
|
39 | + |
|
40 | + /** |
|
41 | + * @var string place_id |
|
42 | + */ |
|
43 | + const PLACE_ID = 'place_id'; |
|
44 | + |
|
45 | + /** |
|
46 | + * @var string location |
|
47 | + * @since 0.5.0 |
|
48 | + */ |
|
49 | + const LOCATION = 'location'; |
|
50 | + |
|
51 | + /** |
|
52 | + * @var string locations |
|
53 | + */ |
|
54 | + const LOCATIONS = 'locations'; |
|
55 | + |
|
56 | + /** |
|
57 | + * @var string path |
|
58 | + */ |
|
59 | + const PATH = 'path'; |
|
60 | + |
|
61 | + /** |
|
62 | + * @var string samples |
|
63 | + */ |
|
64 | + const SAMPLES = 'samples'; |
|
65 | + |
|
66 | + /** |
|
67 | + * @var string input |
|
68 | + * @since 0.5.0 |
|
69 | + */ |
|
70 | + const INPUT = 'input'; |
|
71 | + |
|
72 | + /** |
|
73 | + * @var string inputtype |
|
74 | + * @since 0.5.0 |
|
75 | + */ |
|
76 | + const INPUTTYPE = 'inputtype'; |
|
77 | + |
|
78 | + /** |
|
79 | + * @var string language |
|
80 | + * @since 0.5.0 |
|
81 | + */ |
|
82 | + const LANGUAGE = 'language'; |
|
83 | + |
|
84 | + /** |
|
85 | + * @var string fields |
|
86 | + * @since 0.5.0 |
|
87 | + */ |
|
88 | + const FIELDS = 'fields'; |
|
89 | + |
|
90 | + /** |
|
91 | + * @var string locationbias |
|
92 | + * @since 0.5.0 |
|
93 | + */ |
|
94 | + const LOCATIONBIAS = 'locationbias'; |
|
95 | + |
|
96 | + /** |
|
97 | + * @var string radius |
|
98 | + * @since 0.5.0 |
|
99 | + */ |
|
100 | + const RADIUS = 'radius'; |
|
101 | + |
|
102 | + /** |
|
103 | + * @var string rankby |
|
104 | + * @since 0.5.0 |
|
105 | + */ |
|
106 | + const RANKBY = 'rankby'; |
|
107 | + |
|
108 | + /** |
|
109 | + * @var string keyword |
|
110 | + * @since 0.5.0 |
|
111 | + */ |
|
112 | + const KEYWORD = 'keyword'; |
|
113 | + |
|
114 | + /** |
|
115 | + * @var string minprice |
|
116 | + * @since 0.5.0 |
|
117 | + */ |
|
118 | + const MINPRICE = 'minprice'; |
|
119 | + |
|
120 | + /** |
|
121 | + * @var string maxprice |
|
122 | + * @since 0.5.0 |
|
123 | + */ |
|
124 | + const MAXPRICE = 'maxprice'; |
|
125 | + |
|
126 | + /** |
|
127 | + * @var string name |
|
128 | + * @since 0.5.0 |
|
129 | + */ |
|
130 | + const NAME = 'name'; |
|
131 | + |
|
132 | + /** |
|
133 | + * @var string opennow |
|
134 | + * @since 0.5.0 |
|
135 | + */ |
|
136 | + const OPENNOW = 'opennow'; |
|
137 | + |
|
138 | + /** |
|
139 | + * @var string pagetoken |
|
140 | + * @since 0.5.0 |
|
141 | + */ |
|
142 | + const PAGETOKEN = 'pagetoken'; |
|
143 | + |
|
144 | + /** |
|
145 | + * @var string type |
|
146 | + * @since 0.5.0 |
|
147 | + */ |
|
148 | + const TYPE = 'type'; |
|
149 | + |
|
150 | + /** |
|
151 | + * @var string query |
|
152 | + * @since 0.5.0 |
|
153 | + */ |
|
154 | + const QUERY = 'query'; |
|
155 | + |
|
156 | + /** |
|
157 | + * @var string next_page_token |
|
158 | + * @since 0.5.0 |
|
159 | + */ |
|
160 | + const NEXT_PAGE_TOKEN = 'next_page_token'; |
|
161 | 161 | } |
162 | 162 | \ No newline at end of file |
@@ -17,126 +17,126 @@ |
||
17 | 17 | class GoogleMapsResultFields |
18 | 18 | { |
19 | 19 | |
20 | - /** |
|
21 | - * @var string address_components |
|
22 | - */ |
|
23 | - const ADDRESS_COMPONENTS = 'address_components'; |
|
24 | - |
|
25 | - /** |
|
26 | - * @var string formatted_address |
|
27 | - */ |
|
28 | - const FORMATTED_ADDRESS = 'formatted_address'; |
|
29 | - |
|
30 | - /** |
|
31 | - * @var string geometry |
|
32 | - */ |
|
33 | - const GEOMETRY = 'geometry'; |
|
34 | - |
|
35 | - /** |
|
36 | - * @var string viewport |
|
37 | - */ |
|
38 | - const VIEWPORT = 'viewport'; |
|
39 | - |
|
40 | - /** |
|
41 | - * @var string place_id |
|
42 | - */ |
|
43 | - const PLACE_ID = 'place_id'; |
|
44 | - |
|
45 | - /** |
|
46 | - * @var string location_type |
|
47 | - */ |
|
48 | - const LOCATION_TYPE = 'location_type'; |
|
49 | - |
|
50 | - /** |
|
51 | - * @var string types |
|
52 | - */ |
|
53 | - const TYPES = 'types'; |
|
54 | - |
|
55 | - /** |
|
56 | - * @var string location |
|
57 | - */ |
|
58 | - const LOCATION = 'location'; |
|
59 | - |
|
60 | - /** |
|
61 | - * @var string elevation |
|
62 | - */ |
|
63 | - const ELEVATION = 'elevation'; |
|
64 | - |
|
65 | - /** |
|
66 | - * @var string resolution |
|
67 | - */ |
|
68 | - const RESOLUTION = 'resolution'; |
|
69 | - |
|
70 | - /** |
|
71 | - * @var string icon |
|
72 | - * @since 0.5.0 |
|
73 | - */ |
|
74 | - const ICON = 'icon'; |
|
75 | - |
|
76 | - /** |
|
77 | - * @var string id |
|
78 | - * @since 0.5.0 |
|
79 | - */ |
|
80 | - const ID = 'id'; |
|
81 | - |
|
82 | - /** |
|
83 | - * @var string name |
|
84 | - * @since 0.5.0 |
|
85 | - */ |
|
86 | - const NAME = 'name'; |
|
87 | - |
|
88 | - /** |
|
89 | - * @var string photos |
|
90 | - * @since 0.5.0 |
|
91 | - */ |
|
92 | - const PHOTOS = 'photos'; |
|
93 | - |
|
94 | - /** |
|
95 | - * @var string reference |
|
96 | - * @since 0.5.0 |
|
97 | - */ |
|
98 | - const REFERENCE = 'reference'; |
|
99 | - |
|
100 | - /** |
|
101 | - * @var string vicinity |
|
102 | - * @since 0.5.0 |
|
103 | - */ |
|
104 | - const VICINITY = 'vicinity'; |
|
105 | - |
|
106 | - /** |
|
107 | - * @var string opening_hours |
|
108 | - * @since 0.5.0 |
|
109 | - */ |
|
110 | - const OPENING_HOURS = 'opening_hours'; |
|
111 | - |
|
112 | - /** |
|
113 | - * @var string price_level |
|
114 | - * @since 0.5.0 |
|
115 | - */ |
|
116 | - const PRICE_LEVEL = 'price_level'; |
|
117 | - |
|
118 | - /** |
|
119 | - * @var string rating |
|
120 | - * @since 0.5.0 |
|
121 | - */ |
|
122 | - const RATING = 'rating'; |
|
123 | - |
|
124 | - /** |
|
125 | - * @var string permanently_closed |
|
126 | - * @since 0.5.0 |
|
127 | - */ |
|
128 | - const PERMANENTLY_CLOSED = 'permanently_closed'; |
|
129 | - |
|
130 | - /** |
|
131 | - * @var string plus_code |
|
132 | - * @since 0.5.0 |
|
133 | - */ |
|
134 | - const PLUS_CODE = 'plus_code'; |
|
135 | - |
|
136 | - /** |
|
137 | - * @var string next_page_token |
|
138 | - * @since 0.5.0 |
|
139 | - */ |
|
140 | - const NEXT_PAGE_TOKEN = 'next_page_token'; |
|
20 | + /** |
|
21 | + * @var string address_components |
|
22 | + */ |
|
23 | + const ADDRESS_COMPONENTS = 'address_components'; |
|
24 | + |
|
25 | + /** |
|
26 | + * @var string formatted_address |
|
27 | + */ |
|
28 | + const FORMATTED_ADDRESS = 'formatted_address'; |
|
29 | + |
|
30 | + /** |
|
31 | + * @var string geometry |
|
32 | + */ |
|
33 | + const GEOMETRY = 'geometry'; |
|
34 | + |
|
35 | + /** |
|
36 | + * @var string viewport |
|
37 | + */ |
|
38 | + const VIEWPORT = 'viewport'; |
|
39 | + |
|
40 | + /** |
|
41 | + * @var string place_id |
|
42 | + */ |
|
43 | + const PLACE_ID = 'place_id'; |
|
44 | + |
|
45 | + /** |
|
46 | + * @var string location_type |
|
47 | + */ |
|
48 | + const LOCATION_TYPE = 'location_type'; |
|
49 | + |
|
50 | + /** |
|
51 | + * @var string types |
|
52 | + */ |
|
53 | + const TYPES = 'types'; |
|
54 | + |
|
55 | + /** |
|
56 | + * @var string location |
|
57 | + */ |
|
58 | + const LOCATION = 'location'; |
|
59 | + |
|
60 | + /** |
|
61 | + * @var string elevation |
|
62 | + */ |
|
63 | + const ELEVATION = 'elevation'; |
|
64 | + |
|
65 | + /** |
|
66 | + * @var string resolution |
|
67 | + */ |
|
68 | + const RESOLUTION = 'resolution'; |
|
69 | + |
|
70 | + /** |
|
71 | + * @var string icon |
|
72 | + * @since 0.5.0 |
|
73 | + */ |
|
74 | + const ICON = 'icon'; |
|
75 | + |
|
76 | + /** |
|
77 | + * @var string id |
|
78 | + * @since 0.5.0 |
|
79 | + */ |
|
80 | + const ID = 'id'; |
|
81 | + |
|
82 | + /** |
|
83 | + * @var string name |
|
84 | + * @since 0.5.0 |
|
85 | + */ |
|
86 | + const NAME = 'name'; |
|
87 | + |
|
88 | + /** |
|
89 | + * @var string photos |
|
90 | + * @since 0.5.0 |
|
91 | + */ |
|
92 | + const PHOTOS = 'photos'; |
|
93 | + |
|
94 | + /** |
|
95 | + * @var string reference |
|
96 | + * @since 0.5.0 |
|
97 | + */ |
|
98 | + const REFERENCE = 'reference'; |
|
99 | + |
|
100 | + /** |
|
101 | + * @var string vicinity |
|
102 | + * @since 0.5.0 |
|
103 | + */ |
|
104 | + const VICINITY = 'vicinity'; |
|
105 | + |
|
106 | + /** |
|
107 | + * @var string opening_hours |
|
108 | + * @since 0.5.0 |
|
109 | + */ |
|
110 | + const OPENING_HOURS = 'opening_hours'; |
|
111 | + |
|
112 | + /** |
|
113 | + * @var string price_level |
|
114 | + * @since 0.5.0 |
|
115 | + */ |
|
116 | + const PRICE_LEVEL = 'price_level'; |
|
117 | + |
|
118 | + /** |
|
119 | + * @var string rating |
|
120 | + * @since 0.5.0 |
|
121 | + */ |
|
122 | + const RATING = 'rating'; |
|
123 | + |
|
124 | + /** |
|
125 | + * @var string permanently_closed |
|
126 | + * @since 0.5.0 |
|
127 | + */ |
|
128 | + const PERMANENTLY_CLOSED = 'permanently_closed'; |
|
129 | + |
|
130 | + /** |
|
131 | + * @var string plus_code |
|
132 | + * @since 0.5.0 |
|
133 | + */ |
|
134 | + const PLUS_CODE = 'plus_code'; |
|
135 | + |
|
136 | + /** |
|
137 | + * @var string next_page_token |
|
138 | + * @since 0.5.0 |
|
139 | + */ |
|
140 | + const NEXT_PAGE_TOKEN = 'next_page_token'; |
|
141 | 141 | |
142 | 142 | } |
143 | 143 | \ No newline at end of file |
@@ -17,13 +17,13 @@ |
||
17 | 17 | class LatLngFields |
18 | 18 | { |
19 | 19 | |
20 | - /** |
|
21 | - * string - latitude |
|
22 | - */ |
|
23 | - const LAT = 'lat'; |
|
20 | + /** |
|
21 | + * string - latitude |
|
22 | + */ |
|
23 | + const LAT = 'lat'; |
|
24 | 24 | |
25 | - /** |
|
26 | - * string - longitude |
|
27 | - */ |
|
28 | - const LNG = 'lng'; |
|
25 | + /** |
|
26 | + * string - longitude |
|
27 | + */ |
|
28 | + const LNG = 'lng'; |
|
29 | 29 | } |
30 | 30 | \ No newline at end of file |
@@ -17,23 +17,23 @@ |
||
17 | 17 | class PhotoFields |
18 | 18 | { |
19 | 19 | |
20 | - /** |
|
21 | - * @var string |
|
22 | - */ |
|
23 | - const HEIGHT = "height"; |
|
20 | + /** |
|
21 | + * @var string |
|
22 | + */ |
|
23 | + const HEIGHT = "height"; |
|
24 | 24 | |
25 | - /** |
|
26 | - * @var string |
|
27 | - */ |
|
28 | - const WIDTH = "width"; |
|
25 | + /** |
|
26 | + * @var string |
|
27 | + */ |
|
28 | + const WIDTH = "width"; |
|
29 | 29 | |
30 | - /** |
|
31 | - * @var string |
|
32 | - */ |
|
33 | - const PHOTO_REFERENCE = "photo_reference"; |
|
30 | + /** |
|
31 | + * @var string |
|
32 | + */ |
|
33 | + const PHOTO_REFERENCE = "photo_reference"; |
|
34 | 34 | |
35 | - /** |
|
36 | - * @var string |
|
37 | - */ |
|
38 | - const HTML_ATTRIBUTIONS = "html_attributions"; |
|
35 | + /** |
|
36 | + * @var string |
|
37 | + */ |
|
38 | + const HTML_ATTRIBUTIONS = "html_attributions"; |
|
39 | 39 | } |
40 | 40 | \ No newline at end of file |
@@ -17,37 +17,37 @@ |
||
17 | 17 | class GoogleMapsResponseFields |
18 | 18 | { |
19 | 19 | |
20 | - /** |
|
21 | - * @var string results |
|
22 | - */ |
|
23 | - const RESULTS = 'results'; |
|
24 | - |
|
25 | - /** |
|
26 | - * @var string status |
|
27 | - */ |
|
28 | - const STATUS = 'status'; |
|
29 | - |
|
30 | - /** |
|
31 | - * @var string error_message |
|
32 | - */ |
|
33 | - const ERROR_MESSAGE = 'error_message'; |
|
34 | - |
|
35 | - /** |
|
36 | - * @var string candidates |
|
37 | - * @since 0.5.0 |
|
38 | - */ |
|
39 | - const CANDIDATES = 'candidates'; |
|
40 | - |
|
41 | - /** |
|
42 | - * @var string html_attributions |
|
43 | - * @since 0.5.0 |
|
44 | - */ |
|
45 | - const HTML_ATTRIBUTIONS = 'html_attributions'; |
|
46 | - |
|
47 | - /** |
|
48 | - * @var string next_page_token |
|
49 | - * @since 0.5.0 |
|
50 | - */ |
|
51 | - const NEXT_PAGE_TOKEN = 'next_page_token'; |
|
20 | + /** |
|
21 | + * @var string results |
|
22 | + */ |
|
23 | + const RESULTS = 'results'; |
|
24 | + |
|
25 | + /** |
|
26 | + * @var string status |
|
27 | + */ |
|
28 | + const STATUS = 'status'; |
|
29 | + |
|
30 | + /** |
|
31 | + * @var string error_message |
|
32 | + */ |
|
33 | + const ERROR_MESSAGE = 'error_message'; |
|
34 | + |
|
35 | + /** |
|
36 | + * @var string candidates |
|
37 | + * @since 0.5.0 |
|
38 | + */ |
|
39 | + const CANDIDATES = 'candidates'; |
|
40 | + |
|
41 | + /** |
|
42 | + * @var string html_attributions |
|
43 | + * @since 0.5.0 |
|
44 | + */ |
|
45 | + const HTML_ATTRIBUTIONS = 'html_attributions'; |
|
46 | + |
|
47 | + /** |
|
48 | + * @var string next_page_token |
|
49 | + * @since 0.5.0 |
|
50 | + */ |
|
51 | + const NEXT_PAGE_TOKEN = 'next_page_token'; |
|
52 | 52 | |
53 | 53 | } |
54 | 54 | \ No newline at end of file |
@@ -17,19 +17,19 @@ |
||
17 | 17 | class GeometryFields |
18 | 18 | { |
19 | 19 | |
20 | - /** |
|
21 | - * string: location |
|
22 | - */ |
|
23 | - const LOCATION = 'location'; |
|
20 | + /** |
|
21 | + * string: location |
|
22 | + */ |
|
23 | + const LOCATION = 'location'; |
|
24 | 24 | |
25 | - /** |
|
26 | - * string: location_type |
|
27 | - */ |
|
28 | - const LOCATION_TYPE = 'location_type'; |
|
25 | + /** |
|
26 | + * string: location_type |
|
27 | + */ |
|
28 | + const LOCATION_TYPE = 'location_type'; |
|
29 | 29 | |
30 | - /** |
|
31 | - * string: viewport |
|
32 | - */ |
|
33 | - const VIEWPORT = 'viewport'; |
|
30 | + /** |
|
31 | + * string: viewport |
|
32 | + */ |
|
33 | + const VIEWPORT = 'viewport'; |
|
34 | 34 | |
35 | 35 | } |
36 | 36 | \ No newline at end of file |