|
@@ 118-121 (lines=4) @@
|
| 115 |
|
|
| 116 |
|
$url = sprintf('%s&style=FULL', $url); |
| 117 |
|
|
| 118 |
|
if (null !== $locale) { |
| 119 |
|
// Locale code transformation: for example from it_IT to it |
| 120 |
|
$url = sprintf('%s&lang=%s', $url, substr($locale, 0, 2)); |
| 121 |
|
} |
| 122 |
|
|
| 123 |
|
$content = $this->getUrlContents($url); |
| 124 |
|
if (null === $json = json_decode($content)) { |
|
@@ 179-182 (lines=4) @@
|
| 176 |
|
*/ |
| 177 |
|
private function executeQuery(string $url, string $locale = null): AddressCollection |
| 178 |
|
{ |
| 179 |
|
if (null !== $locale) { |
| 180 |
|
// Locale code transformation: for example from it_IT to it |
| 181 |
|
$url = sprintf('%s&lang=%s', $url, substr($locale, 0, 2)); |
| 182 |
|
} |
| 183 |
|
|
| 184 |
|
$content = $this->getUrlContents($url); |
| 185 |
|
if (null === $json = json_decode($content)) { |