protected function injectServices(Container $app)
    {
        if (isset($app['profiler'])) {
            $app['geocoder.logger'] = function($app) {
                return new \Geocoder\Logger\GeocoderLogger();
            };

            $app['geocoder'] = function($app) {
                $geocoder = new \Geocoder\LoggableGeocoder();
                $geocoder->setLogger($app['geocoder.logger']);
                $geocoder->registerProvider($app['geocoder.provider']);

                return $geocoder;
            };
        } else {
            $app['geocoder'] = function($app) {
                $geocoder = new \Geocoder\Geocoder();
                $geocoder->registerProvider($app['geocoder.provider']);

                return $geocoder;
            };
        }

        $app['geocoder.provider'] = function($app) {
            return new \Geocoder\Provider\FreeGeoIpProvider($app['geocoder.adapter']);
        };

        $app['geocoder.adapter'] = function($app) {
            return new \Geocoder\HttpAdapter\CurlHttpAdapter();
        };
    }