GenericFactory.php 622 Bytes
Newer Older
1
2
3
4
<?php

namespace UnicaenLdap\Service;

5
use Interop\Container\ContainerInterface;
6
7
8
9
10
11
12
13
14
15
16
use Zend\ServiceManager\FactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface;

/**
 *
 *
 * @author Unicaen
 */
class GenericFactory implements FactoryInterface
{
    public function createService(ServiceLocatorInterface $serviceLocator)
17
18
19
20
21
    {
        return $this->__invoke($serviceLocator, '?');
    }

    public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
22
23
24
    {
        $service = new Generic();

25
        $service->setServiceLocator($container);
26
27
28
29

        return $service;
    }
}