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.
ScienceQuest/project/src/model/mdl/MdlThematique.php

26 lines
646 B

<?php
namespace model;
class MdlThematique extends MdlBase{
private ThematiqueGateway $gw;
public function __construct(){
parent::__construct();
$this->gw = new ThematiqueGateway($this->con);
}
public function getFromId(int $id): Thematique{
$row = $this->gw->getFromId($id);
return new Thematique($row['id'], $row['libelle']);
}
public function getAll(): array {
$ret=array();
$row = $this->gw->getAll();
for($i=0; $i< count($row); $i++){
array_push($ret, new Thematique($row[$i]['id'], $row[$i]['libelle']));
}
return $ret;
}
}