Load services in bundle class
This commit is contained in:
@@ -4,6 +4,16 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace Pcm\GeocodeBundle;
|
namespace Pcm\GeocodeBundle;
|
||||||
|
|
||||||
|
use Symfony\Component\Config\FileLocator;
|
||||||
|
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||||
|
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||||
|
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
|
||||||
use Symfony\Component\HttpKernel\Bundle\AbstractBundle;
|
use Symfony\Component\HttpKernel\Bundle\AbstractBundle;
|
||||||
|
|
||||||
class PcmGeocodeBundle extends AbstractBundle {}
|
class PcmGeocodeBundle extends AbstractBundle {
|
||||||
|
public function loadExtension(array $config, ContainerConfigurator $container, ContainerBuilder $builder): void
|
||||||
|
{
|
||||||
|
$loader = new YamlFileLoader($builder, new FileLocator(__DIR__.'/../config/'));
|
||||||
|
$loader->load('services.yml');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user