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