|
9 | 9 |
|
10 | 10 | namespace Zend\Mvc\Service;
|
11 | 11 |
|
12 |
| -use Interop\Container\ContainerInterface; |
13 |
| -use Zend\ServiceManager\Di\DiAbstractServiceFactory; |
14 |
| -use Zend\ServiceManager\FactoryInterface; |
15 |
| -use Zend\ServiceManager\ServiceLocatorInterface; |
16 |
| -use Zend\ServiceManager\ServiceManager; |
| 12 | +use Zend\ServiceManager\Di\DiAbstractServiceFactoryFactory as OriginalFactory; |
17 | 13 |
|
18 |
| -class DiAbstractServiceFactoryFactory implements FactoryInterface |
| 14 | +/** |
| 15 | + * Since 2.7.9, this class now extends the version defined in zend-servicemanager-di, |
| 16 | + * ensuring backwards compatibility with zend-servicemanger v2 and forwards |
| 17 | + * compatibility with zend-servicemanager v3. |
| 18 | + * |
| 19 | + * @deprecated Since 2.7.9. The factory is now defined in zend-servicemanager-di, |
| 20 | + * and removed in 3.0.0. Use Zend\ServiceManager\Di\DiAbstractServiceFactoryFactory |
| 21 | + * from zend-servicemanager-di instead if you rely on this feature. |
| 22 | + */ |
| 23 | +class DiAbstractServiceFactoryFactory extends OriginalFactory |
19 | 24 | {
|
20 |
| - /** |
21 |
| - * Class responsible for instantiating a DiAbstractServiceFactory |
22 |
| - * |
23 |
| - * @param ContainerInterface $container |
24 |
| - * @param string $name |
25 |
| - * @param null|array $options |
26 |
| - * @return DiAbstractServiceFactory |
27 |
| - */ |
28 |
| - public function __invoke(ContainerInterface $container, $name, array $options = null) |
29 |
| - { |
30 |
| - $factory = new DiAbstractServiceFactory($container->get('Di'), DiAbstractServiceFactory::USE_SL_BEFORE_DI); |
31 |
| - |
32 |
| - if ($serviceLocator instanceof ServiceManager) { |
33 |
| - $serviceLocator->addAbstractFactory($factory, false); |
34 |
| - } |
35 |
| - |
36 |
| - return $factory; |
37 |
| - } |
38 |
| - |
39 |
| - /** |
40 |
| - * Create and return DiAbstractServiceFactory instance |
41 |
| - * |
42 |
| - * For use with zend-servicemanager v2; proxies to __invoke(). |
43 |
| - * |
44 |
| - * @param ServiceLocatorInterface $container |
45 |
| - * @return DiAbstractServiceFactory |
46 |
| - */ |
47 |
| - public function createService(ServiceLocatorInterface $container) |
48 |
| - { |
49 |
| - return $this($container, DiAbstractServiceFactory::class); |
50 |
| - } |
51 | 25 | }
|
0 commit comments