diff --git a/app/controllers/project_controller.php b/app/controllers/project_controller.php index 8a2e188..4f6a656 100644 --- a/app/controllers/project_controller.php +++ b/app/controllers/project_controller.php @@ -1,17 +1,19 @@ findAllUsers(); + + // Récupération des catégories + require_once("../app/models/category_model.php"); + $objCategoryModel = new CategoryModel; + $arrCategory = $objCategoryModel->findAllCategory(); + include('../app/views/search.php'); include('../app/views/partials/footer.php'); } + /** + * Fonction d'affichage de la page projet + */ + public function project (){ include("../app/views/partials/header.php"); - include('../app/views/project.php'); + include('../app/views/project.php'); include('../app/views/partials/footer.php'); - } } \ No newline at end of file diff --git a/app/entities/category_entity.php b/app/entities/category_entity.php new file mode 100644 index 0000000..eecebdc --- /dev/null +++ b/app/entities/category_entity.php @@ -0,0 +1,55 @@ +_prefix = 'category_'; + } + + // Méthode Getter et Setter + + /** + * Récuperation de l'id du Projet + * @return int l'id de la catégorie + */ + public function getId():int{ + return $this->_id; + } + + /** + * Mise à jour de l'id de la catégorie + * @param int le nouvelle id + */ + public function setId($id){ + $this->_id = $id; + } + + /** + * Récuperation du nom de la catégorie + * @return string nom de la catégorie + */ + public function getName(){ + return $this->_name; + } + + /** + * Mise à jour du nom de la catégorie + * @param string le nouveau nom de la catégorie + */ + public function setName($name){ + $this->_name = $name; + } + + +} \ No newline at end of file diff --git a/app/models/category_model.php b/app/models/category_model.php new file mode 100644 index 0000000..aa13516 --- /dev/null +++ b/app/models/category_model.php @@ -0,0 +1,25 @@ + 0){ + $strRq .= " LIMIT ".$intLimit; + } + + // Lancer la requête et récupérer les résultats + return $this->_db->query($strRq)->fetchAll(); + } + } \ No newline at end of file diff --git a/app/views/search.php b/app/views/search.php index b6fe7c7..c64b875 100644 --- a/app/views/search.php +++ b/app/views/search.php @@ -43,7 +43,7 @@ -