Loading config/module.config.php +4 −4 Changes for config/module.config.php: 4 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -4,8 +4,8 @@ namespace UnicaenLeocarte; use UnicaenLeocarte\Controller\IndexControllerFactory; use UnicaenLeocarte\Options\ModuleOptionsFactory; use UnicaenLeocarte\Service\LeocarteServiceFactory; use UnicaenLeocarte\Service\Soap\LeocarteSoapClientFactory; use UnicaenLeocarte\Service\Photo\PhotoServiceFactory; use UnicaenLeocarte\Service\Soap\SoapClientFactory; return [ 'bjyauthorize' => [ Loading Loading @@ -52,9 +52,9 @@ return [ ], 'service_manager' => [ 'factories' => [ 'UnicaenLeocarte\Service' => LeocarteServiceFactory::class, 'UnicaenLeocarte\Service' => PhotoServiceFactory::class, 'UnicaenLeocarte\Options' => ModuleOptionsFactory::class, 'UnicaenLeocarte\Soap\Client' => LeocarteSoapClientFactory::class, 'UnicaenLeocarte\Soap\Client' => SoapClientFactory::class, ], ], Loading src/UnicaenLeocarte/Controller/IndexController.php +7 −7 Changes for src/UnicaenLeocarte/Controller/IndexController.php: 7 added lines, 7 removed lines. Original line number Diff line number Diff line Loading @@ -4,14 +4,14 @@ namespace UnicaenLeocarte\Controller; use UnicaenLeocarte\Exception\ExtensionNotLoadedException; use UnicaenLeocarte\Exception\NotFoundException; use UnicaenLeocarte\Service\LeocarteServiceAwareInterface; use UnicaenLeocarte\Service\LeocarteServiceAwareTrait; use UnicaenLeocarte\Service\Photo\PhotoServiceAwareInterface; use UnicaenLeocarte\Service\Photo\PhotoServiceAwareTrait; use Zend\Http\PhpEnvironment\Response; use Zend\Mvc\Controller\AbstractActionController; class IndexController extends AbstractActionController implements LeocarteServiceAwareInterface class IndexController extends AbstractActionController implements PhotoServiceAwareInterface { use LeocarteServiceAwareTrait; use PhotoServiceAwareTrait; /** * @var bool Témoin indiquant si le droit d'utilisation de la photo doit être pris en considération ou non. Loading @@ -34,11 +34,11 @@ class IndexController extends AbstractActionController implements LeocarteServic try { $autorise = true; if ($this->checkDroitUtilisationPhoto) { $autorise = $this->leocarteService->getDroitUtilisationPhoto($id); $autorise = $this->photoService->getDroitUtilisationPhoto($id); } $content = $autorise ? $this->leocarteService->getPhoto($id) : $this->leocarteService->createPhotoNonAutorisee(); $this->photoService->getPhoto($id) : $this->photoService->createPhotoNonAutorisee(); } catch (NotFoundException $e) { // Requête infructueuse Loading src/UnicaenLeocarte/Controller/IndexControllerFactory.php +8 −3 Changes for src/UnicaenLeocarte/Controller/IndexControllerFactory.php: 8 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -2,18 +2,23 @@ namespace UnicaenLeocarte\Controller; use UnicaenLeocarte\Service\LeocarteService; use UnicaenLeocarte\Options\ModuleOptions; use UnicaenLeocarte\Service\Photo\PhotoService; use Zend\Mvc\Controller\ControllerManager; class IndexControllerFactory { function __invoke(ControllerManager $controllerManager) { /** @var LeocarteService $leocarteService */ /** @var ModuleOptions $options */ $options = $controllerManager->getServiceLocator()->get('UnicaenLeocarte\Options'); /** @var \UnicaenLeocarte\Service\Photo\PhotoService $leocarteService */ $service = $controllerManager->getServiceLocator()->get('UnicaenLeocarte\Service'); $controller = new IndexController(); $controller->setLeocarteService($service); $controller->setPhotoService($service); $controller->setCheckDroitUtilisationPhoto($options->getCheckDroitUtilisationPhoto()); return $controller; } Loading src/UnicaenLeocarte/Service/LeocarteServiceAwareInterface.php −8 File deleted. Show changes src/UnicaenLeocarte/Service/LeocarteServiceAwareTrait.php −19 File deleted. Show changes Loading
config/module.config.php +4 −4 Changes for config/module.config.php: 4 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -4,8 +4,8 @@ namespace UnicaenLeocarte; use UnicaenLeocarte\Controller\IndexControllerFactory; use UnicaenLeocarte\Options\ModuleOptionsFactory; use UnicaenLeocarte\Service\LeocarteServiceFactory; use UnicaenLeocarte\Service\Soap\LeocarteSoapClientFactory; use UnicaenLeocarte\Service\Photo\PhotoServiceFactory; use UnicaenLeocarte\Service\Soap\SoapClientFactory; return [ 'bjyauthorize' => [ Loading Loading @@ -52,9 +52,9 @@ return [ ], 'service_manager' => [ 'factories' => [ 'UnicaenLeocarte\Service' => LeocarteServiceFactory::class, 'UnicaenLeocarte\Service' => PhotoServiceFactory::class, 'UnicaenLeocarte\Options' => ModuleOptionsFactory::class, 'UnicaenLeocarte\Soap\Client' => LeocarteSoapClientFactory::class, 'UnicaenLeocarte\Soap\Client' => SoapClientFactory::class, ], ], Loading
src/UnicaenLeocarte/Controller/IndexController.php +7 −7 Changes for src/UnicaenLeocarte/Controller/IndexController.php: 7 added lines, 7 removed lines. Original line number Diff line number Diff line Loading @@ -4,14 +4,14 @@ namespace UnicaenLeocarte\Controller; use UnicaenLeocarte\Exception\ExtensionNotLoadedException; use UnicaenLeocarte\Exception\NotFoundException; use UnicaenLeocarte\Service\LeocarteServiceAwareInterface; use UnicaenLeocarte\Service\LeocarteServiceAwareTrait; use UnicaenLeocarte\Service\Photo\PhotoServiceAwareInterface; use UnicaenLeocarte\Service\Photo\PhotoServiceAwareTrait; use Zend\Http\PhpEnvironment\Response; use Zend\Mvc\Controller\AbstractActionController; class IndexController extends AbstractActionController implements LeocarteServiceAwareInterface class IndexController extends AbstractActionController implements PhotoServiceAwareInterface { use LeocarteServiceAwareTrait; use PhotoServiceAwareTrait; /** * @var bool Témoin indiquant si le droit d'utilisation de la photo doit être pris en considération ou non. Loading @@ -34,11 +34,11 @@ class IndexController extends AbstractActionController implements LeocarteServic try { $autorise = true; if ($this->checkDroitUtilisationPhoto) { $autorise = $this->leocarteService->getDroitUtilisationPhoto($id); $autorise = $this->photoService->getDroitUtilisationPhoto($id); } $content = $autorise ? $this->leocarteService->getPhoto($id) : $this->leocarteService->createPhotoNonAutorisee(); $this->photoService->getPhoto($id) : $this->photoService->createPhotoNonAutorisee(); } catch (NotFoundException $e) { // Requête infructueuse Loading
src/UnicaenLeocarte/Controller/IndexControllerFactory.php +8 −3 Changes for src/UnicaenLeocarte/Controller/IndexControllerFactory.php: 8 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -2,18 +2,23 @@ namespace UnicaenLeocarte\Controller; use UnicaenLeocarte\Service\LeocarteService; use UnicaenLeocarte\Options\ModuleOptions; use UnicaenLeocarte\Service\Photo\PhotoService; use Zend\Mvc\Controller\ControllerManager; class IndexControllerFactory { function __invoke(ControllerManager $controllerManager) { /** @var LeocarteService $leocarteService */ /** @var ModuleOptions $options */ $options = $controllerManager->getServiceLocator()->get('UnicaenLeocarte\Options'); /** @var \UnicaenLeocarte\Service\Photo\PhotoService $leocarteService */ $service = $controllerManager->getServiceLocator()->get('UnicaenLeocarte\Service'); $controller = new IndexController(); $controller->setLeocarteService($service); $controller->setPhotoService($service); $controller->setCheckDroitUtilisationPhoto($options->getCheckDroitUtilisationPhoto()); return $controller; } Loading