diff --git a/README.md b/README.md index e14b838..5deec22 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ public function registerBundles() Default configuration: ```yml -gps_lab_geo_ip2: +gpslab_geoip: # Path to download GeoIP database. # It's a default value. You can change it. cache: '%kernel.cache_dir%/GeoLite2-Country.mmdb' diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php index c4f1804..13cd553 100644 --- a/src/DependencyInjection/Configuration.php +++ b/src/DependencyInjection/Configuration.php @@ -19,7 +19,7 @@ class Configuration implements ConfigurationInterface * * Example config: * - * gps_lab_geo_ip2: + * gpslab_geoip: * cache: '%kernel.cache_dir%/GeoLite2-Country.mmdb' * url: 'http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.mmdb.gz' * @@ -28,7 +28,7 @@ class Configuration implements ConfigurationInterface public function getConfigTreeBuilder() { return (new TreeBuilder()) - ->root('gps_lab_geo_ip2') + ->root('gpslab_geoip') ->children() ->scalarNode('cache') ->cannotBeEmpty() diff --git a/src/DependencyInjection/GpsLabGeoIP2Extension.php b/src/DependencyInjection/GpsLabGeoIP2Extension.php index 7a29fdc..b7c5d78 100644 --- a/src/DependencyInjection/GpsLabGeoIP2Extension.php +++ b/src/DependencyInjection/GpsLabGeoIP2Extension.php @@ -26,4 +26,12 @@ public function load(array $configs, ContainerBuilder $container) $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); $loader->load('services.yml'); } + + /** + * @return string + */ + public function getAlias() + { + return 'gpslab_geoip'; + } }