@@ -31,7 +31,7 @@ Installation
31
31
------------
32
32
33
33
To install this bundle you need to know how to [ install the geocoder and providers] ( https://github.com/geocoder-php/Geocoder#installation )
34
- and then you may just install the bundle like normal:
34
+ and then you may just install the bundle like normal:
35
35
36
36
``` bash
37
37
composer require willdurand/geocoder-bundle:^5.0
@@ -53,9 +53,9 @@ public function registerBundles()
53
53
Usage
54
54
-----
55
55
56
- The bundle helps you register your providers and to enable profiling support. To
56
+ The bundle helps you register your providers and to enable profiling support. To
57
57
configure a provider you must use a ` ProviderFactory ` . See the following example
58
- using Google Maps.
58
+ using Google Maps.
59
59
60
60
``` yaml
61
61
bazinga_geocoder :
@@ -64,10 +64,10 @@ bazinga_geocoder:
64
64
factory : Bazinga\GeocoderBundle\ProviderFactory\GoogleMapsFactory
65
65
` ` `
66
66
67
- This will create a service named ` bazinga_geocoder.provider.acme` which is a
67
+ This will create a service named ` bazinga_geocoder.provider.acme` which is a
68
68
` GoogleMapsProvider` .
69
69
70
- You can also configure **all ``ProviderFactories``** to adjust the behavior of the
70
+ You can also configure **all ``ProviderFactories``** to adjust the behavior of the
71
71
provider.
72
72
73
73
` ` ` yaml
@@ -77,22 +77,22 @@ bazinga_geocoder:
77
77
factory: Bazinga\G eocoderBundle\P roviderFactory\G oogleMapsFactory
78
78
cache: 'any.psr16.service'
79
79
cache_lifetime: 3600
80
- aliases:
80
+ aliases:
81
81
- my_geocoder
82
82
` ` `
83
83
84
- This will create a service named `my_geocoder` that caches the responses for one
84
+ This will create a service named `my_geocoder` that caches the responses for one
85
85
hour.
86
86
87
- **Most ``ProviderFactories``** do also take an array with options. This is usually
87
+ **Most ``ProviderFactories``** do also take an array with options. This is usually
88
88
parameters to the constructor of the provider. In the example of Google Maps :
89
89
90
90
` ` ` yaml
91
91
bazinga_geocoder:
92
92
providers:
93
93
acme:
94
94
factory: Bazinga\G eocoderBundle\P roviderFactory\G oogleMapsFactory
95
- options:
95
+ options:
96
96
httplug_client: '@httplug.client' # When using HTTPlugBundle
97
97
region: 'Sweden'
98
98
api_key: 'xxyy'
@@ -177,7 +177,7 @@ If set, the parameter will replace all instances of "127.0.0.1" in your queries
177
177
178
178
Sometimes you have to cache the results from a provider. For this case the bundle provides
179
179
simple configuration. You only need to provide a service name for you SimpleCache (PSR-16)
180
- service and you are good to go.
180
+ service and you are good to go.
181
181
182
182
` ` ` yaml
183
183
bazinga_geocoder:
@@ -234,10 +234,10 @@ To register a new dumper, you must tag it with `bazinga_geocoder.dumper`.
234
234
# ## Custom HTTP Client
235
235
236
236
The HTTP geocoder providers integrates with [HTTPlug](http://httplug.io/). It will give you all
237
- the power of the HTTP client. You have to select which one you want to use and how
238
- you want to configure it.
237
+ the power of the HTTP client. You have to select which one you want to use and how
238
+ you want to configure it.
239
239
240
- Read their [usage page](http://docs.php-http.org/en/latest/httplug/users.html), you
240
+ Read their [usage page](http://docs.php-http.org/en/latest/httplug/users.html), you
241
241
may also be interested in checking out the [HTTPlugBundle](https://github.com/php-http/HttplugBundle).
242
242
243
243
An example, if you want to use Guzzle6.
@@ -251,16 +251,16 @@ Reference Configuration
251
251
252
252
You'll find the reference configuration below :
253
253
254
- ` ` ` yaml
254
+ ` ` ` yaml
255
255
# app/config/config.yml
256
256
bazinga_geocoder:
257
- profiling:
257
+ profiling:
258
258
enabled: ~ # Default is same as kernel.debug
259
259
fake_ip:
260
260
enabled: true
261
261
ip: null
262
262
providers:
263
- # ...
263
+ # ...
264
264
acme:
265
265
factory: ~ # Required
266
266
cache: 'app.cache'
@@ -269,9 +269,9 @@ bazinga_geocoder:
269
269
limit: 5
270
270
locale: 'sv'
271
271
logger: 'logger'
272
- plugins:
272
+ plugins:
273
273
- my_custom_plugin
274
- aliases:
274
+ aliases:
275
275
- acme
276
276
- acme_geocoder
277
277
options:
@@ -290,15 +290,15 @@ Backwards compatibility
290
290
-----------------------
291
291
292
292
The BazingaGeocoderBundle is just a Symfony integration for Geocoder-PHP and it
293
- does not have any classes which falls under the BC promise. The backwards compatibility
293
+ does not have any classes which falls under the BC promise. The backwards compatibility
294
294
of the bundle is only the configuration and its values (and of course the behavior
295
295
of those values).
296
296
297
297
The public service names (excluding the ones related to profiling/DataCollector)
298
- falls under the backwards compatibility promise.
298
+ falls under the backwards compatibility promise.
299
299
300
- Bottom line is, that you can trust that your configuration will not break and that
301
- the services you use will still be working.
300
+ Bottom line is, that you can trust that your configuration will not break and that
301
+ the services you use will still be working.
302
302
303
303
Testing
304
304
-------
@@ -320,7 +320,7 @@ Traivs but if you want to run it locally you must do the following.
320
320
composer require phpunit/phpunit:^5.7 --no-update
321
321
composer update --prefer-source
322
322
wget https://phar.phpunit.de/phpunit-5.7.phar
323
- php phpunit-5.7.phar --testsuit doctrine
323
+ php phpunit-5.7.phar --testsuit doctrine
324
324
` ` `
325
325
326
326
**Important:** this command must be run with `--prefer-source`, otherwise the
0 commit comments