diff --git a/app/entities/user_entity.php b/app/entities/user_entity.php index 6fa9d08..0d4a9e8 100644 --- a/app/entities/user_entity.php +++ b/app/entities/user_entity.php @@ -2,50 +2,123 @@ require_once("mother_entity.php"); class User extends Entity{ - // Attributs + private int $_id; private string $_name = ''; private string $_firstname = ''; + private string $_pseudo = ''; + private string $_image = ''; private string $_mail = ''; - private string $_pwd; + private string $_pwd; + private string $_phone = ''; + private string $_work = ''; + private string $_birth = ''; + private string $_location = ''; + private string $_description = ''; + private string $_account_creation = ''; + private int $_status; - /** - * Constructeur - */ public function __construct(){ - // Préfixe de la table pour hydratation - $this->_prefixe = 'user_'; + $this->_prefix = 'user_'; + } + + public function getId():int{ + return $this->_id; + } + public function setId(int $id){ + $this->_id = $id; } - // Méthodes - getters et setters public function getName():string{ return $this->_name; } - public function setName(string $strNewName){ - $this->_name = $this->nettoyer($strNewName); + public function setName(string $name){ + $this->_name = $name; } + public function getFirstname():string{ return $this->_firstname; } - public function setFirstname(string $strFirstname){ - $this->_firstname = $this->nettoyer($strFirstname); + public function setFirstname(string $firstname){ + $this->_firstname = $firstname; } + + public function getPseudo():string{ + return $this->_pseudo; + } + public function setPseudo(string $pseudo){ + $this->_pseudo = $pseudo; + } + + public function getImage():string{ + return $this->_image; + } + public function setImage(string $image){ + $this->_image = $image; + } + public function getMail():string{ return $this->_mail; } - public function setMail(string $strMail){ - $this->_mail = strtolower($this->nettoyer($strMail)); + public function setMail(string $mail){ + $this->_mail = strtolower($mail); } + 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; - } + public function setPwd(string $pwd){ + $this->_pwd = $pwd; + } + public function getPhone():string{ + return $this->_phone; + } + public function setPhone(string $phone){ + $this->_phone = $phone; + } + public function getWork():string{ + return $this->_work; + } + public function setWork(string $work){ + $this->_work = $work; + } + public function getBirth():string{ + return $this->_birth; + } + public function setBirth(string $birth){ + $this->_birth = $birth; + } - } \ No newline at end of file + public function getLocation():string{ + return $this->_location; + } + public function setLocation(string $location){ + $this->_location = $location; + } + + public function getDescription():string{ + return $this->_description; + } + public function setDescription(string $description){ + $this->_description = $description; + } + + public function getAccountCreation():string{ + return $this->_account_creation; + } + public function setAccountCreation(string $account_creation){ + $this->_account_creation = $account_creation; + } + + public function getStatus():int{ + return $this->_status; + } + public function setStatus(int $status){ + $this->_status = $status; + } + } diff --git a/app/entity/user_entity.php b/app/entity/user_entity.php deleted file mode 100644 index 5e19525..0000000 --- a/app/entity/user_entity.php +++ /dev/null @@ -1,124 +0,0 @@ -_prefix = 'user_'; - } - - public function getId():int{ - return $this->_id; - } - public function setId(int $id){ - $this->_id = $id; - } - - public function getName():string{ - return $this->_name; - } - public function setName(string $name){ - $this->_name = $name; - } - - public function getFirstname():string{ - return $this->_firstname; - } - public function setFirstname(string $firstname){ - $this->_firstname = $firstname; - } - - public function getPseudo():string{ - return $this->_pseudo; - } - public function setPseudo(string $pseudo){ - $this->_pseudo = $pseudo; - } - - public function getImage():string{ - return $this->_image; - } - public function setImage(string $image){ - $this->_image = $image; - } - - public function getMail():string{ - return $this->_mail; - } - public function setMail(string $mail){ - $this->_mail = strtolower($mail); - } - - public function getPwd():string{ - return $this->_pwd; - } - public function getPwdHash():string{ - return password_hash($this->_pwd, PASSWORD_DEFAULT); - } - public function setPwd(string $pwd){ - $this->_pwd = $pwd; - } - - public function getPhone():string{ - return $this->_phone; - } - public function setPhone(string $phone){ - $this->_phone = $phone; - } - - public function getWork():string{ - return $this->_work; - } - public function setWork(string $work){ - $this->_work = $work; - } - - public function getBirth():string{ - return $this->_birth; - } - public function setBirth(string $birth){ - $this->_birth = $birth; - } - - public function getLocation():string{ - return $this->_location; - } - public function setLocation(string $location){ - $this->_location = $location; - } - - public function getDescription():string{ - return $this->_description; - } - public function setDescription(string $description){ - $this->_description = $description; - } - - public function getAccountCreation():string{ - return $this->_account_creation; - } - public function setAccountCreation(string $account_creation){ - $this->_account_creation = $account_creation; - } - - public function getStatus():int{ - return $this->_status; - } - public function setStatus(int $status){ - $this->_status = $status; - } - } diff --git a/app/views/admin.php b/app/views/admin.php index e3159b0..8cfe210 100644 --- a/app/views/admin.php +++ b/app/views/admin.php @@ -1,15 +1,4 @@ - php - - -
- - -