Commit 969ebde6 authored by VisentiniEmilien's avatar VisentiniEmilien

finish refactor

parent 3932abf8
<?php
namespace bdd\controleur;
use bdd\models\company;
use bdd\models\game;
use bdd\models\platform;
class ControleurRequete{
public function selectMario(){
$jeu = \bdd\models\game::select('name')->where('name','like','%Mario%','or','alias','like','%Mario%')->get();
$vue = new \bdd\vue\RequeteVue($jeu);
$html = $vue->render(1);
$rs->getBody()->write($html);
return $rs;
}
public function selectCompanyCountry(){
$company = \bdd\models\company::select('name')->where('location_country','like','%Japan%')->get();
$vue = new \bdd\vue\RequeteVue($company);
$html = $vue->render(1);
$rs->getBody()->write($html);
return $rs;
}
public function selectPlatformBase(){
$platform = \bdd\models\platform::select('name')->where('install_base','>','10000000')->get();
$vue = new \bdd\vue\RequeteVue($platform);
$html = $vue->render(1);
$rs->getBody()->write($html);
return $rs;
}
public function selectGameNumber(){
$game = \bdd\models\game::select('name')->orderBy('name')->limit('21173','422')->get();
$vue = new \bdd\vue\RequeteVue($game);
$html = $vue->render(1);
$rs->getBody()->write($html);
return $rs;
}
public function selectPage($p){
$p = ($p-1)*500;
$jeu = \bdd\models\game::select('id','name')->orderBy('id')->limit($p,'500')->get();
$vue = new \bdd\vue\RequeteVue($jeu);
$html = $vue->render(1);
$rs->getBody()->write($html);
return $rs;
}
}
\ No newline at end of file
<?php
namespace bdd\controleur;
use bdd\models\company;
use bdd\models\game;
use bdd\models\platform;
class ControleurRequete{
}
\ No newline at end of file
<?php
namespace src\vue;
class HomeVue
{
public function renderHome{
echo<<<END
<!DOCTYPE html>
<html lang=" "fr">
<head>
<meta charset="utf-8">
<title>HOME</title>
</head>
<body>
<a href="#" title="retour à la page d'accueil"><h1>Accueil</h1></a>
</body>
</html>
END;
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment