From 374c33f787f6be1e326cef4f436db7e69e536a1f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lo=C3=AFc?= <tardieuloc@yahoo.fr>
Date: Wed, 4 Mar 2020 09:29:08 +0100
Subject: [PATCH] =?UTF-8?q?Suppression=20de=20probl=C3=A8mes=20et=20de=20r?=
 =?UTF-8?q?edondances=20dans=20l'index=20+=20D=C3=A9but=20de=20la=20vue=20?=
 =?UTF-8?q?de=20l'accueil?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 tp1/composer.lock       | 10 +++++-----
 tp1/index.php           | 26 ++------------------------
 tp1/src/vue/HomeVue.php | 25 +++++++++++++++++++++++++
 3 files changed, 32 insertions(+), 29 deletions(-)
 create mode 100644 tp1/src/vue/HomeVue.php

diff --git a/tp1/composer.lock b/tp1/composer.lock
index fb32955..855b192 100644
--- a/tp1/composer.lock
+++ b/tp1/composer.lock
@@ -541,16 +541,16 @@
         },
         {
             "name": "symfony/translation",
-            "version": "v4.4.4",
+            "version": "v4.4.5",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/translation.git",
-                "reference": "f5d2ac46930238b30a9c2f1b17c905f3697d808c"
+                "reference": "0a19a77fba20818a969ef03fdaf1602de0546353"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/translation/zipball/f5d2ac46930238b30a9c2f1b17c905f3697d808c",
-                "reference": "f5d2ac46930238b30a9c2f1b17c905f3697d808c",
+                "url": "https://api.github.com/repos/symfony/translation/zipball/0a19a77fba20818a969ef03fdaf1602de0546353",
+                "reference": "0a19a77fba20818a969ef03fdaf1602de0546353",
                 "shasum": ""
             },
             "require": {
@@ -613,7 +613,7 @@
             ],
             "description": "Symfony Translation Component",
             "homepage": "https://symfony.com",
-            "time": "2020-01-15T13:29:06+00:00"
+            "time": "2020-02-04T09:32:40+00:00"
         },
         {
             "name": "symfony/translation-contracts",
diff --git a/tp1/index.php b/tp1/index.php
index 952d93b..efa19c3 100644
--- a/tp1/index.php
+++ b/tp1/index.php
@@ -1,35 +1,13 @@
 <?php
 
-require_once '../vendor/autoload.php';
+require_once __DIR__ . '/vendor/autoload.php';
 
 use bdd\controleur\ControleurRequete;
 use Illuminate\Database\Capsule\Manager as DB;
 $db = new DB();
-//SI CA NE FONCTIONNE PAS, ENLEVER LES COMMENTAIRES : CES INFOS SONT DEJA DANS LE CONF.INI
-//LA LIGNE DU PASSWORD NE DEVRAIT PAS ETRE NECESSAIRE CAR NOUS NOUS CONNECTONS AVEC ROOT, SINON, LA METTRE QUAND MEME
-/*$db->addConnection( [
-	'driver' => 'mysql',
-	'host' => 'localhost',
-	'database' => 'gamepedia',
-	'username' => 'user',
-	//'password' => 'password',
-	'charset' => 'utf8',
-	'collation' => 'utf8_unicode_ci',
-	'prefix' => ''
-] );*/
 
 // ajout des informations pour se connecter à la base de données
-$ini_file = parse_ini_file('../conf/conf.ini');
-$db->addConnection([
-    'driver'    => $ini_file['driver'],
-    'host'      => $ini_file['host'],
-    'database'  => $ini_file['database'],
-    'username'  => $ini_file['username'],
-    'password'  => $ini_file['password'],
-    'charset'   => $ini_file['charset'],
-    'collation' => $ini_file['charset'] . '_unicode_ci',
-    'prefix'    => ''
-]);
+$ini_file = parse_ini_file('conf/conf.ini');
 
 $db->setAsGlobal();
 $db->bootEloquent();
diff --git a/tp1/src/vue/HomeVue.php b/tp1/src/vue/HomeVue.php
new file mode 100644
index 0000000..58b3698
--- /dev/null
+++ b/tp1/src/vue/HomeVue.php
@@ -0,0 +1,25 @@
+<?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
-- 
GitLab