|
1
|
|
|
<?php |
|
2
|
|
|
declare(strict_types = 1); |
|
3
|
|
|
|
|
4
|
|
|
namespace Innmind\Rest\ServerBundle; |
|
5
|
|
|
|
|
6
|
|
|
use Innmind\Rest\ServerBundle\DependencyInjection\Compiler\{ |
|
7
|
|
|
RegisterDefinitionFilesPass, |
|
8
|
|
|
RegisterGatewaysPass, |
|
9
|
|
|
RegisterHttpHeaderFactoriesPass, |
|
10
|
|
|
RegisterRequestVerifiersPass, |
|
11
|
|
|
RegisterRangeExtractorsPass, |
|
12
|
|
|
RegisterHeaderBuildersPass |
|
13
|
|
|
}; |
|
14
|
|
|
use Innmind\Rest\Server\Action; |
|
15
|
|
|
use Symfony\Component\{ |
|
16
|
|
|
HttpKernel\Bundle\Bundle, |
|
17
|
|
|
DependencyInjection\ContainerBuilder |
|
18
|
|
|
}; |
|
19
|
|
|
|
|
20
|
|
|
final class InnmindRestServerBundle extends Bundle |
|
21
|
|
|
{ |
|
22
|
|
|
/** |
|
23
|
|
|
* {@inheritdoc} |
|
24
|
|
|
*/ |
|
25
|
46 |
|
public function build(ContainerBuilder $container) |
|
26
|
|
|
{ |
|
27
|
46 |
|
parent::build($container); |
|
28
|
|
|
|
|
29
|
|
|
$container |
|
30
|
46 |
|
->addCompilerPass(new RegisterDefinitionFilesPass) |
|
31
|
46 |
|
->addCompilerPass(new RegisterGatewaysPass) |
|
32
|
46 |
|
->addCompilerPass(new RegisterHttpHeaderFactoriesPass) |
|
33
|
46 |
|
->addCompilerPass(new RegisterRequestVerifiersPass) |
|
34
|
46 |
|
->addCompilerPass(new RegisterRangeExtractorsPass) |
|
35
|
46 |
|
->addCompilerPass(new RegisterHeaderBuildersPass(Action::list())) |
|
36
|
46 |
|
->addCompilerPass(new RegisterHeaderBuildersPass(Action::get())) |
|
37
|
46 |
|
->addCompilerPass(new RegisterHeaderBuildersPass(Action::create())) |
|
38
|
46 |
|
->addCompilerPass(new RegisterHeaderBuildersPass(Action::update())) |
|
39
|
46 |
|
->addCompilerPass(new RegisterHeaderBuildersPass(Action::remove())) |
|
40
|
46 |
|
->addCompilerPass(new RegisterHeaderBuildersPass(Action::link())) |
|
41
|
46 |
|
->addCompilerPass(new RegisterHeaderBuildersPass(Action::unlink())); |
|
42
|
46 |
|
} |
|
43
|
|
|
} |
|
44
|
|
|
|