mirror of
https://github.com/opdavies/gmail-filter-builder.git
synced 2025-09-05 05:05:32 +01:00
22 lines
682 B
PHP
22 lines
682 B
PHP
<?php
|
|
|
|
namespace Opdavies\GmailFilterBuilder\Container;
|
|
|
|
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
|
|
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
|
use Symfony\Component\DependencyInjection\Reference;
|
|
|
|
class CommandCompilerClass implements CompilerPassInterface
|
|
{
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function process(ContainerBuilder $container) {
|
|
$definition = $container->findDefinition('app.cli');
|
|
$taggedServices = $container->findTaggedServiceIds('ConsoleCommand');
|
|
|
|
foreach ($taggedServices as $id => $tags) {
|
|
$definition->addMethodCall('add', [new Reference($id)]);
|
|
}
|
|
}
|
|
}
|