Skip to content

Commit 77ca5c2

Browse files
committed
add documentation for http adapters
1 parent 4d23b5c commit 77ca5c2

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

Resources/doc/index.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,22 @@ bazinga_geocoder:
218218
> **Tip:** If you want to configure the cache adapter,
219219
> we recommend the [doctrine/doctrine-cache-bundle](https://github.com/doctrine/DoctrineCacheBundle).
220220

221+
### Custom HTTP Adapter
222+
223+
Geocoder Bundle integrates with [egeloen/http-adapter] (https://github.com/egeloen/ivory-http-adapter). By default the bundle use a simple cURL Adapter.
224+
You can use any [PSR-7] (http://www.php-fig.org/psr/psr-7/) compliant adapter.
225+
226+
An example, if you want to use Guzzle.
227+
228+
```yaml
229+
# app/config/config*.yml
230+
services:
231+
guzzle_http_adapter:
232+
class: "Ivory\HttpAdapter\Guzzle6HttpAdapter"
233+
234+
bazinga_geocoder:
235+
adapter: guzzle_http_adapter
236+
```
221237

222238
### Symfony2 Profiler Integration
223239

@@ -244,8 +260,7 @@ bazinga_geocoder:
244260
enabled: true
245261
ip: null
246262
priority: 0
247-
adapter:
248-
class: null
263+
adapter: ~ # An adapter service id
249264
default_provider: ~ # Name of provider, e.g. chain
250265
providers:
251266
bing_maps:

0 commit comments

Comments
 (0)