1 | <?php |
||
38 | abstract class AbstractValidatorFactory implements FactoryInterface |
||
|
|||
39 | { |
||
40 | const DEFAULT_OBJECTMANAGER_KEY = 'doctrine.entitymanager.orm_default'; |
||
41 | |||
42 | protected $creationOptions = []; |
||
43 | |||
44 | protected $validatorClass; |
||
45 | |||
46 | /** |
||
47 | * @param ContainerInterface $container |
||
48 | * @param array $options |
||
49 | * @return \Doctrine\Common\Persistence\ObjectRepository |
||
50 | * @throws ServiceCreationException |
||
51 | */ |
||
52 | 3 | protected function getRepository(ContainerInterface $container, array $options) |
|
67 | |||
68 | /** |
||
69 | * @param ContainerInterface $container |
||
70 | * @param array $options |
||
71 | * @return \Doctrine\Common\Persistence\ObjectManager |
||
72 | */ |
||
73 | 2 | protected function getObjectManager(ContainerInterface $container, array $options) |
|
74 | { |
||
75 | 2 | $objectManager = isset($options['object_manager']) ? $options['object_manager'] : self::DEFAULT_OBJECTMANAGER_KEY; |
|
76 | 2 | if (is_string($objectManager)) { |
|
77 | 1 | $objectManager = $container->get($objectManager); |
|
78 | 1 | } |
|
79 | |||
80 | 2 | return $objectManager; |
|
81 | } |
||
82 | |||
83 | /** |
||
84 | * @param array $options |
||
85 | * @return array |
||
86 | */ |
||
87 | 2 | protected function getFields(array $options) |
|
95 | |||
96 | /** |
||
97 | * Helper to merge options array passed to `__invoke` |
||
98 | * together with the options array created based on the above |
||
99 | * helper methods. |
||
100 | * |
||
101 | * @param array $previousOptions |
||
102 | * @param array $newOptions |
||
103 | * @return array |
||
104 | */ |
||
105 | 1 | protected function merge($previousOptions, $newOptions) |
|
106 | { |
||
107 | 1 | return ArrayUtils::merge($previousOptions, $newOptions, true); |
|
108 | } |
||
109 | |||
110 | /** |
||
111 | * Helper method for ZF2 compatiblity. |
||
112 | * |
||
113 | * In ZF2 the plugin manager instance if passed to `createService` |
||
114 | * instead of the global service manager instance (as in ZF3). |
||
115 | * |
||
116 | * @param ContainerInterface $container |
||
117 | * @return ContainerInterface |
||
118 | */ |
||
119 | 2 | protected function container(ContainerInterface $container) |
|
127 | |||
128 | 1 | public function createService(ServiceLocatorInterface $serviceLocator) |
|
132 | |||
133 | 1 | public function setCreationOptions(array $options) |
|
137 | } |
||
138 |
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.