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 | /** @var string $proxyPath */ |
||
28 | private $proxyPath; |
||
29 | |||
30 | /** @var \Doctrine\ORM\Configuration $config */ |
||
31 | private $config; |
||
32 | |||
33 | public function __construct(){} |
||
35 | |||
36 | 9 | public static function getInstance() |
|
47 | |||
48 | |||
49 | /** |
||
50 | * @return PimpleContainer |
||
51 | */ |
||
52 | 7 | public function getContainer() |
|
74 | |||
75 | 7 | private function addProxyPath() |
|
81 | |||
82 | |||
83 | |||
84 | /** |
||
85 | * @param string $path |
||
86 | * @return $this |
||
87 | */ |
||
88 | 4 | public function addEntityPath($path) |
|
89 | { |
||
90 | 4 | if (is_dir($path)) { |
|
91 | 2 | $this->paths[] = $path; |
|
92 | } |
||
93 | |||
94 | 4 | return $this; |
|
95 | } |
||
96 | |||
97 | /** |
||
98 | * @return array |
||
99 | */ |
||
100 | 8 | public function getEntityPaths() |
|
104 | |||
105 | /** |
||
106 | * @param string $proxyPath |
||
107 | * @return ContainerService |
||
108 | */ |
||
109 | 1 | public function setProxyPath($proxyPath) |
|
114 | |||
115 | |||
116 | |||
117 | /** |
||
118 | * @return DbCredentials |
||
119 | */ |
||
120 | 8 | public function getDbCredentials() |
|
124 | |||
125 | /** |
||
126 | * @param DbCredentials $credentials |
||
127 | * @return $this |
||
128 | */ |
||
129 | 3 | public function setDbCredentials(DbCredentials $credentials) |
|
134 | |||
135 | |||
136 | 2 | public function registerToContainer(RegistrationInterface $config) |
|
143 | } |
||
144 |