Compare commits

...

1 Commits

Author SHA1 Message Date
Maxime POINT 0e085f54db modif composer.json
1 year ago

@ -5,6 +5,10 @@
<sourceFolder url="file://$MODULE_DIR$/mvc_PSR4_twig/config" isTestSource="false" packagePrefix="config\" /> <sourceFolder url="file://$MODULE_DIR$/mvc_PSR4_twig/config" isTestSource="false" packagePrefix="config\" />
<sourceFolder url="file://$MODULE_DIR$/mvc_PSR4_twig/controleur" isTestSource="false" packagePrefix="controleur\" /> <sourceFolder url="file://$MODULE_DIR$/mvc_PSR4_twig/controleur" isTestSource="false" packagePrefix="controleur\" />
<sourceFolder url="file://$MODULE_DIR$/mvc_PSR4_twig/metier" isTestSource="false" packagePrefix="modeles\" /> <sourceFolder url="file://$MODULE_DIR$/mvc_PSR4_twig/metier" isTestSource="false" packagePrefix="modeles\" />
<sourceFolder url="file://$MODULE_DIR$/fluxRSS/config" isTestSource="false" packagePrefix="config\" />
<sourceFolder url="file://$MODULE_DIR$/fluxRSS/controleur" isTestSource="false" packagePrefix="controleur\" />
<sourceFolder url="file://$MODULE_DIR$/fluxRSS/DAL" isTestSource="false" packagePrefix="DAL\" />
<sourceFolder url="file://$MODULE_DIR$/fluxRSS/model" isTestSource="false" packagePrefix="model\" />
<excludeFolder url="file://$MODULE_DIR$/vendor/composer" /> <excludeFolder url="file://$MODULE_DIR$/vendor/composer" />
<excludeFolder url="file://$MODULE_DIR$/vendor/twig/twig" /> <excludeFolder url="file://$MODULE_DIR$/vendor/twig/twig" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-mbstring" /> <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-mbstring" />

@ -2,13 +2,15 @@
"require": { "require": {
"twig/twig": "^3.0", "twig/twig": "^3.0",
"ext-pdo": "*", "ext-pdo": "*",
"ext-dom": "*" "ext-dom": "*",
"ext-apcu": "*"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
"controleur\\": "controleur/", "controleur\\": "controleur/",
"config\\": "config/", "config\\": "config/",
"modeles\\": "metier/" "model\\": "model/",
"DAL\\": "DAL/"
} }
} }
} }

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

@ -6,10 +6,11 @@ $vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir); $baseDir = dirname($vendorDir);
return array( return array(
'modeles\\' => array($baseDir . '/modeles'), 'model\\' => array($baseDir . '/model'),
'controleur\\' => array($baseDir . '/controleur'), 'controleur\\' => array($baseDir . '/controleur'),
'config\\' => array($baseDir . '/config'), 'config\\' => array($baseDir . '/config'),
'Twig\\' => array($vendorDir . '/twig/twig/src'), 'Twig\\' => array($vendorDir . '/twig/twig/src'),
'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'), 'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'),
'Symfony\\Polyfill\\Ctype\\' => array($vendorDir . '/symfony/polyfill-ctype'), 'Symfony\\Polyfill\\Ctype\\' => array($vendorDir . '/symfony/polyfill-ctype'),
'DAL\\' => array($baseDir . '/DAL'),
); );

@ -14,7 +14,7 @@ class ComposerStaticInita6287a55fe354aae4af95d1e4395c915
public static $prefixLengthsPsr4 = array ( public static $prefixLengthsPsr4 = array (
'm' => 'm' =>
array ( array (
'modeles\\' => 8, 'model\\' => 6,
), ),
'c' => 'c' =>
array ( array (
@ -30,12 +30,16 @@ class ComposerStaticInita6287a55fe354aae4af95d1e4395c915
'Symfony\\Polyfill\\Mbstring\\' => 26, 'Symfony\\Polyfill\\Mbstring\\' => 26,
'Symfony\\Polyfill\\Ctype\\' => 23, 'Symfony\\Polyfill\\Ctype\\' => 23,
), ),
'D' =>
array (
'DAL\\' => 4,
),
); );
public static $prefixDirsPsr4 = array ( public static $prefixDirsPsr4 = array (
'modeles\\' => 'model\\' =>
array ( array (
0 => __DIR__ . '/../..' . '/modeles', 0 => __DIR__ . '/../..' . '/model',
), ),
'controleur\\' => 'controleur\\' =>
array ( array (
@ -57,6 +61,10 @@ class ComposerStaticInita6287a55fe354aae4af95d1e4395c915
array ( array (
0 => __DIR__ . '/..' . '/symfony/polyfill-ctype', 0 => __DIR__ . '/..' . '/symfony/polyfill-ctype',
), ),
'DAL\\' =>
array (
0 => __DIR__ . '/../..' . '/DAL',
),
); );
public static $classMap = array ( public static $classMap = array (

@ -1,9 +1,9 @@
<?php return array( <?php return array(
'root' => array( 'root' => array(
'name' => '__root__', 'name' => '__root__',
'pretty_version' => '1.0.0+no-version-set', 'pretty_version' => 'dev-master',
'version' => '1.0.0.0', 'version' => 'dev-master',
'reference' => NULL, 'reference' => 'd63486a4ad71ad2db8e8b98f744918ca6a15db9e',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../../', 'install_path' => __DIR__ . '/../../',
'aliases' => array(), 'aliases' => array(),
@ -11,9 +11,9 @@
), ),
'versions' => array( 'versions' => array(
'__root__' => array( '__root__' => array(
'pretty_version' => '1.0.0+no-version-set', 'pretty_version' => 'dev-master',
'version' => '1.0.0.0', 'version' => 'dev-master',
'reference' => NULL, 'reference' => 'd63486a4ad71ad2db8e8b98f744918ca6a15db9e',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../../', 'install_path' => __DIR__ . '/../../',
'aliases' => array(), 'aliases' => array(),

Loading…
Cancel
Save