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.
25 lines
569 B
25 lines
569 B
<?php
|
|
|
|
namespace model;
|
|
|
|
class SexeGateway
|
|
{
|
|
private Connection $con;
|
|
|
|
function __construct(Connection $con) {
|
|
$this->con = $con;
|
|
}
|
|
|
|
public function getFromId(int $id): array
|
|
{
|
|
$this->con->executeQuery("SELECT id, libelle FROM Sexe WHERE id=:id;",
|
|
[':id' => [$id, $this->con::PARAM_INT]]);
|
|
return $this->con->getOneResult();
|
|
}
|
|
|
|
public function getAll(): array
|
|
{
|
|
$this->con->executeQuery("SELECT id, libelle FROM Sexe;");
|
|
return $this->con->getResults();
|
|
}
|
|
} |