Total Complexity | 8 |
Total Lines | 68 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 2 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
11 | trait ContainerAliasBindingsTrait |
||
12 | { |
||
13 | use ContainerAwareTrait { |
||
14 | initContainer as initContainerTrait; |
||
15 | } |
||
16 | |||
17 | public function initContainer() |
||
18 | { |
||
19 | $this->initContainerTrait(); |
||
20 | $this->initContainerBindings(); |
||
21 | } |
||
22 | |||
23 | protected function initContainerBindings() |
||
24 | { |
||
25 | } |
||
26 | |||
27 | /** |
||
28 | * @return ContainerInterface |
||
29 | */ |
||
30 | public function generateContainer() |
||
31 | { |
||
32 | return Container::getInstance(); |
||
33 | } |
||
34 | |||
35 | /** |
||
36 | * @param $alias |
||
37 | * @return mixed |
||
38 | */ |
||
39 | public function get($alias) |
||
40 | { |
||
41 | return $this->getContainer()->get($alias); |
||
42 | } |
||
43 | |||
44 | /** |
||
45 | * @param $alias |
||
46 | * @return mixed |
||
47 | */ |
||
48 | public function has($alias) |
||
49 | { |
||
50 | return $this->getContainer()->has($alias); |
||
51 | } |
||
52 | |||
53 | /** |
||
54 | * @param $alias |
||
55 | * @param null $concrete |
||
|
|||
56 | * @param bool $share |
||
57 | */ |
||
58 | public function set($alias, $concrete = null, $share = false) |
||
59 | { |
||
60 | $this->getContainer()->set($alias, $concrete, $share); |
||
61 | } |
||
62 | |||
63 | /** |
||
64 | * @param $alias |
||
65 | * @param null $concrete |
||
66 | */ |
||
67 | public function share($alias, $concrete = null) |
||
68 | { |
||
69 | $this->getContainer()->share($alias, $concrete); |
||
70 | } |
||
71 | |||
72 | /** |
||
73 | * @param string|ServiceProviderInterface $provider |
||
74 | * @return void |
||
75 | */ |
||
76 | public function addServiceProvider($provider) |
||
79 | } |
||
80 | } |
||
81 |