on s'arrete pour ce soir il est 00h05 quand meme

This commit is contained in:
Yasder5 2026-01-14 23:05:10 +01:00
parent 4f86bd2660
commit 082b1ae99a
7 changed files with 306 additions and 8 deletions

View file

@ -0,0 +1,51 @@
<?php
require_once("mother_entity.php");
class User extends Entity{
// Attributs
private string $_name = '';
private string $_firstname = '';
private string $_mail = '';
private string $_pwd;
/**
* Constructeur
*/
public function __construct(){
// Préfixe de la table pour hydratation
$this->_prefixe = 'user_';
}
// Méthodes - getters et setters
public function getName():string{
return $this->_name;
}
public function setName(string $strNewName){
$this->_name = $this->nettoyer($strNewName);
}
public function getFirstname():string{
return $this->_firstname;
}
public function setFirstname(string $strFirstname){
$this->_firstname = $this->nettoyer($strFirstname);
}
public function getMail():string{
return $this->_mail;
}
public function setMail(string $strMail){
$this->_mail = strtolower($this->nettoyer($strMail));
}
public function getPwd():string{
return $this->_pwd;
}
public function getPwdHash():string{
return password_hash($this->_pwd, PASSWORD_DEFAULT);
}
public function setPwd(string $strPwd){
$this->_pwd = $strPwd;
}
}