-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathPartnerProviderCompilerPass.php
More file actions
36 lines (31 loc) · 1010 Bytes
/
PartnerProviderCompilerPass.php
File metadata and controls
36 lines (31 loc) · 1010 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
/**
* Created by PhpStorm.
* User: westin
* Date: 3/15/2015
* Time: 12:22 PM
*/
namespace TechData\AS2SecureBundle\DependencyInjection\CompilerPass;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
/**
* Class PartnerProviderCompilerPass
*
* @package TechData\AS2SecureBundle\DependencyInjection\CompilerPass
*/
class PartnerProviderCompilerPass implements CompilerPassInterface
{
/**
* @param ContainerBuilder $container
*/
public function process(ContainerBuilder $container)
{
$partnerProviderResolver = $container->getDefinition('tech_data_as2_secure.partner_provider.resolver');
foreach ($container->findTaggedServiceIds('tech_data_as2_partner') as $serviceId => $tags) {
$partnerProviderResolver->addMethodCall(
'add', [new Reference($serviceId)]
);
}
}
}