Skip to content
Snippets Groups Projects
Commit 0d290f4d authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Modufucations pour passer à ZF3.

parent 0cd77a40
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,7 @@
namespace UnicaenLeocarte;
use UnicaenAuth\Guard\PrivilegeController;
use UnicaenLeocarte\Controller\IndexControllerFactory;
use UnicaenLeocarte\Options\ModuleOptionsFactory;
use UnicaenLeocarte\Service\Photo\PhotoServiceFactory;
......@@ -10,7 +11,7 @@ use UnicaenLeocarte\Service\Soap\SoapClientFactory;
return [
'bjyauthorize' => [
'guards' => [
'UnicaenAuth\Guard\PrivilegeController' => [
PrivilegeController::class => [
[
'controller' => 'UnicaenLeocarte\Controller\Index',
'action' => [
......
......@@ -2,8 +2,8 @@
namespace UnicaenLeocarte\Controller;
use Interop\Container\ContainerInterface;
use UnicaenLeocarte\Options\ModuleOptions;
use Zend\Mvc\Controller\ControllerManager;
/**
* IndexController factory.
......@@ -12,13 +12,13 @@ use Zend\Mvc\Controller\ControllerManager;
*/
class IndexControllerFactory
{
function __invoke(ControllerManager $controllerManager)
function __invoke(ContainerInterface $container)
{
/** @var ModuleOptions $options */
$options = $controllerManager->get('UnicaenLeocarte\Options');
$options = $container->get('UnicaenLeocarte\Options');
/** @var \UnicaenLeocarte\Service\Photo\PhotoService $photoService */
$photoService = $controllerManager->get('UnicaenLeocarte\Service\Photo');
$photoService = $container->get('UnicaenLeocarte\Service\Photo');
$controller = new IndexController();
$controller->setPhotoService($photoService);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment