|
|
@ -25,13 +25,14 @@ class ListeGateway
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public function delete(Liste $l): void{
|
|
|
|
public function delete(int $id): void{
|
|
|
|
|
|
|
|
$results=findById($id);
|
|
|
|
$tacheGateway=new TacheGateway($this->con);
|
|
|
|
$tacheGateway=new TacheGateway($this->con);
|
|
|
|
foreach($l->getTaches() as $taches){
|
|
|
|
foreach($results[0]->getTaches() as $taches){
|
|
|
|
$tacheGateway->delete($taches);
|
|
|
|
$tacheGateway->delete($taches);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$query = "DELETE FROM Liste where id=:id";
|
|
|
|
$query = "DELETE FROM Liste where id=:id";
|
|
|
|
$this->con->executeQuery($query, array(':id' => array($l->getId(), PDO::PARAM_INT)));
|
|
|
|
$this->con->executeQuery($query, array(':id' => array($id, PDO::PARAM_INT)));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public function update(Liste $l): void{
|
|
|
|
public function update(Liste $l): void{
|
|
|
|