id = $id; $this->name = $name; $this->mail = $mail; } function getMail() { return $this->mail; } function setMail($mail) { $this->mail = $mail; } /** * check a mail address * * check the correctness of length, domain and contents * of a mail address * * @param string $mail mail address to check * if this $mail parameter is '', check the mail * atribute of the current object * @return boolean true if mail OK, false else */ function checkMail($mail = '') { if ( $mail == '' ) $mail = $this->mail; // 1. tests sur longueur // TODO // ... return true; } } ?>