/** * @name convertFromArray($pArray) * @param array() * @desc Convertit le array en objet AdherentVO */ public static function convertFromArray($pArray) { $lValid = isset($pArray['id']) && isset($pArray['numero']) && isset($pArray['idCompte']) && isset($pArray['nom']) && isset($pArray['prenom']) && isset($pArray['courrielPrincipal']) && isset($pArray['courrielSecondaire']) && isset($pArray['telephonePrincipal']) && isset($pArray['telephoneSecondaire']) && isset($pArray['adresse']) && isset($pArray['codePostal']) && isset($pArray['ville']) && isset($pArray['dateNaissance']) && isset($pArray['dateAdhesion']) && isset($pArray['commentaire']) && isset($pArray['modules']); if ($lValid) { $lVo = new AdherentVO(); $lVo->setId($pArray['id']); $lVo->setNumero($pArray['numero']); $lVo->setIdCompte($pArray['idCompte']); $lVo->setNom($pArray['nom']); $lVo->setPrenom($pArray['prenom']); $lVo->setCourrielPrincipal($pArray['courrielPrincipal']); $lVo->setCourrielSecondaire($pArray['courrielSecondaire']); $lVo->setTelephonePrincipal($pArray['telephonePrincipal']); $lVo->setTelephoneSecondaire($pArray['telephoneSecondaire']); $lVo->setAdresse($pArray['adresse']); $lVo->setCodePostal($pArray['codePostal']); $lVo->setVille($pArray['ville']); $lVo->setDateNaissance($pArray['dateNaissance']); $lVo->setDateAdhesion($pArray['dateAdhesion']); $lVo->setCommentaire($pArray['commentaire']); $lVo->setListeModule($pArray['modules']); return $lVo; } return NULL; }