1 | <?php |
||
18 | class EntityManagerFactory implements EntityManagerFactoryInterface |
||
19 | { |
||
20 | /** |
||
21 | * @var string |
||
22 | */ |
||
23 | const ENTITY_MANAGER_NAME = 'entityManagerName'; |
||
24 | |||
25 | /** |
||
26 | * Сервис локатор по умолчанию |
||
27 | * |
||
28 | * @var ServiceLocatorInterface |
||
29 | */ |
||
30 | protected static $defaultServiceLocator; |
||
31 | |||
32 | /** |
||
33 | * Сервис локатор |
||
34 | * |
||
35 | * @var ServiceLocatorInterface |
||
36 | */ |
||
37 | protected $serviceLocator; |
||
38 | |||
39 | /** |
||
40 | * Создает менеджер сущностей доктрины |
||
41 | * |
||
42 | * @param array $options |
||
43 | * |
||
44 | * @return EntityManagerInterface |
||
45 | * |
||
46 | * @throws Exception\InvalidArgumentException |
||
47 | * @throws \Zend\ServiceManager\Exception\ServiceNotFoundException |
||
48 | * @throws Exception\RuntimeException |
||
49 | */ |
||
50 | public function factory(array $options = []) |
||
60 | |||
61 | /** |
||
62 | * @return ServiceLocatorInterface |
||
63 | * |
||
64 | * @throws \OldTown\Workflow\Doctrine\ZF2\Exception\RuntimeException |
||
65 | */ |
||
66 | public function getServiceLocator() |
||
76 | |||
77 | /** |
||
78 | * @param ServiceLocatorInterface $serviceLocator |
||
79 | * |
||
80 | * @return $this |
||
81 | */ |
||
82 | public function setServiceLocator(ServiceLocatorInterface $serviceLocator) |
||
88 | |||
89 | /** |
||
90 | * @return ServiceLocatorInterface |
||
91 | * |
||
92 | * @throws Exception\RuntimeException |
||
93 | */ |
||
94 | public static function getDefaultServiceLocator() |
||
102 | |||
103 | /** |
||
104 | * @param ServiceLocatorInterface $defaultServiceLocator |
||
105 | */ |
||
106 | public static function setDefaultServiceLocator(ServiceLocatorInterface $defaultServiceLocator) |
||
110 | } |
||
111 |