maj commentaires

This commit is contained in:
laura.chevillet 2026-01-26 15:24:30 +01:00
parent 124381521f
commit 11f0595801
5 changed files with 51 additions and 17 deletions

View file

@ -9,8 +9,9 @@ require_once("mother_entity.php");
class Category extends Entity{
private int $_id;
protected string $_name = '';
private int $_id;
protected string $_name = '';
protected string $_parent = '';
/**
* Constructeur (j'ai toujours pas compris à quoi ça sert)
@ -53,5 +54,20 @@ class Category extends Entity{
$this->_name = $name;
}
/**
* Récuperation du nom du parent de la catégorie
* @return string nom de la catégorie
*/
public function getParent(){
return $this->_parent;
}
/**
* Mise à jour du nom du parent de la catégorie
* @param string le nouveau nom de la catégorie
*/
public function setParent($parent){
$this->_parent = $parent;
}
}