We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e7ef089 commit 591b2ebCopy full SHA for 591b2eb
1 file changed
src/Bridge/Symfony/KernelAwareTrait.php
@@ -0,0 +1,30 @@
1
+<?php
2
+
3
+namespace Yannoff\Component\Console\Bridge\Symfony;
4
5
+trait KernelAware
6
+{
7
+ protected $kernel;
8
9
+ public function getKernel()
10
+ {
11
+ return $this->kernel;
12
+ }
13
14
+ public function setKernel($kernel)
15
16
+ $this->kernel = $kernel;
17
18
+ return $this;
19
20
21
+ public function getContainer()
22
23
+ return $this->kernel->getContainer();
24
25
26
+ public function get($service)
27
28
+ return $this->kernel->getContainer()->get($service);
29
30
+}
0 commit comments