File tree 2 files changed +48
-0
lines changed
src/Markdown/DependencyInjection 2 files changed +48
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ declare (strict_types=1 );
4
+
5
+ use Symfony \Component \DependencyInjection \Loader \Configurator \ContainerConfigurator ;
6
+
7
+ return static function (ContainerConfigurator $ container ): void {
8
+ $ container ->services ()
9
+ ->defaults ()
10
+ ->autowire ()
11
+ ->autoconfigure ();
12
+ };
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ declare (strict_types=1 );
4
+
5
+ namespace phpDocumentor \Guides \Markdown \DependencyInjection ;
6
+
7
+ use Symfony \Component \Config \FileLocator ;
8
+ use Symfony \Component \DependencyInjection \Compiler \CompilerPassInterface ;
9
+ use Symfony \Component \DependencyInjection \ContainerBuilder ;
10
+ use Symfony \Component \DependencyInjection \Extension \Extension ;
11
+ use Symfony \Component \DependencyInjection \Extension \PrependExtensionInterface ;
12
+ use Symfony \Component \DependencyInjection \Loader \PhpFileLoader ;
13
+
14
+ use function dirname ;
15
+
16
+ class MarkdownExtension extends Extension implements PrependExtensionInterface, CompilerPassInterface
17
+ {
18
+ /** @param mixed[] $configs */
19
+ public function load (array $ configs , ContainerBuilder $ container ): void
20
+ {
21
+ $ loader = new PhpFileLoader (
22
+ $ container ,
23
+ new FileLocator (dirname (__DIR__ , 3 ) . '/resources/config ' ),
24
+ );
25
+
26
+ $ loader ->load ('guides-markdown.php ' );
27
+ }
28
+
29
+ public function prepend (ContainerBuilder $ container ): void
30
+ {
31
+ }
32
+
33
+ public function process (ContainerBuilder $ container ): void
34
+ {
35
+ }
36
+ }
You can’t perform that action at this time.
0 commit comments