Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 71ed28d

Browse files
committed
Update README.md
1 parent cf6a014 commit 71ed28d

File tree

1 file changed

+21
-22
lines changed

1 file changed

+21
-22
lines changed

README.md

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,27 @@ try {
317317

318318
Everything is ok, enjoy!
319319

320+
### TimedGeocoder
321+
322+
We introduced a new feature as of Geocoder v3.0.0. The `TimedGeocoder` class
323+
profiles each `geocode` and `reverse` call. So you can easily figure out how
324+
many time/memory was spent for each geocoder/reverse call.
325+
326+
```php
327+
// configure you geocoder object
328+
329+
$stopwatch = new \Symfony\Component\Stopwatch\Stopwatch();
330+
$geocoder = new \Geocoder\TimedGeocoder($geocoder, $stopwatch);
331+
332+
$geocoder->geocode('Paris, France');
333+
334+
// Now you can debug your application
335+
```
336+
337+
We use the [symfony/stopwatch](http://symfony.com/doc/current/components/stopwatch.html)
338+
component under the hood. Which means, if you use the Symfony framework the
339+
geocoder calls will appear in your timeline section in the Web Profiler.
340+
320341

321342
Dumpers
322343
-------
@@ -436,28 +457,6 @@ You can write your own `provider` by implementing the `Provider` interface.
436457

437458
You can provide your own `dumper` by implementing the `Dumper` interface.
438459

439-
TimedGeocoder
440-
-------------
441-
442-
We introduced a new feature in Geocoder 3. The `TimedGeocoder` profiles
443-
each `geocode` and `reverse` call. So you can easily figure out how many
444-
time/memory was spent for each geocoder/reverse call.
445-
446-
```php
447-
// configure you geocoder object
448-
449-
$stopwatch = new \Symfony\Component\Stopwatch\Stopwatch();
450-
$geocoder = new \Geocoder\TimedGeocoder($geocoder, $stopwatch);
451-
452-
$geocoder->geocode('Paris, France');
453-
454-
// Now you can debug your application
455-
```
456-
457-
We use the [symfony/stopwatch](http://symfony.com/doc/current/components/stopwatch.html)
458-
component under the hood. Which means, if you use the symfony framework the
459-
geocoder calls will appear in your timeline section in the webprofiler.
460-
461460

462461
Versioning
463462
----------

0 commit comments

Comments
 (0)