maj commentaires
This commit is contained in:
parent
124381521f
commit
11f0595801
5 changed files with 51 additions and 17 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue