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.
24 lines
755 B
24 lines
755 B
<?php
|
|
class AdminModel
|
|
{
|
|
|
|
private EnigmeGateway $enigme_gateway;
|
|
private Nettoyage $nettoyage;
|
|
private Validation $validation;
|
|
|
|
function __construct()
|
|
{
|
|
global $error, $view, $rep;
|
|
$this->enigme_gateway = new EnigmeGateway();
|
|
$this->nettoyage = new Nettoyage();
|
|
$this->validation = new Validation();
|
|
}
|
|
|
|
public function addNewEnigmeSolo(string $nom,string $enonce,string $aide,string $rappel,string $exemple,string $test,string $solution) : Enigme
|
|
{
|
|
$enigme = new Enigme(1,$nom, $enonce, $aide, $rappel, $exemple, $solution, $test);
|
|
$this->enigme_gateway->insert($enigme);
|
|
$tabEnigme = $this->enigme_gateway->findLastEnigma();
|
|
return $tabEnigme[0];
|
|
}
|
|
} |