CasServiceFactory.php 469 Bytes
Newer Older
Bertrand Gauthier's avatar
Bertrand Gauthier committed
1
2
<?php

Bertrand Gauthier's avatar
Bertrand Gauthier committed
3
namespace UnicaenOauth\Cas;
Bertrand Gauthier's avatar
Bertrand Gauthier committed
4
5
6
7
8
9
10
11
12
13

use Zend\ServiceManager\FactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface;

class CasServiceFactory implements FactoryInterface
{
    public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $config = $serviceLocator->get('config');

14
15
16
17
        $service = new CasService($config['unicaen-oauth']['cas']);
        $service->setServiceLocator($serviceLocator);

        return $service;
Bertrand Gauthier's avatar
Bertrand Gauthier committed
18
19
    }
}