Skip to content
Snippets Groups Projects
Commit cef3f49b authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Merge branch 'release-3.0.0' into 'master'

Passage à ZF3

See merge request !1
parents 5f10ae32 836cc572
Branches master
Tags 3.0.0
1 merge request!1Passage à ZF3
vendor/
\ No newline at end of file
......@@ -4,11 +4,11 @@
"require": {
"ext-soap": "*",
"ext-gd": "*",
"zendframework/zend-servicemanager": "^2",
"zendframework/zend-mvc": "^2",
"zendframework/zend-servicemanager": "^3",
"zendframework/zend-mvc": "^3",
"zendframework/zend-http": "^2",
"zendframework/zend-soap": "^2",
"zendframework/zend-stdlib": "^2"
"zendframework/zend-stdlib": "^3"
},
"autoload": {
"psr-0": {
......
This diff is collapsed.
......@@ -2,8 +2,8 @@
namespace UnicaenLeocarte\Controller;
use Interop\Container\ContainerInterface;
use UnicaenLeocarte\Options\ModuleOptions;
use Zend\Mvc\Controller\ControllerManager;
/**
* IndexController factory.
......@@ -12,13 +12,13 @@ use Zend\Mvc\Controller\ControllerManager;
*/
class IndexControllerFactory
{
function __invoke(ControllerManager $controllerManager)
function __invoke(ContainerInterface $container)
{
/** @var ModuleOptions $options */
$options = $controllerManager->getServiceLocator()->get('UnicaenLeocarte\Options');
$options = $container->get('UnicaenLeocarte\Options');
/** @var \UnicaenLeocarte\Service\Photo\PhotoService $photoService */
$photoService = $controllerManager->getServiceLocator()->get('UnicaenLeocarte\Service\Photo');
$photoService = $container->get('UnicaenLeocarte\Service\Photo');
$controller = new IndexController();
$controller->setPhotoService($photoService);
......
......@@ -2,26 +2,19 @@
namespace UnicaenLeocarte\Options;
use Interop\Container\ContainerInterface;
use Zend\ServiceManager\Exception\InvalidArgumentException;
use Zend\ServiceManager\FactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface;
/**
* Module options factory.
*
* @author Unicaen
*/
class ModuleOptionsFactory implements FactoryInterface
class ModuleOptionsFactory
{
/**
* Create service
*
* @param ServiceLocatorInterface $serviceLocator
* @return mixed
*/
public function createService(ServiceLocatorInterface $serviceLocator)
public function __invoke(ContainerInterface $container)
{
$config = $serviceLocator->get('Configuration');
$config = $container->get('Configuration');
$key = 'unicaen-leocarte';
......
......@@ -2,25 +2,24 @@
namespace UnicaenLeocarte\Service\Photo;
use Interop\Container\ContainerInterface;
use UnicaenLeocarte\Options\ModuleOptions;
use UnicaenLeocarte\Service\Soap\SoapClient;
use Zend\ServiceManager\FactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface;
/**
* Leocarte Service factory.
*
* @author Unicaen
*/
class PhotoServiceFactory implements FactoryInterface
class PhotoServiceFactory
{
public function createService(ServiceLocatorInterface $serviceLocator)
public function __invoke(ContainerInterface $container)
{
/** @var ModuleOptions $options */
$options = $serviceLocator->get('UnicaenLeocarte\Options');
$options = $container->get('UnicaenLeocarte\Options');
/** @var SoapClient $soapClient */
$soapClient = $serviceLocator->get('UnicaenLeocarte\Soap\Client');
$soapClient = $container->get('UnicaenLeocarte\Soap\Client');
$service = new PhotoService();
$service->setSoapClient($soapClient);
......
......@@ -2,18 +2,17 @@
namespace UnicaenLeocarte\Service\Soap;
use Interop\Container\ContainerInterface;
use UnicaenLeocarte\Options\ModuleOptions;
use Zend\ServiceManager\FactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface;
/**
* Leocarte Soap Client factory.
*
* @author Unicaen
*/
class SoapClientFactory implements FactoryInterface
class SoapClientFactory
{
public function createService(ServiceLocatorInterface $serviceLocator)
public function __invoke(ContainerInterface $serviceLocator)
{
/** @var ModuleOptions $options */
$options = $serviceLocator->get('UnicaenLeocarte\Options');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment