1 | <?php |
||
28 | class EntityManagerProvider |
||
29 | { |
||
30 | /** |
||
31 | * The config. |
||
32 | * |
||
33 | * @var Config |
||
34 | */ |
||
35 | protected $config; |
||
36 | |||
37 | /** |
||
38 | * The cache. |
||
39 | * |
||
40 | * @var Cache |
||
41 | */ |
||
42 | protected $cache; |
||
43 | |||
44 | /** |
||
45 | * The mapping driver. |
||
46 | * |
||
47 | * @var MappingDriver |
||
48 | */ |
||
49 | protected $mappingDriver; |
||
50 | |||
51 | /** |
||
52 | * The entity manager config. |
||
53 | * |
||
54 | * @var EntityManagerConfig |
||
55 | */ |
||
56 | protected $entityManagerConfig; |
||
57 | |||
58 | /** |
||
59 | * The event manager. |
||
60 | * |
||
61 | * @var EventManager |
||
62 | */ |
||
63 | protected $eventManager; |
||
64 | |||
65 | /** |
||
66 | * The connection. |
||
67 | * |
||
68 | * @var Connection |
||
69 | */ |
||
70 | protected $connection; |
||
71 | |||
72 | /** |
||
73 | * The entity manager. |
||
74 | * |
||
75 | * @var EntityManagerInterface |
||
76 | */ |
||
77 | protected $entityManager; |
||
78 | |||
79 | /** |
||
80 | * Create entity manager provider object. |
||
81 | * |
||
82 | * @param Config $config |
||
83 | * @param Cache $cache |
||
84 | * @param MappingDriver $mappingDriver |
||
85 | */ |
||
86 | 8 | public function __construct(Config $config, Cache $cache, MappingDriver $mappingDriver) |
|
92 | |||
93 | /** |
||
94 | * Get entity manager config. |
||
95 | * |
||
96 | * @return EntityManagerConfig |
||
97 | */ |
||
98 | 8 | public function getEntityManagerConfig() |
|
121 | |||
122 | /** |
||
123 | * Get event manager. |
||
124 | * |
||
125 | * @return EventManager |
||
126 | */ |
||
127 | 6 | public function getEventManager() |
|
145 | |||
146 | /** |
||
147 | * Get connection. |
||
148 | * |
||
149 | * @return Connection |
||
150 | */ |
||
151 | 4 | public function getConnection() |
|
168 | |||
169 | /** |
||
170 | * Get entity manager. |
||
171 | * |
||
172 | * @return EntityManagerInterface |
||
173 | */ |
||
174 | 2 | public function getEntityManager() |
|
188 | } |
||
189 |