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
<?php <?php
namespace UnicaenOauth\Cas; namespace UnicaenOauth\Cas;
use Zend\ServiceManager\ServiceLocatorAwareInterface;
use Zend\ServiceManager\ServiceLocatorAwareTrait;
use phpCAS; use phpCAS;
use Zend\ServiceManager\ServiceLocatorAwareTrait;
class CasService implements ServiceLocatorAwareInterface class CasService
{ {
use ServiceLocatorAwareTrait; use ServiceLocatorAwareTrait;
......
...@@ -11,6 +11,9 @@ class CasServiceFactory implements FactoryInterface ...@@ -11,6 +11,9 @@ class CasServiceFactory implements FactoryInterface
{ {
$config = $serviceLocator->get('config'); $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
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