1 | <?php |
||
15 | class SimpleEntityManagerFactory implements EntityManagerFactoryInterface |
||
16 | { |
||
17 | /** |
||
18 | * @var EntityManagerInterface |
||
19 | */ |
||
20 | protected static $defaultEntityManager; |
||
21 | |||
22 | /** |
||
23 | * @var EntityManagerInterface |
||
24 | */ |
||
25 | protected $entityManager; |
||
26 | |||
27 | /** |
||
28 | * Создает менеджер сущностей доктрины |
||
29 | * |
||
30 | * @param array $options |
||
31 | * |
||
32 | * @return EntityManagerInterface |
||
33 | * |
||
34 | * @throws Exception\RuntimeException |
||
35 | */ |
||
36 | public function factory(array $options = []) |
||
44 | |||
45 | /** |
||
46 | * @return EntityManagerInterface |
||
47 | * |
||
48 | * @throws Exception\RuntimeException |
||
49 | */ |
||
50 | public static function getDefaultEntityManager() |
||
58 | |||
59 | /** |
||
60 | * @param EntityManagerInterface $defaultEntityManager |
||
61 | */ |
||
62 | public static function setDefaultEntityManager(EntityManagerInterface $defaultEntityManager) |
||
66 | |||
67 | /** |
||
68 | * @return EntityManagerInterface |
||
69 | */ |
||
70 | public function getEntityManager() |
||
74 | |||
75 | /** |
||
76 | * @param EntityManagerInterface $entityManager |
||
77 | * |
||
78 | * @return $this |
||
79 | */ |
||
80 | public function setEntityManager(EntityManagerInterface $entityManager) |
||
86 | } |
||
87 |