Loading config/module.config.php +3 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,8 @@ use Doctrine\Common\Persistence\Mapping\Driver\MappingDriverChain; use Doctrine\ORM\Mapping\Driver\XmlDriver; use Octopus\Controller\OctopusController; use Octopus\Controller\OctopusControllerFactory; use Octopus\Service\Fonction\FonctionService; use Octopus\Service\Fonction\FonctionServiceFactory; use Octopus\Service\Geographie\GeographieService; use Octopus\Service\Geographie\GeographieServiceFactory; use Octopus\Service\Immobilier\ImmobilierService; Loading Loading @@ -76,6 +78,7 @@ return [ ImmobilierService::class => ImmobilierServiceFactory::class, IndividuService::class => IndividuServiceFactory::class, GeographieService::class => GeographieServiceFactory::class, FonctionService::class => FonctionServiceFactory::class, ], ], 'controllers' => [ Loading src/Octopus/Controller/OctopusController.php +10 −0 Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ namespace Octopus\Controller; use Octopus\Service\Fonction\FonctionServiceAwareTrait; use Octopus\Service\Geographie\GeographieServiceAwareTrait; use Octopus\Service\Immobilier\ImmobilierServiceAwareTrait; use Octopus\Service\Individu\IndividuServiceAwareTrait; Loading @@ -10,6 +11,7 @@ use Zend\Mvc\Controller\AbstractActionController; use Zend\View\Model\ViewModel; class OctopusController extends AbstractActionController { use FonctionServiceAwareTrait; use GeographieServiceAwareTrait; use ImmobilierServiceAwareTrait; use IndividuServiceAwareTrait; Loading @@ -27,6 +29,10 @@ class OctopusController extends AbstractActionController { $individus = $this->getIndividuService()->getIndividus(); $fonctions = $this->getFonctionService()->getFonctions(); $fonctionsLibelles = $this->getFonctionService()->getFonctionsLibelles(); $fonctionsTypes = $this->getFonctionService()->getFonctionsTypes(); $pays = $this->getGeographieService()->getPays('libelleCourt'); return new ViewModel([ Loading @@ -40,6 +46,10 @@ class OctopusController extends AbstractActionController { 'individus' => $individus, 'fonctions' => $fonctions, 'fonctionsLibelles' => $fonctionsLibelles, 'fonctionsTypes' => $fonctionsTypes, 'pays' => $pays, ]); } Loading src/Octopus/Controller/OctopusControllerFactory.php +4 −0 Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ namespace Octopus\Controller; use Octopus\Service\Fonction\FonctionService; use Octopus\Service\Geographie\GeographieService; use Octopus\Service\Immobilier\ImmobilierService; use Octopus\Service\Individu\IndividuService; Loading @@ -17,11 +18,13 @@ class OctopusControllerFactory { * @var ImmobilierService $immobilierService * @var IndividuService $individuService * @var GeographieService $geographieService * @var FonctionService $fonctionService */ $structureService = $manager->getServiceLocator()->get(StructureService::class); $immobilierService = $manager->getServiceLocator()->get(ImmobilierService::class); $individuService = $manager->getServiceLocator()->get(IndividuService::class); $geographieService = $manager->getServiceLocator()->get(GeographieService::class); $fonctionService = $manager->getServiceLocator()->get(FonctionService::class); /** @var OctopusController $controller */ $controller = new OctopusController(); Loading @@ -29,6 +32,7 @@ class OctopusControllerFactory { $controller->setImmobiliserService($immobilierService); $controller->setIndividuService($individuService); $controller->setGeographieService($geographieService); $controller->setFonctionService($fonctionService); return $controller; } } No newline at end of file src/Octopus/Entity/Db/Fonction.php 0 → 100644 +95 −0 Original line number Diff line number Diff line <?php namespace Octopus\Entity\Db; use Doctrine\Common\Collections\ArrayCollection; class Fonction { /** @var integer */ private $id; /** @var Fonction */ private $parent; /** @var ArrayCollection */ private $enfants; /** @var FonctionType */ private $type; /** @var string */ private $code; /** @var string */ private $codeSource; /** @var integer */ private $niveau; /** @var ArrayCollection */ private $libelles; public function __construct() { $this->enfants = new ArrayCollection(); $this->libelles = new ArrayCollection(); } /** * @return int */ public function getId() { return $this->id; } /** * @return Fonction */ public function getParent() { return $this->parent; } /** * @return Fonction[] */ public function getEnfants() { return $this->enfants->toArray(); } /** * @return FonctionType */ public function getType() { return $this->type; } /** * @return string */ public function getCode() { return $this->code; } /** * @return string */ public function getCodeSource() { return $this->codeSource; } /** * @return int */ public function getNiveau() { return $this->niveau; } /** * @return FonctionLibelle[] */ public function getLibelles() { return $this->libelles->toArray(); } } No newline at end of file src/Octopus/Entity/Db/FonctionLibelle.php 0 → 100644 +58 −0 Original line number Diff line number Diff line <?php namespace Octopus\Entity\Db; class FonctionLibelle { /** @var integer */ private $id; /** @var Fonction */ private $fonction; /** @var string */ private $libelle; /** @var string */ private $genre; /** @var string */ private $default; /** * @return int */ public function getId() { return $this->id; } /** * @return Fonction */ public function getFonction() { return $this->fonction; } /** * @return string */ public function getLibelle() { return $this->libelle; } /** * @return string */ public function getGenre() { return $this->genre; } /** * @return boolean */ public function getDefault() { return ($this->default === 'O'); } } No newline at end of file Loading
config/module.config.php +3 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,8 @@ use Doctrine\Common\Persistence\Mapping\Driver\MappingDriverChain; use Doctrine\ORM\Mapping\Driver\XmlDriver; use Octopus\Controller\OctopusController; use Octopus\Controller\OctopusControllerFactory; use Octopus\Service\Fonction\FonctionService; use Octopus\Service\Fonction\FonctionServiceFactory; use Octopus\Service\Geographie\GeographieService; use Octopus\Service\Geographie\GeographieServiceFactory; use Octopus\Service\Immobilier\ImmobilierService; Loading Loading @@ -76,6 +78,7 @@ return [ ImmobilierService::class => ImmobilierServiceFactory::class, IndividuService::class => IndividuServiceFactory::class, GeographieService::class => GeographieServiceFactory::class, FonctionService::class => FonctionServiceFactory::class, ], ], 'controllers' => [ Loading
src/Octopus/Controller/OctopusController.php +10 −0 Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ namespace Octopus\Controller; use Octopus\Service\Fonction\FonctionServiceAwareTrait; use Octopus\Service\Geographie\GeographieServiceAwareTrait; use Octopus\Service\Immobilier\ImmobilierServiceAwareTrait; use Octopus\Service\Individu\IndividuServiceAwareTrait; Loading @@ -10,6 +11,7 @@ use Zend\Mvc\Controller\AbstractActionController; use Zend\View\Model\ViewModel; class OctopusController extends AbstractActionController { use FonctionServiceAwareTrait; use GeographieServiceAwareTrait; use ImmobilierServiceAwareTrait; use IndividuServiceAwareTrait; Loading @@ -27,6 +29,10 @@ class OctopusController extends AbstractActionController { $individus = $this->getIndividuService()->getIndividus(); $fonctions = $this->getFonctionService()->getFonctions(); $fonctionsLibelles = $this->getFonctionService()->getFonctionsLibelles(); $fonctionsTypes = $this->getFonctionService()->getFonctionsTypes(); $pays = $this->getGeographieService()->getPays('libelleCourt'); return new ViewModel([ Loading @@ -40,6 +46,10 @@ class OctopusController extends AbstractActionController { 'individus' => $individus, 'fonctions' => $fonctions, 'fonctionsLibelles' => $fonctionsLibelles, 'fonctionsTypes' => $fonctionsTypes, 'pays' => $pays, ]); } Loading
src/Octopus/Controller/OctopusControllerFactory.php +4 −0 Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ namespace Octopus\Controller; use Octopus\Service\Fonction\FonctionService; use Octopus\Service\Geographie\GeographieService; use Octopus\Service\Immobilier\ImmobilierService; use Octopus\Service\Individu\IndividuService; Loading @@ -17,11 +18,13 @@ class OctopusControllerFactory { * @var ImmobilierService $immobilierService * @var IndividuService $individuService * @var GeographieService $geographieService * @var FonctionService $fonctionService */ $structureService = $manager->getServiceLocator()->get(StructureService::class); $immobilierService = $manager->getServiceLocator()->get(ImmobilierService::class); $individuService = $manager->getServiceLocator()->get(IndividuService::class); $geographieService = $manager->getServiceLocator()->get(GeographieService::class); $fonctionService = $manager->getServiceLocator()->get(FonctionService::class); /** @var OctopusController $controller */ $controller = new OctopusController(); Loading @@ -29,6 +32,7 @@ class OctopusControllerFactory { $controller->setImmobiliserService($immobilierService); $controller->setIndividuService($individuService); $controller->setGeographieService($geographieService); $controller->setFonctionService($fonctionService); return $controller; } } No newline at end of file
src/Octopus/Entity/Db/Fonction.php 0 → 100644 +95 −0 Original line number Diff line number Diff line <?php namespace Octopus\Entity\Db; use Doctrine\Common\Collections\ArrayCollection; class Fonction { /** @var integer */ private $id; /** @var Fonction */ private $parent; /** @var ArrayCollection */ private $enfants; /** @var FonctionType */ private $type; /** @var string */ private $code; /** @var string */ private $codeSource; /** @var integer */ private $niveau; /** @var ArrayCollection */ private $libelles; public function __construct() { $this->enfants = new ArrayCollection(); $this->libelles = new ArrayCollection(); } /** * @return int */ public function getId() { return $this->id; } /** * @return Fonction */ public function getParent() { return $this->parent; } /** * @return Fonction[] */ public function getEnfants() { return $this->enfants->toArray(); } /** * @return FonctionType */ public function getType() { return $this->type; } /** * @return string */ public function getCode() { return $this->code; } /** * @return string */ public function getCodeSource() { return $this->codeSource; } /** * @return int */ public function getNiveau() { return $this->niveau; } /** * @return FonctionLibelle[] */ public function getLibelles() { return $this->libelles->toArray(); } } No newline at end of file
src/Octopus/Entity/Db/FonctionLibelle.php 0 → 100644 +58 −0 Original line number Diff line number Diff line <?php namespace Octopus\Entity\Db; class FonctionLibelle { /** @var integer */ private $id; /** @var Fonction */ private $fonction; /** @var string */ private $libelle; /** @var string */ private $genre; /** @var string */ private $default; /** * @return int */ public function getId() { return $this->id; } /** * @return Fonction */ public function getFonction() { return $this->fonction; } /** * @return string */ public function getLibelle() { return $this->libelle; } /** * @return string */ public function getGenre() { return $this->genre; } /** * @return boolean */ public function getDefault() { return ($this->default === 'O'); } } No newline at end of file