forked from cleverage/process-bundle
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCleverAgeProcessBundle.php
More file actions
43 lines (39 loc) · 1.32 KB
/
CleverAgeProcessBundle.php
File metadata and controls
43 lines (39 loc) · 1.32 KB
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
37
38
39
40
41
42
43
<?php declare(strict_types=1);
/*
* This file is part of the CleverAge/ProcessBundle package.
*
* Copyright (C) 2017-2021 Clever-Age
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CleverAge\ProcessBundle;
use CleverAge\ProcessBundle\DependencyInjection\Compiler\CheckSerializerCompilerPass;
use CleverAge\ProcessBundle\DependencyInjection\Compiler\RegistryCompilerPass;
use CleverAge\ProcessBundle\Registry\TransformerRegistry;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;
/**
* @author Valentin Clavreul <vclavreul@clever-age.com>
* @author Vincent Chalnot <vchalnot@clever-age.com>
* @author Madeline Veyrenc <mveyrenc@clever-age.com>
*/
class CleverAgeProcessBundle extends Bundle
{
/**
* Adding compiler passes to inject services into registry
*
* @param ContainerBuilder $container
*/
public function build(ContainerBuilder $container): void
{
$container->addCompilerPass(
new RegistryCompilerPass(
TransformerRegistry::class,
'cleverage.transformer',
'addTransformer'
)
);
$container->addCompilerPass(new CheckSerializerCompilerPass());
}
}