|
|
@ -8,6 +8,7 @@ use App\metier\Alumni;
|
|
|
|
use App\metier\TypeContrat;
|
|
|
|
use App\metier\TypeContrat;
|
|
|
|
use App\metier\niveauEtudes;
|
|
|
|
use App\metier\niveauEtudes;
|
|
|
|
use App\metier\Offre;
|
|
|
|
use App\metier\Offre;
|
|
|
|
|
|
|
|
use App\metier\Image;
|
|
|
|
|
|
|
|
|
|
|
|
class OffreModele
|
|
|
|
class OffreModele
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -19,7 +20,7 @@ class OffreModele
|
|
|
|
$this->offreGw = new OffreGateway(new Connection("mysql:host=localhost;dbname=dbAlica", "test", "test"));
|
|
|
|
$this->offreGw = new OffreGateway(new Connection("mysql:host=localhost;dbname=dbAlica", "test", "test"));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public function publierOffre($imgId)
|
|
|
|
public function publierOffre(Image $img)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
$desc = $_POST["description"];
|
|
|
|
$desc = $_POST["description"];
|
|
|
@ -63,7 +64,7 @@ class OffreModele
|
|
|
|
new Alumni(12,"test.mail@icloud.fr","password","admin"),
|
|
|
|
new Alumni(12,"test.mail@icloud.fr","password","admin"),
|
|
|
|
$nom,
|
|
|
|
$nom,
|
|
|
|
$desc,
|
|
|
|
$desc,
|
|
|
|
$imgId,
|
|
|
|
$img,
|
|
|
|
$typeContrat,
|
|
|
|
$typeContrat,
|
|
|
|
$ville,
|
|
|
|
$ville,
|
|
|
|
$entreprise,
|
|
|
|
$entreprise,
|
|
|
@ -80,5 +81,10 @@ class OffreModele
|
|
|
|
|
|
|
|
|
|
|
|
echo "offre inséerée";
|
|
|
|
echo "offre inséerée";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public function obtenirOffres() : array
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
$offres = $this->offreGw->getOffres();
|
|
|
|
|
|
|
|
return $offres;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|