|
|
@ -55,18 +55,18 @@ class MdlListe{
|
|
|
|
return $tabListe;
|
|
|
|
return $tabListe;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public function findById(string $id): Liste{
|
|
|
|
public function findById(string $id): array{
|
|
|
|
$gate=new ListeGateway($this->con);
|
|
|
|
$gate=new ListeGateway($this->con);
|
|
|
|
$gateTache=new TacheGateway($this->con);
|
|
|
|
$gateTache=new TacheGateway($this->con);
|
|
|
|
$results=$gate->findById($id);
|
|
|
|
$results=$gate->findById($id);
|
|
|
|
$tabListe=null;
|
|
|
|
$tabListe=[];
|
|
|
|
foreach ($results as $row ) {
|
|
|
|
foreach ($results as $row ) {
|
|
|
|
$tabTache=[];
|
|
|
|
$tabTache=[];
|
|
|
|
$taches=$gateTache->getTacheFromIdList($row['id']);
|
|
|
|
$taches=$gateTache->getTacheFromIdList($row['id']);
|
|
|
|
foreach($taches as $tata){
|
|
|
|
foreach($taches as $tata){
|
|
|
|
$tabTache[]=$tata;
|
|
|
|
$tabTache[]=$tata;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$tabListe=new Liste($row['id'], $row['name'], $row['private'], null, $tabTache);
|
|
|
|
$tabListe[]=new Liste($row['id'], $row['name'], $row['private'], null, $tabTache);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return $tabListe;
|
|
|
|
return $tabListe;
|
|
|
|
}
|
|
|
|
}
|
|
|
|