connexion in model modified

pull/3/head
Roxane ROSSETTO 1 year ago
parent 0540dc629b
commit 75bfeb5913

@ -9,6 +9,6 @@ $rep = __DIR__ . '/../';
//BD
$base = 'sasa';
$login = '';
$mdp = '';
$base = 'dbrorossetto';
$login = 'rorossetto';
$mdp = 'tpphp';

@ -4,11 +4,13 @@ namespace model;
use DAL;
use metier;
require_once "config/config.php";
class ArticleModel
{
public static function getArticles() : array
{
$gwArticle = new DAL\ArticleGateway(new DAL\Connection('mysql:host = localhost; dbname = dbrorossetto', 'rorossetto', 'tpphp'));
$gwArticle = new DAL\ArticleGateway(new DAL\Connection( $base, $login, $mdp));
$res = $gwArticle->getAllArticles();
foreach($res as $row){
$tabArticle[] = new metier\Article($row['id'], $row['title'],$row['datePub'],$row['description'],$row['guid'],$row['link'],$row['mediaContent'],$row['provenance'] );

@ -2,6 +2,8 @@
namespace model;
require_once "config/config.php";
class FluxModel
{
private FluxGateway $gateway;

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save