Commit 4b9319ce authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Corrections pour passer à ZF3.

parent 6048c85e
Pipeline #3976 passed with stage
in 23 seconds
......@@ -27,9 +27,6 @@ class DifferentielControllerFactory
*/
public function __invoke(ContainerInterface $container, $requestedName, $options = null)
{
/* On quitte le ControllerManager */
$container = $container->getServiceLocator();
$controller = new DifferentielController();
$controller->setServiceSchema($container->get(SchemaService::class));
$controller->setServiceQueryGenerator($container->get(QueryGeneratorService::class));
......
......@@ -25,8 +25,6 @@ class ImportControllerFactory
*/
public function __invoke(ContainerInterface $container, $requestedName, $options = null)
{
$container = $container->getServiceLocator();
$controller = new ImportController();
$controller->setServiceSchema($container->get(SchemaService::class));
$controller->setProcessusImport($container->get(ImportProcessus::class));
......
......@@ -26,9 +26,6 @@ class SourceControllerFactory
*/
public function __invoke(ContainerInterface $container, $requestedName, $options = null)
{
/* On quitte le ControllerManager */
$container = $container->getServiceLocator();
$controller = new SourceController;
$controller->setServiceSource($container->get(SourceService::class));
$controller->setFormSource($container->get('FormElementManager')->get(SourceForm::class));
......
......@@ -27,9 +27,6 @@ class TableControllerFactory
*/
public function __invoke(ContainerInterface $container, $requestedName, $options = null)
{
/* On quitte le ControllerManager */
$container = $container->getServiceLocator();
$controller = new TableController;
$controller->setServiceTable($container->get(TableService::class));
$controller->setServiceSchema($container->get(SchemaService::class));
......
......@@ -2,9 +2,8 @@
namespace UnicaenImport\Form\Factory;
use Zend\Form\FormElementManager as ContainerInterface;
use UnicaenImport\Form\SourceForm;
use Zend\Form\FormElementManager\FormElementManagerV3Polyfill;
/**
......@@ -14,22 +13,8 @@ use UnicaenImport\Form\SourceForm;
*/
class SourceFormFactory
{
/**
* @param ContainerInterface $container
* @param string $requestedName
* @param array|null $options
*
* @return SourceForm
*/
public function __invoke(ContainerInterface $container, $requestedName, $options = null)
public function __invoke(FormElementManagerV3Polyfill $container)
{
/* On quitte le FormElementManager */
$container = $container->getServiceLocator();
$form = new SourceForm;
/* Injectez vos dépendances ICI */
return $form;
return new SourceForm;
}
}
\ No newline at end of file
......@@ -2,9 +2,8 @@
namespace UnicaenImport\Form\Factory;
use Zend\Form\FormElementManager as ContainerInterface;
use UnicaenImport\Form\TableForm;
use Zend\Form\FormElementManager\FormElementManagerV3Polyfill;
/**
......@@ -14,22 +13,8 @@ use UnicaenImport\Form\TableForm;
*/
class TableFormFactory
{
/**
* @param ContainerInterface $container
* @param string $requestedName
* @param array|null $options
*
* @return TableForm
*/
public function __invoke(ContainerInterface $container, $requestedName, $options = null)
public function __invoke(FormElementManagerV3Polyfill $container)
{
/* On quitte le FormElementManager */
$container = $container->getServiceLocator();
$form = new TableForm;
/* Injectez vos dépendances ICI */
return $form;
return new TableForm();
}
}
\ No newline at end of file
......@@ -24,8 +24,6 @@ class DifferentielLigneViewHelperFactory
*/
public function __invoke(ContainerInterface $container, $requestedName, $options = null)
{
$container = $container->getServiceLocator();
$viewHelper = new DifferentielLigne();
$viewHelper->setOptionsModule($container->get(ModuleOptions::class));
......
......@@ -23,8 +23,6 @@ class DifferentielListeViewHelperFactory
*/
public function __invoke(ContainerInterface $container, $requestedName, $options = null)
{
$container = $container->getServiceLocator();
$viewHelper = new DifferentielListe();
return $viewHelper;
......
Supports Markdown
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