Skip to content

Commit 0fc5b2f

Browse files
authored
Allow to set zoom (#628)
* Allow to set zoom * cs * Updated getData function
1 parent ed28f49 commit 0fc5b2f

File tree

2 files changed

+31
-3
lines changed

2 files changed

+31
-3
lines changed

Query/GeocodeQuery.php

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,24 @@ public function getLimit()
156156
}
157157

158158
/**
159-
* Return arbitrary data for this query.
159+
* @param string $name
160+
* @param null $default
160161
*
162+
* @return mixed
163+
*/
164+
public function getData($name, $default = null)
165+
{
166+
if (!array_key_exists($name, $this->data)) {
167+
return $default;
168+
}
169+
170+
return $this->data[$name];
171+
}
172+
173+
/**
161174
* @return array
162175
*/
163-
public function getData()
176+
public function getAllData()
164177
{
165178
return $this->data;
166179
}

Query/ReverseQuery.php

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,25 @@ public function getLocale()
133133
return $this->locale;
134134
}
135135

136+
/**
137+
* @param string $name
138+
* @param null $default
139+
*
140+
* @return mixed
141+
*/
142+
public function getData($name, $default = null)
143+
{
144+
if (!array_key_exists($name, $this->data)) {
145+
return $default;
146+
}
147+
148+
return $this->data[$name];
149+
}
150+
136151
/**
137152
* @return array
138153
*/
139-
public function getData()
154+
public function getAllData()
140155
{
141156
return $this->data;
142157
}

0 commit comments

Comments
 (0)