You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
587 B
22 lines
587 B
<?php
|
|
|
|
namespace Classes;
|
|
class Personne {
|
|
private $nom;
|
|
private $prenom;
|
|
private $anneeNaissance;
|
|
private $email;
|
|
|
|
// Constructeur
|
|
public function __construct($nom, $prenom, $anneeNaissance, $email) {
|
|
$this->nom = $nom;
|
|
$this->prenom = $prenom;
|
|
$this->anneeNaissance = $anneeNaissance;
|
|
$this->email = $email;
|
|
}
|
|
|
|
// Méthode magique pour l'affichage
|
|
public function __toString() {
|
|
return "Nom: {$this->nom}, Prénom: {$this->prenom}, Année de Naissance: {$this->anneeNaissance}, Email: {$this->email}";
|
|
}
|
|
} |