for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
/*
* This file is part of the Superdesk Publisher Geo IP Bundle.
*
* Copyright 2019 Sourcefabric z.ú. and contributors.
* For the full copyright and license information, please see the
* AUTHORS and LICENSE files distributed with this source code.
* @copyright 2019 Sourcefabric z.ú
* @license http://www.superdesk.org/license
*/
namespace SWP\Bundle\GeoIPBundle\DependencyInjection;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Extension\Extension;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
class SWPGeoIPExtension extends Extension
{
public function load(array $configs, ContainerBuilder $container): void
$configuration = new Configuration();
$config = $this->processConfiguration($configuration, $configs);
$loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
$loader->load('services.yaml');
$container->setParameter('swp.geo_ip.database_url', $config['database_url']);
$container->setParameter('swp.geo_ip.database_path', $config['database_path']);
}