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.
Php_RSS/fluxRSS/model/ArticleModel.php

18 lines
558 B

<?php
namespace model;
use DAL;
use metier;
class ArticleModel
{
public static function getArticles() : array
{
$gwArticle = new DAL\ArticleGateway(new DAL\Connection('mysql:host = localhost; dbname = dbrorossetto', 'rorossetto', 'tpphp'));
$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'] );
}
return $tabArticle;
}
}