Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8369cbc + 640efaf commit 0a65fcaCopy full SHA for 0a65fca
src/Geocoder/Provider/Chain.php
@@ -16,8 +16,10 @@
16
/**
17
* @author Markus Bachmann <[email protected]>
18
*/
19
-class Chain implements Provider
+class Chain implements LocaleAwareProvider
20
{
21
+ use LocaleTrait;
22
+
23
24
* @var Provider[]
25
@@ -38,6 +40,10 @@ public function geocode($address)
38
40
39
41
$exceptions = [];
42
foreach ($this->providers as $provider) {
43
+ if ($provider instanceof LocaleAwareProvider && $this->getLocale() !== null){
44
+ $provider = clone $provider;
45
+ $provider->setLocale($this->getLocale());
46
+ }
47
try {
48
return $provider->geocode($address);
49
} catch (InvalidCredentials $e) {
0 commit comments