/** * @name getListeCompte() * @return ListeCompteResponse * @desc Renvoie la liste des comptes spéciaux */ public function getListeCompte() { $lIdentificationService = new IdentificationService(); $lListeCompte = $lIdentificationService->get(); $lNbAdministrateur = 0; $lNbCaisse = 0; $lNbSolidaire = 0; $lResponse = new ListeCompteResponse(); foreach ($lListeCompte as $lCompte) { switch ($lCompte->getType()) { case "2": $lResponse->addAdministrateur($lCompte); $lNbAdministrateur++; break; case "3": $lResponse->addCaisse($lCompte); $lNbCaisse++; break; case "4": $lResponse->addSolidaire($lCompte); $lNbSolidaire++; break; } } $lIdentificationVO = new IdentificationVO(); if ($lNbAdministrateur == 0) { $lResponse->addAdministrateur($lIdentificationVO); } if ($lNbCaisse == 0) { $lResponse->addCaisse($lIdentificationVO); } if ($lNbSolidaire == 0) { $lResponse->addSolidaire($lIdentificationVO); } return $lResponse; }
/** * @name delete($pParam) * @return VR * @desc Met à jour le mot de passe d'un compte spécial */ public function delete($pParam) { $lVr = CompteSpecialValid::validDelete($pParam); if ($lVr->getValid()) { $lIdentificationService = new IdentificationService(); $lIdentificationService->delete($pParam['id']); } return $lVr; }