diff --git a/src/UnicaenOracle/Controller/Factory/IndexControllerFactory.php b/src/UnicaenOracle/Controller/Factory/IndexControllerFactory.php index d12d8ffa11d328361b9fd95b0427684fb32966d3..a0723e01ff5bb98311facbd5547d88a5fc9a0068 100644 --- a/src/UnicaenOracle/Controller/Factory/IndexControllerFactory.php +++ b/src/UnicaenOracle/Controller/Factory/IndexControllerFactory.php @@ -32,6 +32,9 @@ class IndexControllerFactory $controller->setSchemaService($schemaService); $controller->setDataService($dataService); + // todo: ne plus injecter le service locator, svp! + $controller->setServiceLocator($manager->getServiceLocator()); + return $controller; } } \ No newline at end of file diff --git a/src/UnicaenOracle/Controller/IndexController.php b/src/UnicaenOracle/Controller/IndexController.php index 31680fea5f86302ac1f40fcfcb05e2090a65d0be..f40813aacfd4b4687be48753c2ef531400cec791 100644 --- a/src/UnicaenOracle/Controller/IndexController.php +++ b/src/UnicaenOracle/Controller/IndexController.php @@ -3,13 +3,16 @@ namespace UnicaenOracle\Controller; use Doctrine\DBAL\Connection; +use UnicaenApp\ServiceManager\ServiceLocatorAwareInterface; use UnicaenOracle\Service\Traits\DataServiceAwareTrait; use UnicaenOracle\Service\Traits\SchemaServiceAwareTrait; use Zend\Log\LoggerAwareTrait; use Zend\Mvc\Controller\AbstractActionController; +use Zend\ServiceManager\ServiceLocatorAwareTrait; -class IndexController extends AbstractActionController +class IndexController extends AbstractActionController implements ServiceLocatorAwareInterface { + use ServiceLocatorAwareTrait; use SchemaServiceAwareTrait; use DataServiceAwareTrait; use LoggerAwareTrait;