1 | <?php |
||
26 | class EntityManagerProvider |
||
27 | { |
||
28 | /** |
||
29 | * The config. |
||
30 | * |
||
31 | * @var Config |
||
32 | */ |
||
33 | protected $config; |
||
34 | |||
35 | /** |
||
36 | * The cache. |
||
37 | * |
||
38 | * @var Cache |
||
39 | */ |
||
40 | protected $cache; |
||
41 | |||
42 | /** |
||
43 | * The mapping driver. |
||
44 | * |
||
45 | * @var MappingDriver |
||
46 | */ |
||
47 | protected $mappingDriver; |
||
48 | |||
49 | /** |
||
50 | * The entity manager config. |
||
51 | * |
||
52 | * @var EntityManagerConfig |
||
53 | */ |
||
54 | protected $entityManagerConfig; |
||
55 | |||
56 | /** |
||
57 | * The entity manager. |
||
58 | * |
||
59 | * @var EntityManagerInterface |
||
60 | */ |
||
61 | protected $entityManager; |
||
62 | |||
63 | /** |
||
64 | * Create entity manager provider object. |
||
65 | * |
||
66 | * @param Config $config |
||
67 | * @param Cache $cache |
||
68 | * @param MappingDriver $mappingDriver |
||
69 | */ |
||
70 | public function __construct(Config $config, Cache $cache, MappingDriver $mappingDriver) |
||
76 | |||
77 | /** |
||
78 | * Get entity manager config. |
||
79 | * |
||
80 | * @return EntityManagerConfig |
||
81 | */ |
||
82 | public function getEntityManagerConfig() |
||
105 | |||
106 | /** |
||
107 | * Get entity manager. |
||
108 | * |
||
109 | * @return EntityManagerInterface |
||
110 | */ |
||
111 | public function getEntityManager() |
||
135 | } |
||
136 |