Commit 0d290f4d authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Modufucations pour passer à ZF3.

parent 0cd77a40
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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'     => [
+4 −4
Original line number Diff line number Diff line
@@ -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);