1 | <?php |
||
10 | class ContainerService |
||
11 | { |
||
12 | /** |
||
13 | * @var PimpleContainer |
||
14 | */ |
||
15 | private $container; |
||
16 | |||
17 | /** |
||
18 | * @var DbCredentials |
||
19 | */ |
||
20 | private $credentials; |
||
21 | |||
22 | /** |
||
23 | * @var array |
||
24 | */ |
||
25 | private $paths; |
||
26 | |||
27 | public function __construct(){} |
||
29 | |||
30 | 5 | public static function getInstance() |
|
31 | { |
||
32 | 5 | static $inst = null; |
|
33 | 5 | if($inst === null) |
|
34 | 5 | { |
|
35 | 1 | $inst = new ContainerService(); |
|
36 | 1 | $inst->container = new PimpleContainer(); |
|
37 | 1 | } |
|
38 | 5 | return $inst; |
|
39 | } |
||
40 | |||
41 | |||
42 | /** |
||
43 | * @return PimpleContainer |
||
44 | */ |
||
45 | 3 | public function getContainer() |
|
67 | |||
68 | |||
69 | |||
70 | /** |
||
71 | * @param string $path |
||
72 | * @return $this |
||
73 | */ |
||
74 | 2 | public function addEntityPath($path) |
|
82 | |||
83 | /** |
||
84 | * @return array |
||
85 | */ |
||
86 | 4 | public function getEntityPaths() |
|
90 | |||
91 | /** |
||
92 | * @return DbCredentials |
||
93 | */ |
||
94 | 4 | public function getDbCredentials() |
|
98 | |||
99 | /** |
||
100 | * @param DbCredentials $credentials |
||
101 | * @return $this |
||
102 | */ |
||
103 | 2 | public function setDbCredentials(DbCredentials $credentials) |
|
108 | |||
109 | |||
110 | public function registerToContainer(RegistrationInterface $config) |
||
114 | } |
||
115 |