From a14aca2aa6fda0eb558071347776f5eed8360a10 Mon Sep 17 00:00:00 2001 From: "bruno.spyckerelle" Date: Wed, 4 Dec 2019 11:56:49 +0100 Subject: [PATCH] ZF3 compat #3 --- .../Factory/MattermostChatControllerFactory.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/MattermostMessenger/Controller/Factory/MattermostChatControllerFactory.php b/src/MattermostMessenger/Controller/Factory/MattermostChatControllerFactory.php index 0cfaa32..f0e8cf7 100644 --- a/src/MattermostMessenger/Controller/Factory/MattermostChatControllerFactory.php +++ b/src/MattermostMessenger/Controller/Factory/MattermostChatControllerFactory.php @@ -17,18 +17,17 @@ */ namespace MattermostMessenger\Controller\Factory; +use Interop\Container\ContainerInterface; use MattermostMessenger\Controller\MattermostChatController; -use Zend\ServiceManager\FactoryInterface; -use Zend\ServiceManager\ServiceLocatorInterface; +use Zend\ServiceManager\Factory\FactoryInterface; class MattermostChatControllerFactory implements FactoryInterface { - public function createService(ServiceLocatorInterface $serviceLocator) + public function __invoke(ContainerInterface $container, $requestedName, array $options = null) { - $service = $serviceLocator->getServiceLocator(); return new MattermostChatController( - $service->get('mattermostservice'), - $service->get('MaglMarkdown\MarkdownService') + $container->get('mattermostservice'), + $container->get('MaglMarkdown\MarkdownService') ); }