Commit 853ef257 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Corrections pour passer à ZF3.

parent 85d1e8a6
Pipeline #4015 passed with stage
in 19 seconds
......@@ -2,27 +2,27 @@
namespace UnicaenAuth\Controller;
use Interop\Container\ContainerInterface;
use UnicaenAuth\Service\ShibService;
use UnicaenAuth\Service\User as UserService;
use Zend\Authentication\AuthenticationService;
use Zend\Mvc\Controller\ControllerManager;
class AuthControllerFactory
{
/**
* @param ControllerManager $cm
* @param ContainerInterface $container
* @return AuthController
*/
public function __invoke(ControllerManager $cm)
public function __invoke(ContainerInterface $container)
{
/** @var ShibService $shibService */
$shibService = $cm->get(ShibService::class);
$shibService = $container->get(ShibService::class);
/* @var $userService UserService */
$userService = $cm->get('unicaen-auth_user_service');
$userService = $container->get('unicaen-auth_user_service');
/** @var AuthenticationService $authService */
$authService = $cm->get('zfcuser_auth_service');
$authService = $container->get('zfcuser_auth_service');
$controller = new AuthController();
$controller->setShibService($shibService);
......
......@@ -2,25 +2,25 @@
namespace UnicaenAuth\Controller;
use Interop\Container\ContainerInterface;
use UnicaenAuth\Form\Droits\RoleForm;
use UnicaenAuth\Service\PrivilegeService;
use UnicaenAuth\Service\RoleService;
use Zend\Mvc\Controller\ControllerManager;
class DroitsControllerFactory
{
/**
* @param ControllerManager $cm
* @param ContainerInterface $container
* @return DroitsController
*/
public function __invoke(ControllerManager $cm)
public function __invoke(ContainerInterface $container)
{
/** @var RoleService $serviceRole */
$serviceRole = $cm->get('UnicaenAuth\Service\Role');
$serviceRole = $container->get('UnicaenAuth\Service\Role');
/** @var RoleForm $formDroitsRole */
$formDroitsRole = $cm->get('FormElementManager')->get('UnicaenAuth\Form\Droits\Role');
$formDroitsRole = $container->get('FormElementManager')->get('UnicaenAuth\Form\Droits\Role');
/** @var PrivilegeService $servicePrivilege */
$servicePrivilege = $cm->get('UnicaenAuth\Service\Privilege');
$servicePrivilege = $container->get('UnicaenAuth\Service\Privilege');
$controller = new DroitsController();
$controller->setServiceRole($serviceRole);
......
......@@ -2,39 +2,39 @@
namespace UnicaenAuth\Controller;
use Interop\Container\ContainerInterface;
use UnicaenApp\Mapper\Ldap\People as LdapPeopleMapper;
use UnicaenAuth\Options\ModuleOptions;
use UnicaenAuth\Service\ShibService;
use UnicaenAuth\Service\UserContext;
use Zend\Authentication\AuthenticationService;
use Zend\Mvc\Controller\ControllerManager;
use ZfcUser\Mapper\UserInterface as UserMapper;
class UtilisateurControllerFactory
{
/**
* @param ControllerManager $cm
* @param ContainerInterface $container
* @return UtilisateurController
*/
public function __invoke(ControllerManager $cm)
public function __invoke(ContainerInterface $container)
{
/** @var UserMapper $mapper */
$userMapper = $cm->get('zfcuser_user_mapper');
$userMapper = $container->get('zfcuser_user_mapper');
/** @var AuthenticationService $authenticationService */
$authenticationService = $cm->get(AuthenticationService::class);
$authenticationService = $container->get(AuthenticationService::class);
/** @var ModuleOptions $options */
$options = $cm->get('unicaen-auth_module_options');
$options = $container->get('unicaen-auth_module_options');
/** @var ShibService $shibService */
$shibService = $cm->get(ShibService::class);
$shibService = $container->get(ShibService::class);
/** @var UserContext $userContextService */
$userContextService = $cm->get('AuthUserContext');
$userContextService = $container->get('AuthUserContext');
/** @var LdapPeopleMapper $mapper */
$ldapPeopleMapper = $cm->get('ldap_people_mapper');
$ldapPeopleMapper = $container->get('ldap_people_mapper');
$controller = new UtilisateurController();
$controller->setLdapPeopleMapper($ldapPeopleMapper);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment