1 | <?php |
||
13 | class ImageControllerFactory implements FactoryInterface |
||
|
|||
14 | { |
||
15 | |||
16 | /** |
||
17 | * Create an object |
||
18 | * |
||
19 | * @param ContainerInterface $container |
||
20 | * @param string $requestedName |
||
21 | * @param null|array $options |
||
22 | * |
||
23 | * @return ImageController |
||
24 | * @throws ServiceNotFoundException if unable to resolve the service. |
||
25 | * @throws ServiceNotCreatedException if an exception is raised when |
||
26 | * creating a service. |
||
27 | * @throws ContainerException if any other error occurs |
||
28 | */ |
||
29 | 1 | public function __invoke(ContainerInterface $container, $requestedName, array $options = null) |
|
30 | { |
||
31 | 1 | if (!method_exists($container, 'configure')) { |
|
32 | $container = $container->getServiceLocator(); |
||
33 | } |
||
34 | |||
35 | /** @var \HtImgModule\Service\ImageService $imageService */ |
||
36 | 1 | $imageService = $container->get(ImageService::class); |
|
37 | |||
38 | 1 | return new ImageController($imageService); |
|
39 | } |
||
40 | |||
41 | 1 | public function createService(ServiceLocatorInterface $controllers) |
|
45 | } |
||
46 |
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.