Loading module/Application/src/Application/Filter/EtablissementPrefixFilter.php +3 −2 Changes for module/Application/src/Application/Filter/EtablissementPrefixFilter.php: 3 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ namespace Application\Filter; use Application\Entity\Db\Etablissement; use UnicaenApp\Exception\LogicException; use UnicaenApp\Exception\RuntimeException; use Zend\Filter\FilterInterface; Loading @@ -15,14 +16,14 @@ class EtablissementPrefixFilter implements FilterInterface * (i.e. le code établissement + un séparateur). * * @param string $value Ex: "UCN::ABC123" * @throws RuntimeException If filtering $value is impossible * @throws LogicException La chaîne de caractère spécifiée n'est pas préfixée * @return string Ex: "ABC123" */ public function filter($value) { $pos = stripos($value, self::ETAB_PREFIX_SEP); if ($pos === false) { throw new RuntimeException("La chaîne de caractère spécifiée n'est pas préfixée par l'établissement"); throw new LogicException("La chaîne de caractère spécifiée n'est pas préfixée par l'établissement"); } return substr($value, $pos + strlen(self::ETAB_PREFIX_SEP)); Loading module/Import/config/module.config.php +57 −15 Changes for module/Import/config/module.config.php: 57 added lines, 15 removed lines. Original line number Diff line number Diff line Loading @@ -15,7 +15,9 @@ return array( 'controller' => Import\Controller\ImportController::class, 'action' => [ 'help', 'fetch', 'import', 'import-all', 'update-these', 'index', 'info-last-update', ], Loading @@ -26,7 +28,8 @@ return array( [ 'controller' => Import\Controller\ImportController::class, 'action' => [ 'fetch-console', 'import-console', 'import-all-console', ], 'roles' => [], ], Loading Loading @@ -62,13 +65,20 @@ return array( 'import-console' => [ 'type' => Simple::class, 'options' => [ 'route' => 'fetch --service= --etablissement= [--source-code=]', 'route' => 'import --service= --etablissement= [--source-code=]', 'defaults' => [ 'controller' => Import\Controller\ImportController::class, 'action' => 'fetch-console', 'service' => 'non renseigné', 'etablissement' => 'non renseigné', 'source_code' => 'non renseigné', 'action' => 'import-console', ], ], ], 'import-all-console' => [ 'type' => Simple::class, 'options' => [ 'route' => 'import-all --etablissement=', 'defaults' => [ 'controller' => Import\Controller\ImportController::class, 'action' => 'import-all-console', ], ], ], Loading @@ -81,7 +91,7 @@ return array( 'type' => 'Literal', 'may_terminate' => true, 'options' => [ 'route' => '/fetch', 'route' => '/ws-import', 'defaults' => [ 'controller' => Import\Controller\ImportController::class, 'action' => 'index', Loading @@ -103,20 +113,50 @@ return array( 'type' => Segment::class, 'may_terminate' => true, 'options' => [ 'route' => '/:service/:etablissement[/:source_code]', 'route' => '/import/:service/:etablissement[/:source_code]', 'defaults' => [ 'controller' => Import\Controller\ImportController::class, 'action' => 'fetch', 'service' => 'non renseigné', 'etablissement' => 'non renseigné', 'source_code' => 'non renseigné', 'action' => 'import', ], 'constraints' => [ 'service' => implode ('|', ["all","these","doctorant","acteur","variable","individu","role", "structure", "etablissement", "unite-recherche", "ecole-doctorale"]), 'etablissement' => implode ('|', ["UCN","ULHN","INSA","URN"]), 'service' => implode('|', [ "these", "doctorant", "acteur", "variable", "individu", "role", "structure", "etablissement", "unite-recherche", "ecole-doctorale", ]), ] ], ], 'import-all' => [ 'type' => Segment::class, 'may_terminate' => true, 'options' => [ 'route' => '/import-all/:etablissement', 'defaults' => [ 'controller' => Import\Controller\ImportController::class, 'action' => 'import-all', 'etablissement' => 'non renseigné', ], ], ], 'update-these' => [ 'type' => Segment::class, 'may_terminate' => true, 'options' => [ 'route' => '/update-these/:etablissement[/:source_code]', 'defaults' => [ 'controller' => Import\Controller\ImportController::class, 'action' => 'update-these', ], ], ], 'help' => [ 'type' => Literal::class, 'may_terminate' => true, Loading @@ -138,7 +178,9 @@ return array( 'Zend\Log\LoggerAbstractServiceFactory', ], 'factories' => [ Import\Service\ImportService::class => Import\Service\Factory\ImportServiceFactory::class, Import\Service\FetcherService::class => Import\Service\Factory\FetcherServiceFactory::class, Import\Service\SynchroService::class => Import\Service\Factory\SynchroServiceFactory::class, ], ], Loading module/Import/src/Import/Controller/Factory/ImportControllerFactory.php +14 −3 Changes for module/Import/src/Import/Controller/Factory/ImportControllerFactory.php: 14 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -2,18 +2,29 @@ namespace Import\Controller\Factory; use Doctrine\ORM\EntityManager; use Import\Controller\ImportController; use Import\Service\ImportService; use Zend\Mvc\Controller\ControllerManager; use Zend\ServiceManager\ServiceLocatorInterface; class ImportControllerFactory { public function __invoke(ServiceLocatorInterface $serviceLocator) public function __invoke(ControllerManager $serviceLocator) { /** @var ServiceLocatorInterface $parentLocator */ $parentLocator = $serviceLocator->getServiceLocator(); /** @var EntityManager $entityManager */ $entityManager = $parentLocator->get('doctrine.entitymanager.orm_default'); $fetcherService = $parentLocator->get(\Import\Service\FetcherService::class); $controller = new ImportController($fetcherService); /** @var ImportService $importService */ $importService = $parentLocator->get(ImportService::class); $controller = new ImportController(); $controller->setEntityManager($entityManager); $controller->setImportService($importService); return $controller; } } No newline at end of file module/Import/src/Import/Controller/ImportController.php +64 −117 Changes for module/Import/src/Import/Controller/ImportController.php: 64 added lines, 117 removed lines. Original line number Diff line number Diff line Loading @@ -2,7 +2,8 @@ namespace Import\Controller; use Import\Service\FetcherService; use Import\Service\Traits\ImportServiceAwareTrait; use UnicaenApp\Exception\LogicException; use UnicaenApp\Service\EntityManagerAwareTrait; use Zend\Mvc\Controller\AbstractActionController; use Zend\View\Model\ViewModel; Loading @@ -10,32 +11,7 @@ use Zend\View\Model\ViewModel; class ImportController extends AbstractActionController { use EntityManagerAwareTrait; /** * Liste ORDONNÉE de tous les services proposés. */ const SERVICES = [ 'individu', 'doctorant', 'these', 'role', 'acteur', 'variable', 'structure', 'etablissement', 'ecole-doctorale', 'unite-recherche', ]; private $debug = false; /** @var $fetcherService FetcherService*/ protected $fetcherService; public function __construct($fetcherService) { $this->fetcherService = $fetcherService; } use ImportServiceAwareTrait; public function indexAction() { Loading @@ -48,7 +24,8 @@ class ImportController extends AbstractActionController ]); } public function infoLastUpdateAction() { public function infoLastUpdateAction() { $etablissement = $this->params()->fromRoute("etablissement"); $table = $this->params()->fromRoute("table"); Loading @@ -71,121 +48,91 @@ class ImportController extends AbstractActionController return new ViewModel(); } /** fetchAction permet de récupérer les données d'un SI en fonction de paramètres spécifique donnés par la route * 'service' --- le nom du web service qui sera appelé (p.e. these, doctorant, ...) * 'etablissement' --- le sigle associé à l'établissement que l'on souhaite interroger (p.e. UCN, UCR, ...) * 'source_code' --- le source_code de l'entité à récupérer (p.e. '12047') /** * Interroge le WS pour récupérer les données d'un seul établissement puis lance la synchronisation des données obtenues * avec les tables destinations. * * RMQ: 'service' et 'etablissement' sont pour le moment obligatoire. * RMQ: si 'source_code' est non renseigné alors il faut récupérer toutes les données * @throws \Doctrine\DBAL\DBALException * @throws \Exception * @return ViewModel */ public function fetchAction() { $service_para = $this->params('service'); public function importAction() { $service = $this->params('service'); $etablissement = $this->params('etablissement'); $source_code = $this->params('source_code'); if ($this->debug) { echo "SERVICE: {$service_para}<br/>"; echo "ETABLISSEMENT: {$etablissement}<br/>"; echo "SOURCE_CODE: {$source_code}<br/>"; } $sourceCode = $this->params('source_code'); /** is it all ? */ if ($service_para === "all") { $services = static::SERVICES; } else { $services = [ $service_para ]; } $queryParams = $this->params()->fromQuery(); $logs = []; foreach ($services as $service) { /** Paramétrage du service de récupération */ $key = $this->fetcherService->getEtablissementKey($etablissement); $this->fetcherService->setConfigWithPosition($key); if ($this->debug) { echo "KEY: {$key}<br/>"; echo $this->fetcherService->getCode() . " | "; echo $this->fetcherService->getUrl() . " | "; echo $this->fetcherService->getProxy() . " | "; echo (($this->fetcherService->getVerify())?"true":"false") . " <br/> "; echo $this->fetcherService->getUser() . " | "; echo $this->fetcherService->getPassword(). " | "; $logs[] = $this->importService->import($service, $etablissement, $sourceCode, $queryParams); return new ViewModel([ 'service' => $service, 'etablissement' => $etablissement, 'source_code' => $sourceCode, 'logs' => $logs, ]); } $dataName = $service; $entityName = str_replace("-"," ", $service); $entityName = ucwords($entityName); $entityName = str_replace(" ","", $entityName); $entityClass = "Import\Model\Tmp" . $entityName; $source_code = ($source_code != "non renseigné") ? $source_code : null; /** Execution de la récupération */ // var_dump($dataName); // var_dump($entityClass); // var_dump($source_code); try { $logs[] = $this->fetcherService->fetch($dataName, $entityClass, $source_code); } catch (\Exception $e) { print "<h1>Une exception a été levée (".$e->getCode()." - ".$e->getMessage() .")</h1>"; throw $e; } } /** * Interroge le WS pour récupérer toutes les données d'un établissement puis lance la synchronisation * des données obtenues avec les tables destinations. * * @return ViewModel */ public function importAllAction() { $etablissement = $this->params('etablissement'); $logs = []; $this->fetcherService->updateBDD($services); $logs[] = $this->importService->importAll($etablissement); return new ViewModel([ 'service' => $service_para, 'service' => 'Tous', 'etablissement' => $etablissement, 'source_code' => $source_code, 'source_code' => '-', 'logs' => $logs, ]); } /** * @throws \Doctrine\DBAL\DBALException * @throws \Exception * @return ViewModel */ public function fetchConsoleAction() { $service_para = $this->params('service'); public function updateTheseAction() { $etablissement = $this->params('etablissement'); $source_code = $this->params('source_code'); $sourceCodeThese = $this->params('source_code'); /** is it all ? */ if ($service_para === "all") { $services = static::SERVICES; } else { $services = [ $service_para ]; if (! $sourceCodeThese) { throw new LogicException("Le source code de la thèse est requis"); } $logs = []; foreach ($services as $service) { /** Paramétrage du service de récupération */ $key = $this->fetcherService->getEtablissementKey($etablissement); $this->fetcherService->setConfigWithPosition($key); $dataName = $service; $entityClass = "Import\Model\Tmp" . ucwords($service); $source_code = ($source_code != "non renseigné") ? $source_code : null; /** Execution de la récupération */ try { $logs[] = $this->fetcherService->fetch($dataName, $entityClass, $source_code); } catch (\Exception $e) { print "Une exception a été levée (".$e->getCode()." - ".$e->getMessage() .")"; throw $e; $logs = $this->importService->updateThese($etablissement, $sourceCodeThese); return new ViewModel([ 'service' => "these + dépendances", 'etablissement' => $etablissement, 'source_code' => $sourceCodeThese, 'logs' => $logs, ]); } public function fetchConsoleAction() { $service = $this->params('service'); $etablissement = $this->params('etablissement'); $sourceCode = $this->params('source_code'); $this->importService->import($service, $etablissement, $sourceCode); echo "Importation des données du service '$service' de l'établissement '$etablissement' réussie." . PHP_EOL; } $this->fetcherService->updateBDD($services); public function fetchAllConsoleAction() { $etablissement = $this->params('etablissement'); $this->importService->importAll($etablissement); print "Importation des données réussie \n"; echo "Importation de toutes les données de l'établissement '$etablissement' réussie" . PHP_EOL; } } module/Import/src/Import/Model/TmpActeur.php +7 −1 Changes for module/Import/src/Import/Model/TmpActeur.php: 7 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -82,6 +82,12 @@ class TmpActeur */ private $id; /** * @return string */ public function getIndividuId() { return $this->individuId; } } Loading
module/Application/src/Application/Filter/EtablissementPrefixFilter.php +3 −2 Changes for module/Application/src/Application/Filter/EtablissementPrefixFilter.php: 3 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ namespace Application\Filter; use Application\Entity\Db\Etablissement; use UnicaenApp\Exception\LogicException; use UnicaenApp\Exception\RuntimeException; use Zend\Filter\FilterInterface; Loading @@ -15,14 +16,14 @@ class EtablissementPrefixFilter implements FilterInterface * (i.e. le code établissement + un séparateur). * * @param string $value Ex: "UCN::ABC123" * @throws RuntimeException If filtering $value is impossible * @throws LogicException La chaîne de caractère spécifiée n'est pas préfixée * @return string Ex: "ABC123" */ public function filter($value) { $pos = stripos($value, self::ETAB_PREFIX_SEP); if ($pos === false) { throw new RuntimeException("La chaîne de caractère spécifiée n'est pas préfixée par l'établissement"); throw new LogicException("La chaîne de caractère spécifiée n'est pas préfixée par l'établissement"); } return substr($value, $pos + strlen(self::ETAB_PREFIX_SEP)); Loading
module/Import/config/module.config.php +57 −15 Changes for module/Import/config/module.config.php: 57 added lines, 15 removed lines. Original line number Diff line number Diff line Loading @@ -15,7 +15,9 @@ return array( 'controller' => Import\Controller\ImportController::class, 'action' => [ 'help', 'fetch', 'import', 'import-all', 'update-these', 'index', 'info-last-update', ], Loading @@ -26,7 +28,8 @@ return array( [ 'controller' => Import\Controller\ImportController::class, 'action' => [ 'fetch-console', 'import-console', 'import-all-console', ], 'roles' => [], ], Loading Loading @@ -62,13 +65,20 @@ return array( 'import-console' => [ 'type' => Simple::class, 'options' => [ 'route' => 'fetch --service= --etablissement= [--source-code=]', 'route' => 'import --service= --etablissement= [--source-code=]', 'defaults' => [ 'controller' => Import\Controller\ImportController::class, 'action' => 'fetch-console', 'service' => 'non renseigné', 'etablissement' => 'non renseigné', 'source_code' => 'non renseigné', 'action' => 'import-console', ], ], ], 'import-all-console' => [ 'type' => Simple::class, 'options' => [ 'route' => 'import-all --etablissement=', 'defaults' => [ 'controller' => Import\Controller\ImportController::class, 'action' => 'import-all-console', ], ], ], Loading @@ -81,7 +91,7 @@ return array( 'type' => 'Literal', 'may_terminate' => true, 'options' => [ 'route' => '/fetch', 'route' => '/ws-import', 'defaults' => [ 'controller' => Import\Controller\ImportController::class, 'action' => 'index', Loading @@ -103,20 +113,50 @@ return array( 'type' => Segment::class, 'may_terminate' => true, 'options' => [ 'route' => '/:service/:etablissement[/:source_code]', 'route' => '/import/:service/:etablissement[/:source_code]', 'defaults' => [ 'controller' => Import\Controller\ImportController::class, 'action' => 'fetch', 'service' => 'non renseigné', 'etablissement' => 'non renseigné', 'source_code' => 'non renseigné', 'action' => 'import', ], 'constraints' => [ 'service' => implode ('|', ["all","these","doctorant","acteur","variable","individu","role", "structure", "etablissement", "unite-recherche", "ecole-doctorale"]), 'etablissement' => implode ('|', ["UCN","ULHN","INSA","URN"]), 'service' => implode('|', [ "these", "doctorant", "acteur", "variable", "individu", "role", "structure", "etablissement", "unite-recherche", "ecole-doctorale", ]), ] ], ], 'import-all' => [ 'type' => Segment::class, 'may_terminate' => true, 'options' => [ 'route' => '/import-all/:etablissement', 'defaults' => [ 'controller' => Import\Controller\ImportController::class, 'action' => 'import-all', 'etablissement' => 'non renseigné', ], ], ], 'update-these' => [ 'type' => Segment::class, 'may_terminate' => true, 'options' => [ 'route' => '/update-these/:etablissement[/:source_code]', 'defaults' => [ 'controller' => Import\Controller\ImportController::class, 'action' => 'update-these', ], ], ], 'help' => [ 'type' => Literal::class, 'may_terminate' => true, Loading @@ -138,7 +178,9 @@ return array( 'Zend\Log\LoggerAbstractServiceFactory', ], 'factories' => [ Import\Service\ImportService::class => Import\Service\Factory\ImportServiceFactory::class, Import\Service\FetcherService::class => Import\Service\Factory\FetcherServiceFactory::class, Import\Service\SynchroService::class => Import\Service\Factory\SynchroServiceFactory::class, ], ], Loading
module/Import/src/Import/Controller/Factory/ImportControllerFactory.php +14 −3 Changes for module/Import/src/Import/Controller/Factory/ImportControllerFactory.php: 14 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -2,18 +2,29 @@ namespace Import\Controller\Factory; use Doctrine\ORM\EntityManager; use Import\Controller\ImportController; use Import\Service\ImportService; use Zend\Mvc\Controller\ControllerManager; use Zend\ServiceManager\ServiceLocatorInterface; class ImportControllerFactory { public function __invoke(ServiceLocatorInterface $serviceLocator) public function __invoke(ControllerManager $serviceLocator) { /** @var ServiceLocatorInterface $parentLocator */ $parentLocator = $serviceLocator->getServiceLocator(); /** @var EntityManager $entityManager */ $entityManager = $parentLocator->get('doctrine.entitymanager.orm_default'); $fetcherService = $parentLocator->get(\Import\Service\FetcherService::class); $controller = new ImportController($fetcherService); /** @var ImportService $importService */ $importService = $parentLocator->get(ImportService::class); $controller = new ImportController(); $controller->setEntityManager($entityManager); $controller->setImportService($importService); return $controller; } } No newline at end of file
module/Import/src/Import/Controller/ImportController.php +64 −117 Changes for module/Import/src/Import/Controller/ImportController.php: 64 added lines, 117 removed lines. Original line number Diff line number Diff line Loading @@ -2,7 +2,8 @@ namespace Import\Controller; use Import\Service\FetcherService; use Import\Service\Traits\ImportServiceAwareTrait; use UnicaenApp\Exception\LogicException; use UnicaenApp\Service\EntityManagerAwareTrait; use Zend\Mvc\Controller\AbstractActionController; use Zend\View\Model\ViewModel; Loading @@ -10,32 +11,7 @@ use Zend\View\Model\ViewModel; class ImportController extends AbstractActionController { use EntityManagerAwareTrait; /** * Liste ORDONNÉE de tous les services proposés. */ const SERVICES = [ 'individu', 'doctorant', 'these', 'role', 'acteur', 'variable', 'structure', 'etablissement', 'ecole-doctorale', 'unite-recherche', ]; private $debug = false; /** @var $fetcherService FetcherService*/ protected $fetcherService; public function __construct($fetcherService) { $this->fetcherService = $fetcherService; } use ImportServiceAwareTrait; public function indexAction() { Loading @@ -48,7 +24,8 @@ class ImportController extends AbstractActionController ]); } public function infoLastUpdateAction() { public function infoLastUpdateAction() { $etablissement = $this->params()->fromRoute("etablissement"); $table = $this->params()->fromRoute("table"); Loading @@ -71,121 +48,91 @@ class ImportController extends AbstractActionController return new ViewModel(); } /** fetchAction permet de récupérer les données d'un SI en fonction de paramètres spécifique donnés par la route * 'service' --- le nom du web service qui sera appelé (p.e. these, doctorant, ...) * 'etablissement' --- le sigle associé à l'établissement que l'on souhaite interroger (p.e. UCN, UCR, ...) * 'source_code' --- le source_code de l'entité à récupérer (p.e. '12047') /** * Interroge le WS pour récupérer les données d'un seul établissement puis lance la synchronisation des données obtenues * avec les tables destinations. * * RMQ: 'service' et 'etablissement' sont pour le moment obligatoire. * RMQ: si 'source_code' est non renseigné alors il faut récupérer toutes les données * @throws \Doctrine\DBAL\DBALException * @throws \Exception * @return ViewModel */ public function fetchAction() { $service_para = $this->params('service'); public function importAction() { $service = $this->params('service'); $etablissement = $this->params('etablissement'); $source_code = $this->params('source_code'); if ($this->debug) { echo "SERVICE: {$service_para}<br/>"; echo "ETABLISSEMENT: {$etablissement}<br/>"; echo "SOURCE_CODE: {$source_code}<br/>"; } $sourceCode = $this->params('source_code'); /** is it all ? */ if ($service_para === "all") { $services = static::SERVICES; } else { $services = [ $service_para ]; } $queryParams = $this->params()->fromQuery(); $logs = []; foreach ($services as $service) { /** Paramétrage du service de récupération */ $key = $this->fetcherService->getEtablissementKey($etablissement); $this->fetcherService->setConfigWithPosition($key); if ($this->debug) { echo "KEY: {$key}<br/>"; echo $this->fetcherService->getCode() . " | "; echo $this->fetcherService->getUrl() . " | "; echo $this->fetcherService->getProxy() . " | "; echo (($this->fetcherService->getVerify())?"true":"false") . " <br/> "; echo $this->fetcherService->getUser() . " | "; echo $this->fetcherService->getPassword(). " | "; $logs[] = $this->importService->import($service, $etablissement, $sourceCode, $queryParams); return new ViewModel([ 'service' => $service, 'etablissement' => $etablissement, 'source_code' => $sourceCode, 'logs' => $logs, ]); } $dataName = $service; $entityName = str_replace("-"," ", $service); $entityName = ucwords($entityName); $entityName = str_replace(" ","", $entityName); $entityClass = "Import\Model\Tmp" . $entityName; $source_code = ($source_code != "non renseigné") ? $source_code : null; /** Execution de la récupération */ // var_dump($dataName); // var_dump($entityClass); // var_dump($source_code); try { $logs[] = $this->fetcherService->fetch($dataName, $entityClass, $source_code); } catch (\Exception $e) { print "<h1>Une exception a été levée (".$e->getCode()." - ".$e->getMessage() .")</h1>"; throw $e; } } /** * Interroge le WS pour récupérer toutes les données d'un établissement puis lance la synchronisation * des données obtenues avec les tables destinations. * * @return ViewModel */ public function importAllAction() { $etablissement = $this->params('etablissement'); $logs = []; $this->fetcherService->updateBDD($services); $logs[] = $this->importService->importAll($etablissement); return new ViewModel([ 'service' => $service_para, 'service' => 'Tous', 'etablissement' => $etablissement, 'source_code' => $source_code, 'source_code' => '-', 'logs' => $logs, ]); } /** * @throws \Doctrine\DBAL\DBALException * @throws \Exception * @return ViewModel */ public function fetchConsoleAction() { $service_para = $this->params('service'); public function updateTheseAction() { $etablissement = $this->params('etablissement'); $source_code = $this->params('source_code'); $sourceCodeThese = $this->params('source_code'); /** is it all ? */ if ($service_para === "all") { $services = static::SERVICES; } else { $services = [ $service_para ]; if (! $sourceCodeThese) { throw new LogicException("Le source code de la thèse est requis"); } $logs = []; foreach ($services as $service) { /** Paramétrage du service de récupération */ $key = $this->fetcherService->getEtablissementKey($etablissement); $this->fetcherService->setConfigWithPosition($key); $dataName = $service; $entityClass = "Import\Model\Tmp" . ucwords($service); $source_code = ($source_code != "non renseigné") ? $source_code : null; /** Execution de la récupération */ try { $logs[] = $this->fetcherService->fetch($dataName, $entityClass, $source_code); } catch (\Exception $e) { print "Une exception a été levée (".$e->getCode()." - ".$e->getMessage() .")"; throw $e; $logs = $this->importService->updateThese($etablissement, $sourceCodeThese); return new ViewModel([ 'service' => "these + dépendances", 'etablissement' => $etablissement, 'source_code' => $sourceCodeThese, 'logs' => $logs, ]); } public function fetchConsoleAction() { $service = $this->params('service'); $etablissement = $this->params('etablissement'); $sourceCode = $this->params('source_code'); $this->importService->import($service, $etablissement, $sourceCode); echo "Importation des données du service '$service' de l'établissement '$etablissement' réussie." . PHP_EOL; } $this->fetcherService->updateBDD($services); public function fetchAllConsoleAction() { $etablissement = $this->params('etablissement'); $this->importService->importAll($etablissement); print "Importation des données réussie \n"; echo "Importation de toutes les données de l'établissement '$etablissement' réussie" . PHP_EOL; } }
module/Import/src/Import/Model/TmpActeur.php +7 −1 Changes for module/Import/src/Import/Model/TmpActeur.php: 7 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -82,6 +82,12 @@ class TmpActeur */ private $id; /** * @return string */ public function getIndividuId() { return $this->individuId; } }