/** * @name getReservation($pParam) * @return ReservationAdherentResponse * @desc Retourne les détails d'une réservation et de la commande */ public function getReservation($pParam) { $lVr = AfficheReservationAdherentValid::validAjout($pParam); if ($lVr->getValid()) { $lIdAdherent = $pParam["id_adherent"]; $lIdCommande = $pParam["id_commande"]; $lResponse = new ReservationAdherentResponse(); $lAdherent = AdherentViewManager::select($lIdAdherent); $lResponse->setAdherent($lAdherent); $lMarcheService = new MarcheService(); $lResponse->setMarche($lMarcheService->get($pParam["id_commande"])); $lReservationService = new ReservationService(); $lIdReservation = new IdReservationVO(); $lIdReservation->setIdCompte($lAdherent->getAdhIdCompte()); $lIdReservation->setIdCommande($pParam["id_commande"]); if ($lReservationService->enCoursOuAchete($lIdReservation)) { $lReservation = $lReservationService->get($lIdReservation); $lResponse->setReservation($lReservation->getDetailReservation()); $lResponse->setEtat($lReservation->getEtat()); } else { $lResponse->setEtat(null); } return $lResponse; } return $lVr; }
/** * @name validAffiche($pData) * @return AdherentVR * @desc Test la validite de l'élément */ public static function validAffiche($pData) { $lVr = new AdherentVR(); //Tests inputs if (!isset($pData['idAdherent'])) { $lVr->setValid(false); $lVr->getId()->setValid(false); $lErreur = new VRerreur(); $lErreur->setCode(MessagesErreurs::ERR_201_CODE); $lErreur->setMessage(MessagesErreurs::ERR_201_MSG); $lVr->getId()->addErreur($lErreur); } if ($lVr->getValid()) { if (!is_int((int) $pData['idAdherent'])) { $lVr->setValid(false); $lVr->getId()->setValid(false); $lErreur = new VRerreur(); $lErreur->setCode(MessagesErreurs::ERR_104_CODE); $lErreur->setMessage(MessagesErreurs::ERR_104_MSG); $lVr->getId()->addErreur($lErreur); } // Vérifie si l'adhérent existe $lAdherent = AdherentViewManager::select($pData['idAdherent']); if ($lAdherent->getAdhId() != $pData['idAdherent']) { $lVr = new TemplateVR(); $lVr->setValid(false); $lVr->getLog()->setValid(false); $lErreur = new VRerreur(); $lErreur->setCode(MessagesErreurs::ERR_216_CODE); $lErreur->setMessage(MessagesErreurs::ERR_216_MSG); $lVr->getLog()->addErreur($lErreur); } } return $lVr; }
/** * @name getInfoAdherent($pParam) * @return InfoCompteResponse * @desc Renvoie le Compte de l'adherent après avoir récupérer les informations en fonction de l'ID. */ public function getInfoAdherent($pParam) { $lResponse = new InfoCompteResponse(); $lIdAdherent = $pParam['id_adherent']; $lAdherent = AdherentViewManager::select($lIdAdherent); $lResponse->setAdherent($lAdherent); $lCompteService = new CompteService(); $lResponse->setAdherentCompte($lCompteService->getAdherentCompte($lAdherent->getAdhIdCompte())); return $lResponse; }
/** * @name getInfoAchatMarche($pParam) * @return InfoAchatCommandeResponse * @desc Retourne les infos de réservation d'un adhérent */ public function getInfoAchatMarche($pParam) { $lVr = MarcheValid::validGetInfoAchatMarche($pParam); if ($lVr->getValid()) { $lResponse = new InfoAchatCommandeResponse(); if ($pParam["id_adherent"] != 0) { // Si ce n'est pas le compte invité $lAdherent = AdherentViewManager::select($pParam["id_adherent"]); $lResponse->setAdherent($lAdherent); } $lStockService = new StockService(); $lStockProduitsDisponible = $lStockService->getProduitsDisponible(); // Stock de produit disponible $lStock = array(); $lProduitsMarche = array(); $lProduitsReservation = array(); $lProduitsAchat = array(); if ($pParam["id_commande"] != -1) { // Si ce n'est pas la caisse permanente $lMarcheService = new MarcheService(); $lMarche = $lMarcheService->get($pParam["id_commande"]); $lProduitsMarche = $lMarche->getProduits(); $lResponse->setMarche($lMarche); // Les informations du marché if ($pParam["id_adherent"] != 0) { // Si ce n'est pas le compte invité $lReservationService = new ReservationService(); $lIdReservation = new IdReservationVO(); $lIdReservation->setIdCompte($lAdherent->getAdhIdCompte()); $lIdReservation->setIdCommande($pParam["id_commande"]); // Récupère les réservations actives $lProduitsReservation = $lReservationService->get($lIdReservation, true)->getDetailReservation(); $lResponse->setReservation($lProduitsReservation); // La réservation $lAchatService = new AchatService(); $lOperationsAchat = $lAchatService->selectOperationAchat($lAdherent->getAdhIdCompte(), $pParam["id_commande"]); $lAchat = new AchatVO(); if (!is_null($lOperationsAchat[0]->getId())) { $lAchat = $lAchatService->get($lOperationsAchat[0]->getId()); $lProduitsAchat = $lAchat->getProduits(); } else { $lOperationService = new OperationService(); $lOperationsRechargement = $lOperationService->getOperationRechargementSurMarche($lAdherent->getAdhIdCompte(), $pParam["id_commande"]); if (!is_null($lOperationsRechargement[0]->getId())) { $lAchat = $lAchatService->get($lOperationsRechargement[0]->getId()); } } $lResponse->setAchats($lAchat); // L'achat } } if ($pParam["id_adherent"] != 0) { // Si ce n'est pas le compte invité $lAdhesionService = new AdhesionService(); $lResponse->setNbAdhesionEnCours($lAdhesionService->getNbAdhesionEnCoursSurAdherent($pParam["id_adherent"])); } // Fusion des stocks $lLotsProduits = array(); foreach ($lStockProduitsDisponible as $lProduitStock) { if (!is_null($lProduitStock->getId())) { $lAjout = true; foreach ($lProduitsMarche as $lProduitMarche) { if ($lProduitStock->getIdNom() == $lProduitMarche->getIdNom() && $lProduitStock->getUnite() == $lProduitMarche->getUnite()) { $lAjout = false; } } if ($lAjout) { if (!isset($lStock[$lProduitStock->getCproNom()])) { $lStock[$lProduitStock->getCproNom()] = array("cproId" => $lProduitStock->getIdCategorie(), "cproNom" => $lProduitStock->getCproNom(), "produits" => array()); } $lUnite = $lProduitStock->getUnite(); $lStock[$lProduitStock->getCproNom()]["produits"][$lProduitStock->getNom() . $lProduitStock->getUnite()] = new ProduitDetailAchatAfficheVO($lProduitStock->getIdNom(), null, null, null, null, null, null, null, null, null, $lUnite, null, $lUnite, null, null, $lProduitStock->getIdCategorie(), $lProduitStock->getCproNom(), null, $lProduitStock->getNom()); $lLotsProduits[$lProduitStock->getIdNom() . $lProduitStock->getUnite()] = array("nom" => $lProduitStock->getNom(), "type" => "modele", "lots" => $lProduitStock->getLots()); } } } foreach ($lProduitsMarche as $lProduitMarche) { if (!isset($lStock[$lProduitMarche->getCproNom()])) { $lStock[$lProduitMarche->getCproNom()] = array("cproId" => $lProduitMarche->getIdCategorie(), "cproNom" => $lProduitMarche->getCproNom(), "produits" => array()); } $lUnite = !is_null($lProduitMarche->getUnite()) ? $lProduitMarche->getUnite() : $lProduitMarche->getUniteSolidaire(); $lMontant = NULL; $lQuantite = NULL; $lIdDetailCommande = NULL; // Ajout des réservations if (empty($lProduitsAchat)) { foreach ($lProduitsReservation as $lProduitReservation) { if ($lProduitReservation->getIdNomProduit() == $lProduitMarche->getIdNom() && $lProduitReservation->getUnite() == $lProduitMarche->getUnite()) { $lQuantite = $lProduitReservation->getQuantite(); $lMontant = $lProduitReservation->getMontant(); $lIdDetailCommande = $lProduitReservation->getIdDetailCommande(); } } } $lStock[$lProduitMarche->getCproNom()]["produits"][$lProduitMarche->getNom() . $lProduitMarche->getUnite()] = new ProduitDetailAchatAfficheVO($lProduitMarche->getIdNom(), null, null, null, null, $lIdDetailCommande, null, null, null, $lQuantite, $lUnite, null, $lUnite, $lMontant, null, $lProduitMarche->getIdCategorie(), $lProduitMarche->getCproNom(), null, $lProduitMarche->getNom()); $lLotsProduits[$lProduitMarche->getIdNom() . $lProduitMarche->getUnite()] = array("nom" => $lProduitMarche->getNom(), "type" => "marche", "lots" => $lProduitMarche->getLots()); } foreach ($lProduitsAchat as $lProduitAchat) { $lUnite = !is_null($lProduitAchat->getUnite()) ? $lProduitAchat->getUnite() : $lProduitAchat->getUniteSolidaire(); if (!is_null($lUnite)) { if (isset($lStock[$lProduitAchat->getCproNom()][$lProduitAchat->getNproNom()][$lUnite])) { $lStock[$lProduitAchat->getCproNom()][$lProduitAchat->getNproNom()][$lUnite]->setIdStock($lProduitAchat->getIdStock()); $lStock[$lProduitAchat->getCproNom()][$lProduitAchat->getNproNom()][$lUnite]->setIdStockSolidaire($lProduitAchat->getIdStockSolidaire()); $lStock[$lProduitAchat->getCproNom()][$lProduitAchat->getNproNom()][$lUnite]->setIdDetailCommande($lProduitAchat->getIdDetailCommande()); $lStock[$lProduitAchat->getCproNom()][$lProduitAchat->getNproNom()][$lUnite]->setIdModeleLot($lProduitAchat->getIdModeleLot()); $lStock[$lProduitAchat->getCproNom()][$lProduitAchat->getNproNom()][$lUnite]->setIdDetailCommandeSolidaire($lProduitAchat->getIdDetailCommandeSolidaire()); $lStock[$lProduitAchat->getCproNom()][$lProduitAchat->getNproNom()][$lUnite]->setIdModeleLotSolidaire($lProduitAchat->getIdModeleLotSolidaire()); $lStock[$lProduitAchat->getCproNom()][$lProduitAchat->getNproNom()][$lUnite]->setQuantite($lProduitAchat->getQuantite()); $lStock[$lProduitAchat->getCproNom()][$lProduitAchat->getNproNom()][$lUnite]->setQuantiteSolidaire($lProduitAchat->getQuantiteSolidaire()); $lStock[$lProduitAchat->getCproNom()][$lProduitAchat->getNproNom()][$lUnite]->setMontant($lProduitAchat->getMontant()); $lStock[$lProduitAchat->getCproNom()][$lProduitAchat->getNproNom()][$lUnite]->setMontantSolidaire($lProduitAchat->getMontantSolidaire()); $lStock[$lProduitAchat->getCproNom()][$lProduitAchat->getNproNom()][$lUnite]->setIdDetailOperation($lProduitAchat->getIdDetailOperation()); $lStock[$lProduitAchat->getCproNom()][$lProduitAchat->getNproNom()][$lUnite]->setIdDetailOperationSolidaire($lProduitAchat->getIdDetailOperationSolidaire()); } else { if (!isset($lStock[$lProduitAchat->getCproNom()])) { $lStock[$lProduitAchat->getCproNom()] = array("cproId" => $lProduitAchat->getCproId(), "cproNom" => $lProduitAchat->getCproNom(), "produits" => array()); } $lProduitAchat->setUnite($lUnite); $lProduitAchat->setUniteSolidaire($lUnite); $lStock[$lProduitAchat->getCproNom()]["produits"][$lProduitAchat->getNproNom() . $lUnite] = $lProduitAchat; // Ajout des lots $lModelesLot = ModeleLotManager::selectByIdNomProduit($lProduitAchat->getIdNomProduit()); // Récupère même les lots supprimés car il y a peut être eu un achat sur ce lot précédemment $lLots = array(); foreach ($lModelesLot as $lModeleLot) { $lLot = new DetailMarcheVO(); $lLot->setId($lModeleLot->getId()); $lLot->setTaille($lModeleLot->getQuantite()); $lLot->setPrix($lModeleLot->getPrix()); $lLots[$lModeleLot->getId()] = $lLot; } $lLotsProduits[$lProduitAchat->getIdNomProduit() . $lUnite] = array("nom" => $lProduitAchat->getNproNom(), "type" => "modele", "lots" => $lLots); } } } ksort($lStock); $lResponse->setStock($lStock); // Stock de produit disponible $lResponse->setLots($lLotsProduits); // Lots des produits $lBanqueService = new BanqueService(); $lTypePaiementService = new TypePaiementService(); $lResponse->setTypePaiement($lTypePaiementService->selectVisible()); // Type de paiment $lResponse->setBanques($lBanqueService->getAllActif()); // Liste des banques $lResponse->setIdRequete(uniqid()); return $lResponse; } return $lVr; }
/** * @name validGetInfoAchatMarche($pData) * @return GetInfoAchatMarcheVR * @desc Test la validite de l'élément */ public static function validGetInfoAchatMarche($pData) { $lVr = new GetMarcheListeReservationVR(); //Tests inputs if (!isset($pData['id_commande'])) { $lVr->setValid(false); $lVr->getLog()->setValid(false); $lErreur = new VRerreur(); $lErreur->setCode(MessagesErreurs::ERR_201_CODE); $lErreur->setMessage(MessagesErreurs::ERR_201_MSG); $lVr->getLog()->addErreur($lErreur); } if (!isset($pData['id_adherent'])) { $lVr->setValid(false); $lVr->getLog()->setValid(false); $lErreur = new VRerreur(); $lErreur->setCode(MessagesErreurs::ERR_201_CODE); $lErreur->setMessage(MessagesErreurs::ERR_201_MSG); $lVr->getLog()->addErreur($lErreur); } if ($lVr->getValid()) { //Tests Techniques if (!is_int((int) $pData['id_commande'])) { $lVr->setValid(false); $lVr->getLog()->setValid(false); $lErreur = new VRerreur(); $lErreur->setCode(MessagesErreurs::ERR_104_CODE); $lErreur->setMessage(MessagesErreurs::ERR_104_MSG); $lVr->getLog()->addErreur($lErreur); } if (!is_int((int) $pData['id_adherent'])) { $lVr->setValid(false); $lVr->getLog()->setValid(false); $lErreur = new VRerreur(); $lErreur->setCode(MessagesErreurs::ERR_104_CODE); $lErreur->setMessage(MessagesErreurs::ERR_104_MSG); $lVr->getLog()->addErreur($lErreur); } //Tests Fonctionnels if (empty($pData['id_commande'])) { $lVr->setValid(false); $lVr->getLog()->setValid(false); $lErreur = new VRerreur(); $lErreur->setCode(MessagesErreurs::ERR_207_CODE); $lErreur->setMessage(MessagesErreurs::ERR_207_MSG); $lVr->getLog()->addErreur($lErreur); } if (empty($pData['id_adherent'])) { $lVr->setValid(false); $lVr->getLog()->setValid(false); $lErreur = new VRerreur(); $lErreur->setCode(MessagesErreurs::ERR_207_CODE); $lErreur->setMessage(MessagesErreurs::ERR_207_MSG); $lVr->getLog()->addErreur($lErreur); } // Si le marche n'est plus ouvert $lCommande = CommandeManager::select($pData['id_commande']); if ($lCommande->getArchive() != 0) { $lVr->setValid(false); $lVr->getLog()->setValid(false); $lErreur = new VRerreur(); $lErreur->setCode(MessagesErreurs::ERR_239_CODE); $lErreur->setMessage(MessagesErreurs::ERR_239_MSG); $lVr->getLog()->addErreur($lErreur); } $lAdherent = AdherentViewManager::select($pData["id_adherent"]); if ($lAdherent->getAdhId() != $pData["id_adherent"]) { $lVr->setValid(false); $lVr->getLog()->setValid(false); $lErreur = new VRerreur(); $lErreur->setCode(MessagesErreurs::ERR_216_CODE); $lErreur->setMessage(MessagesErreurs::ERR_216_MSG); $lVr->getLog()->addErreur($lErreur); } /*$lIdReservation = new IdReservationVO(); $lIdReservation->setIdCompte($lAdherent->getAdhIdCompte()); $lIdReservation->setIdCommande($pData['id_commande']); $lReservationService = new ReservationService(); $lOperations = $lReservationService->selectOperationReservation($lIdReservation); $lOperation = $lOperations[0]; $lIdOperation = $lOperation->getId(); // Si il y a bien une réservation existante if(is_null($lIdOperation) || $lOperation->getTypePaiement() != 0) { $lVr->setValid(false); $lVr->getLog()->setValid(false); $lErreur = new VRerreur(); $lErreur->setCode(MessagesErreurs::ERR_238_CODE); $lErreur->setMessage(MessagesErreurs::ERR_238_MSG); $lVr->getLog()->addErreur($lErreur); }*/ } return $lVr; }
/** * @name validUpdate($pData) * @return AfficheReservationAdherentVR * @desc Test la validite de l'élément */ public static function validUpdate($pData) { $lTestId = AfficheReservationAdherentValid::validDelete($pData); if ($lTestId->getValid()) { $lVr = new AfficheReservationAdherentVR(); //Tests inputs if (!isset($pData['id_adherent'])) { $lVr->setValid(false); $lVr->getId_adherent()->setValid(false); $lErreur = new VRerreur(); $lErreur->setCode(MessagesErreurs::ERR_201_CODE); $lErreur->setMessage(MessagesErreurs::ERR_201_MSG); $lVr->getId_adherent()->addErreur($lErreur); } if (!isset($pData['id_commande'])) { $lVr->setValid(false); $lVr->getId_commande()->setValid(false); $lErreur = new VRerreur(); $lErreur->setCode(MessagesErreurs::ERR_201_CODE); $lErreur->setMessage(MessagesErreurs::ERR_201_MSG); $lVr->getId_commande()->addErreur($lErreur); } if ($lVr->getValid()) { //Tests Techniques if (!TestFonction::checkLength($pData['id_adherent'], 0, 11)) { $lVr->setValid(false); $lVr->getId_adherent()->setValid(false); $lErreur = new VRerreur(); $lErreur->setCode(MessagesErreurs::ERR_101_CODE); $lErreur->setMessage(MessagesErreurs::ERR_101_MSG); $lVr->getId_adherent()->addErreur($lErreur); } if (!is_int((int) $pData['id_adherent'])) { $lVr->setValid(false); $lVr->getId_adherent()->setValid(false); $lErreur = new VRerreur(); $lErreur->setCode(MessagesErreurs::ERR_108_CODE); $lErreur->setMessage(MessagesErreurs::ERR_108_MSG); $lVr->getId_adherent()->addErreur($lErreur); } if (!TestFonction::checkLength($pData['id_commande'], 0, 11)) { $lVr->setValid(false); $lVr->getId_commande()->setValid(false); $lErreur = new VRerreur(); $lErreur->setCode(MessagesErreurs::ERR_101_CODE); $lErreur->setMessage(MessagesErreurs::ERR_101_MSG); $lVr->getId_commande()->addErreur($lErreur); } if (!is_int((int) $pData['id_commande'])) { $lVr->setValid(false); $lVr->getId_commande()->setValid(false); $lErreur = new VRerreur(); $lErreur->setCode(MessagesErreurs::ERR_108_CODE); $lErreur->setMessage(MessagesErreurs::ERR_108_MSG); $lVr->getId_commande()->addErreur($lErreur); } //Tests Fonctionnels if (empty($pData['id_adherent'])) { $lVr->setValid(false); $lVr->getId_adherent()->setValid(false); $lErreur = new VRerreur(); $lErreur->setCode(MessagesErreurs::ERR_201_CODE); $lErreur->setMessage(MessagesErreurs::ERR_201_MSG); $lVr->getId_adherent()->addErreur($lErreur); } if (empty($pData['id_commande'])) { $lVr->setValid(false); $lVr->getId_commande()->setValid(false); $lErreur = new VRerreur(); $lErreur->setCode(MessagesErreurs::ERR_201_CODE); $lErreur->setMessage(MessagesErreurs::ERR_201_MSG); $lVr->getId_commande()->addErreur($lErreur); } $lAdherent = AdherentViewManager::select($pData['id_adherent']); if ($lAdherent->getAdhId() != $pData['id_adherent']) { $lVr->setValid(false); $lVr->getId_adherent()->setValid(false); $lErreur = new VRerreur(); $lErreur->setCode(MessagesErreurs::ERR_216_CODE); $lErreur->setMessage(MessagesErreurs::ERR_216_MSG); $lVr->getId_adherent()->addErreur($lErreur); } $lCommande = CommandeManager::select($pData['id_commande']); if ($lCommande->getId() != $pData['id_commande']) { $lVr->setValid(false); $lVr->getId_commande()->setValid(false); $lErreur = new VRerreur(); $lErreur->setCode(MessagesErreurs::ERR_216_CODE); $lErreur->setMessage(MessagesErreurs::ERR_216_MSG); $lVr->getId_commande()->addErreur($lErreur); } } return $lVr; } return $lTestId; }
/** * @name getAchatEtReservation($pParam) * @return AchatAdherentResponse * @desc Retourne les détails d'une réservation et des achats du marché */ public function getAchatEtReservation($pParam) { $lVr = AfficheAchatAdherentValid::validGetAchatEtReservation($pParam); if ($lVr->getValid()) { $lIdAdherent = $pParam["id_adherent"]; $lIdMarche = $pParam["id_marche"]; $lIdOperation = $pParam["idOperation"]; $lResponse = new AchatAdherentResponse(); $lAdherent = AdherentViewManager::select($lIdAdherent); $lResponse->setAdherent($lAdherent); // Tableau pour rechercher le détail des produits achetés $lIdProduits = array(); // Si achat sur marché recherche si il y a une réservation et le détail des achats if (!empty($lIdMarche) && empty($lIdOperation)) { $lReservationService = new ReservationService(); $lIdReservation = new IdReservationVO(); $lIdReservation->setIdCompte($lAdherent->getAdhIdCompte()); $lIdReservation->setIdCommande($lIdMarche); $lReservation = $lReservationService->get($lIdReservation); $lResponse->setReservation($lReservation); if (!empty($lReservation)) { // Récupère les informations sur les produits achetés foreach ($lReservation->getDetailReservation() as $lDetailReservation) { array_push($lIdProduits, $lDetailReservation->getIdProduit()); } } $lAchatService = new AchatService(); $lIdAchat = new IdAchatVO(); $lIdAchat->setIdCompte($lAdherent->getAdhIdCompte()); $lIdAchat->setIdCommande($lIdMarche); $lAchats = $lAchatService->getAll($lIdAchat); $lResponse->setAchats($lAchats); if (is_array($lAchats)) { foreach ($lAchats as $lAchat) { foreach ($lAchat->getDetailAchat() as $lDetailAchat) { array_push($lIdProduits, $lDetailAchat->getIdProduit()); } foreach ($lAchat->getDetailAchatSolidaire() as $lDetailAchat) { array_push($lIdProduits, $lDetailAchat->getIdProduit()); } } } } // Récupère l'achat si il il y une operation if (!empty($lIdOperation)) { $lAchatService = new AchatService(); $lIdAchat = new IdAchatVO(); $lIdAchat->setIdAchat($lIdOperation); $lAchat = $lAchatService->get($lIdAchat); $lResponse->setAchats($lAchat); foreach ($lAchat->getDetailAchat() as $lDetailAchat) { array_push($lIdProduits, $lDetailAchat->getIdProduit()); } foreach ($lAchat->getDetailAchatSolidaire() as $lDetailAchat) { array_push($lIdProduits, $lDetailAchat->getIdProduit()); } } $lProduitService = new ProduitService(); $lResponse->setDetailProduit($lProduitService->selectDetailProduits($lIdProduits)); return $lResponse; } return $lVr; }
/** * @name select($pId) * @param integer * @return AdherentViewVO * @desc Retourne un adhérent */ private function select($pId) { return AdherentViewManager::select($pId); }
/** * @name controleModifierReservation($pParam) * @return ListeReservationCommandeVR * @desc Vérifie si il est possible de modifier la réservation */ public function controleModifierReservation($pParam) { $pParam['idCompte'] = $_SESSION[ID_COMPTE]; $lVr = ReservationMarcheValid::validAjout($pParam); if ($lVr->getValid()) { $lIdLot = $pParam["detailReservation"][0]["stoIdDetailCommande"]; $lDetailMarche = DetailMarcheViewManager::selectByLot($lIdLot); $lResponse = new ReservationMarcheResponse(); $lMarcheService = new MarcheService(); $lResponse->setMarche($lMarcheService->get($lDetailMarche[0]->getComId())); $lResponse->setAdherent(AdherentViewManager::select($_SESSION[DROIT_ID])); return $lResponse; } return $lVr; }