<?php
namespace Galilee\InstallerBundle;
use Galilee\InstallerBundle\DependencyInjection\Compiler\CustomExporterPass;
use Galilee\InstallerBundle\DependencyInjection\Compiler\CustomInstallerPass;
use Galilee\InstallerBundle\Exporter\CustomExporterInterface;
use Galilee\InstallerBundle\Installer\CustomInstallerInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class GalileeInstallersBundle extends Bundle
{
/**
* {@inheritdoc}
*/
public function build(ContainerBuilder $container)
{
// registerForAutoconfiguration is eq to service.yml._instanceof but allow auto-tag outside bundle
$container->registerForAutoconfiguration(CustomInstallerInterface::class)
->addTag('galilee.custom_installer');
$container->addCompilerPass(new CustomInstallerPass());
$container->registerForAutoconfiguration(CustomExporterInterface::class)
->addTag('galilee.custom_exporter');
$container->addCompilerPass(new CustomExporterPass());
}
}