1: <?php
2: namespace TIC\DemoBundle\DependencyInjection;
3:
4: use Symfony\Component\HttpKernel\DependencyInjection\Extension;
5: #use Symfony\Component\DependencyInjection\Extension\Extension;
6: use Symfony\Component\DependencyInjection\ContainerBuilder;
7: use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
8: use Symfony\Component\Config\FileLocator;
9:
10: /**
11: * Chargement des configurations et initialisation du bundle.
12: * @link http://symfony.com/doc/current/bundles/extension.html
13: */
14: class TICDemoExtension extends Extension
15: {
16:
17: /**
18: * {@inheritDoc}
19: */
20: public function load(array $configs, ContainerBuilder $container)
21: {
22: # $configuration = new Configuration();
23: # $config = $this->processConfiguration($configuration, $configs);
24:
25: $loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../../config'));
26: $loader->load('services.yaml');
27:
28: // Parent requis : Symfony\Component\HttpKernel\DependencyInjection\Extension
29: $this->addAnnotatedClassesToCompile([
30: "TIC\\DemoBundle\\Controller\\",
31: ]);
32: }
33:
34: }
35: