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.
21 lines
452 B
21 lines
452 B
<?php
|
|
|
|
namespace model;
|
|
|
|
class JeuGateway
|
|
{
|
|
private $con;
|
|
|
|
function __construct(Connection $con) {
|
|
$this->con = $con;
|
|
}
|
|
public function getAll() : array
|
|
{
|
|
$this->con->executeQuery("SELECT id, nom, nbrparties FROM Jeu;");
|
|
$listJeu = [];
|
|
foreach($this->con->getResults() as $row){
|
|
$listJeu[] = new Jeu($row['id'], $row['nom'], $row['nbrparties']);
|
|
}
|
|
return $listJeu;
|
|
}
|
|
} |