services:
    _instanceof:
        Geocoder\Dumper\Dumper:
            tags: ['bazinga_geocoder.dumper']
            public: true

    Geocoder\Dumper\GeoArray: ~
    Geocoder\Dumper\GeoJson: ~
    Geocoder\Dumper\Gpx: ~
    Geocoder\Dumper\Kml: ~
    Geocoder\Dumper\Wkb: ~
    Geocoder\Dumper\Wkt: ~

    Bazinga\GeocoderBundle\ProviderFactory\:
        resource: '../src/ProviderFactory'
        public: false
        autowire: true
        autoconfigure: true

    Geocoder\ProviderAggregator:
        class: Geocoder\ProviderAggregator

    Bazinga\GeocoderBundle\Plugin\FakeIpPlugin:
        class: Bazinga\GeocoderBundle\Plugin\FakeIpPlugin
        arguments: [~, ~, false]

    Bazinga\GeocoderBundle\Command\GeocodeCommand:
        arguments: ['@Geocoder\ProviderAggregator']
        tags:
            - { name: 'console.command', command: 'geocoder:geocode', description: 'Geocode an address or a ip address' }

    Bazinga\GeocoderBundle\Validator\Constraint\AddressValidator:
        arguments: ['@geocoder']
        tags: ['validator.constraint_validator']

    # Keep these aliases for BC purpose
    bazinga_geocoder.geocoder:
        alias: "Geocoder\\ProviderAggregator"

    geocoder:
        alias: "Geocoder\\ProviderAggregator"
