You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
806 B
32 lines
806 B
<?php
|
|
|
|
class TacheModel {
|
|
private $gwList;
|
|
|
|
public function __construct() {
|
|
global $rep,$vues,$bd;
|
|
$co = new Connection($bd['dsn'],$bd['user'],$bd['pswd']);
|
|
$this->gwList = new ListeGateway($co);
|
|
}
|
|
|
|
public function get_gwList(){
|
|
return $this->gwList;
|
|
}
|
|
|
|
function addTache(string $intitule, int $idListe ){
|
|
$this->get_gwList()->creerTache($intitule,$idListe);
|
|
}
|
|
|
|
function delTache(int $idTache){
|
|
$this->get_gwList()->delTache($idTache);
|
|
}
|
|
|
|
function changeCompletedTache(int $idTache){
|
|
$complete=$this->get_gwList()->getTacheById($idTache);
|
|
$this->get_gwList()->updateTache($idTache,$complete);
|
|
}
|
|
|
|
|
|
}
|
|
|
|
?>
|