Commit fff9fb96 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Abandon de l'interface ServiceLocatorAwareInterface dépréciée. Remplacée par...

Abandon de l'interface ServiceLocatorAwareInterface dépréciée. Remplacée par une injection de dépendance dans la factory.
parent eaa384e0
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
<?php
namespace UnicaenOauth\Cas;

use Zend\ServiceManager\ServiceLocatorAwareInterface;
use Zend\ServiceManager\ServiceLocatorAwareTrait;
use phpCAS;
use Zend\ServiceManager\ServiceLocatorAwareTrait;

class CasService implements ServiceLocatorAwareInterface
class CasService
{
    use ServiceLocatorAwareTrait;

+4 −1
Original line number Diff line number Diff line
@@ -11,6 +11,9 @@ class CasServiceFactory implements FactoryInterface
    {
        $config = $serviceLocator->get('config');

        return new CasService($config['unicaen-oauth']['cas']);
        $service = new CasService($config['unicaen-oauth']['cas']);
        $service->setServiceLocator($serviceLocator);

        return $service;
    }
}
 No newline at end of file