From 7a26c1e0e021188ae9f5711d7bc73e44f2848078 Mon Sep 17 00:00:00 2001
From: Matthieu Guffroy <mattgu74@gmail.com>
Date: Thu, 12 Jun 2014 02:15:14 +0200
Subject: [PATCH] wip

---
 class/client.php        |  6 ++++++
 controller/personne.php | 32 ++++++++++++++++++++++++++++++++
 view/list.php           |  1 +
 3 files changed, 39 insertions(+)
 create mode 100644 controller/personne.php
 create mode 100644 view/list.php

diff --git a/class/client.php b/class/client.php
index 482e91c..192de83 100644
--- a/class/client.php
+++ b/class/client.php
@@ -13,4 +13,10 @@ class Client extends Personne
     {
         $this->numTel = $numTel;
     }
+
+    public static function getAll()
+    {
+    	// TODO return list of objects Client
+    	return Array();
+    }
 }
\ No newline at end of file
diff --git a/controller/personne.php b/controller/personne.php
new file mode 100644
index 0000000..4d7769d
--- /dev/null
+++ b/controller/personne.php
@@ -0,0 +1,32 @@
+<?php
+/*
+	Controller personne, handle CRUD for personnel and client.
+*/
+
+// Implemented actions
+$actions = array("listePersonnel", "listeClient", "addPersonnel", "addClient", "editPersonnel", "editClient");
+
+// Check action is correct
+if(!in_array($action, $actions)) {
+	$action = "listePersonnel";
+}
+
+switch($action) {
+	case "listePersonnel":
+		break;
+	case "listeClient":
+		$listArray = Client::getAll();
+		$listParams = array();
+		include 'view/list.php';
+		break;
+	case "addPersonnel":
+
+		break;
+	case "addClient":
+
+		break;
+	default:
+		include 'view/404.php';
+		break;
+}
+
diff --git a/view/list.php b/view/list.php
new file mode 100644
index 0000000..6b262e4
--- /dev/null
+++ b/view/list.php
@@ -0,0 +1 @@
+Afficher une liste ! (TODO)
\ No newline at end of file
-- 
GitLab