1 | <?php |
||
2 | |||
3 | /* |
||
4 | * This file is part of the xAPI package. |
||
5 | * |
||
6 | * (c) Christian Flothmann <[email protected]> |
||
7 | * |
||
8 | * For the full copyright and license information, please view the LICENSE |
||
9 | * file that was distributed with this source code. |
||
10 | */ |
||
11 | |||
12 | namespace Xabbuh\XApi\Bundle\ClientBundle; |
||
13 | |||
14 | use Symfony\Component\DependencyInjection\ContainerBuilder; |
||
15 | use Symfony\Component\HttpKernel\Bundle\Bundle; |
||
16 | use Xabbuh\XApi\Bundle\ClientBundle\DependencyInjection\Compiler\RegisterClientsPass; |
||
17 | use Xabbuh\XApi\Bundle\ClientBundle\DependencyInjection\Compiler\RegisterSerializerMetadataPass; |
||
18 | use Xabbuh\XApi\Bundle\ClientBundle\DependencyInjection\XabbuhXApiClientExtension; |
||
19 | |||
20 | /** |
||
21 | * Experience API client bundle. |
||
22 | * |
||
23 | * @author Christian Flothmann <[email protected]> |
||
24 | */ |
||
25 | class XabbuhXApiClientBundle extends Bundle |
||
26 | { |
||
27 | /** |
||
28 | * {@inheritDoc} |
||
29 | */ |
||
30 | public function build(ContainerBuilder $container) |
||
31 | { |
||
32 | $container->addCompilerPass(new RegisterClientsPass()); |
||
33 | $container->addCompilerPass(new RegisterSerializerMetadataPass()); |
||
34 | } |
||
35 | |||
36 | /** |
||
37 | * {@inheritDoc} |
||
38 | */ |
||
39 | public function getContainerExtension() |
||
40 | { |
||
41 | if (null === $this->extension) { |
||
42 | $this->extension = new XabbuhXApiClientExtension(); |
||
43 | } |
||
44 | |||
45 | return $this->extension; |
||
46 | } |
||
47 | } |
||
48 |