src/Geocoder/Provider/GeocoderServiceProvider.php
protected function injectDataCollector(Container $app)
    {
        $app['data_collector.templates'] = $app->extend('data_collector.templates', function ($templates) {
            $templates[] = ['geocoder', '@Geocoder/Collector/geocoder.html.twig'];

            return $templates;
        });

        $app['data_collectors'] = $app->extend('data_collectors', function ($dataCollectors) {
            $dataCollectors['geocoder'] = function ($app) { return new GeocoderDataCollector($app['geocoder.logger']); };

            return $dataCollectors;
        });

        $app['twig.loader.filesystem'] = $app->extend('twig.loader.filesystem', function ($loader, $app) {
            $loader->addPath($app['geocoder.templates_path'], 'Geocoder');

            return $loader;
        });

        $app['geocoder.templates_path'] = function () {
            $r = new \ReflectionClass('Geocoder\Provider\GeocoderServiceProvider');

            return dirname(dirname($r->getFileName())).'/../../views';
        };
    }
protected function injectDataCollector(Container $app)
    {
        $app['data_collector.templates'] = $app->extend('data_collector.templates', function ($templates) {
            $templates[] = ['geocoder', '@Geocoder/Collector/geocoder.html.twig'];

            return $templates;
        });

        $app['data_collectors'] = $app->extend('data_collectors', function ($dataCollectors) {
            $dataCollectors['geocoder'] = function ($app) { return new GeocoderDataCollector($app['geocoder.logger']); };

            return $dataCollectors;
        });

        $app['twig.loader.filesystem'] = $app->extend('twig.loader.filesystem', function ($loader, $app) {
            $loader->addPath($app['geocoder.templates_path'], 'Geocoder');

            return $loader;
        });

        $app['geocoder.templates_path'] = function () {
            $r = new \ReflectionClass('Geocoder\Provider\GeocoderServiceProvider');

            return dirname(dirname($r->getFileName())).'/../../views';
        };
    }
protected function injectDataCollector ( Container $ app ) { $ app [ 'data_collector.templates' ] = $ app -> extend ( 'data_collector.templates' , function ( $ templates ) { $ templates [ ] = [ 'geocoder' , '@Geocoder/Collector/geocoder.html.twig' ] ; return $ templates ; } ) ; $ app [ 'data_collectors' ] = $ app -> extend ( 'data_collectors' , function ( $ dataCollectors ) { $ dataCollectors [ 'geocoder' ] = function ( $ app ) { return new GeocoderDataCollector ( $ app [ 'geocoder.logger' ] ) ; } ; return $ dataCollectors ; } ) ; $ app [ 'twig.loader.filesystem' ] = $ app -> extend ( 'twig.loader.filesystem' , function ( $ loader , $ app ) { $ loader -> addPath ( $ app [ 'geocoder.templates_path' ] , 'Geocoder' ) ; return $ loader ; } ) ; $ app [ 'geocoder.templates_path' ] = function ( ) { $ r = new \ ReflectionClass ( 'Geocoder\Provider\GeocoderServiceProvider' ) ; return dirname ( dirname ( $ r -> getFileName ( ) ) ) . '/../../views' ; } ; }
Injects Geocoder's data collector in the profiler
Injects Geocoder s data collector in the profiler