File tree Expand file tree Collapse file tree 2 files changed +51
-0
lines changed
Resources/DependencyInjection Expand file tree Collapse file tree 2 files changed +51
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Jaeger \Symfony ;
4+
5+ use Jaeger \Symfony \Resources \DependencyInjection \CodecRegistryCompilerPass ;
6+ use Jaeger \Symfony \Resources \DependencyInjection \ContextExtractorChainCompilerPass ;
7+ use Jaeger \Symfony \Resources \DependencyInjection \DebugExtractorChainCompilerPass ;
8+ use Jaeger \Symfony \Resources \DependencyInjection \JaegerExtension ;
9+ use Jaeger \Symfony \Resources \DependencyInjection \NameGeneratorChainCompilerPass ;
10+ use Symfony \Component \DependencyInjection \ContainerBuilder ;
11+ use Symfony \Component \HttpKernel \Bundle \Bundle ;
12+
13+ class JaegerBundle extends Bundle
14+ {
15+ public function build (ContainerBuilder $ container )
16+ {
17+ parent ::build ($ container );
18+
19+ $ container
20+ ->addCompilerPass (new CodecRegistryCompilerPass ())
21+ ->addCompilerPass (new ContextExtractorChainCompilerPass ())
22+ ->addCompilerPass (new DebugExtractorChainCompilerPass ())
23+ ->addCompilerPass (new NameGeneratorChainCompilerPass ());
24+ }
25+
26+
27+ public function getContainerExtension ()
28+ {
29+ return new JaegerExtension ();
30+ }
31+ }
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Jaeger \Symfony \Resources \DependencyInjection ;
4+
5+ use Symfony \Component \Config \FileLocator ;
6+ use Symfony \Component \DependencyInjection \ContainerBuilder ;
7+ use Symfony \Component \DependencyInjection \Extension \Extension ;
8+ use Symfony \Component \DependencyInjection \Loader \YamlFileLoader ;
9+
10+ class JaegerExtension extends Extension
11+ {
12+ public function load (array $ configs , ContainerBuilder $ container )
13+ {
14+ $ loader = new YamlFileLoader (
15+ $ container ,
16+ new FileLocator (__DIR__ . '/../config ' )
17+ );
18+ $ loader ->load ('services.yml ' );
19+ }
20+ }
You can’t perform that action at this time.
0 commit comments