From cc0615214cc3b24cab27577fe70d01dedfee2a42 Mon Sep 17 00:00:00 2001
From: clement <clemmercier45@gmail.com>
Date: Wed, 18 Jun 2014 15:56:01 +0200
Subject: [PATCH] foreignfields in classes

---
 class/animal.php          | 12 ++++++------
 class/ligneOrdonnance.php | 10 +++++-----
 class/ordonnance.php      | 12 ++++++------
 class/rdv.php             | 12 ++++++------
 controller/animal.php     |  2 +-
 controller/ord.php        |  2 +-
 controller/rdv.php        |  2 +-
 7 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/class/animal.php b/class/animal.php
index c8bc629..62c9202 100644
--- a/class/animal.php
+++ b/class/animal.php
@@ -4,7 +4,7 @@ class Animal extends Objet
 {
     protected $id;
     protected $nom;
-    protected $proprio;
+    protected $client;
     protected $race;
     protected $poids;
     protected $genre;
@@ -17,7 +17,7 @@ class Animal extends Objet
         "sterile" => array(
             "t" => "BoolField"
         ),
-        "proprio" => array(
+        "client" => array(
             "t" => "ForeignField"
         ),
         "race" => array(
@@ -44,14 +44,14 @@ class Animal extends Objet
         $this->nom = $nom;
     }
 
-    public function proprio()
+    public function client()
     {
-        return $this->proprio;
+        return $this->client;
     }
     
-    public function setProprio($proprio)
+    public function setClient($client)
     {
-        $this->proprio = $proprio;
+        $this->client = $client;
     }
 
     public function race()
diff --git a/class/ligneOrdonnance.php b/class/ligneOrdonnance.php
index 668547e..a172c9a 100644
--- a/class/ligneOrdonnance.php
+++ b/class/ligneOrdonnance.php
@@ -3,7 +3,7 @@
 class LigneOrdonnance extends Objet
 {
     protected $ordonnance;
-    protected $medicament;
+    protected $produit;
     protected $quantite;
     protected $instruction;
 
@@ -17,14 +17,14 @@ class LigneOrdonnance extends Objet
         $this->ordonnance = $ordonnance;
     }
 
-    public function medicament()
+    public function produit()
     {
-        return $this->medicament;
+        return $this->produit;
     }
     
-    public function setMedicament($medicament)
+    public function setProduit($produit)
     {
-        $this->medicament = $medicament;
+        $this->produit = $produit;
     }
 
     public function quantite()
diff --git a/class/ordonnance.php b/class/ordonnance.php
index 4c2ed18..a6c7cee 100644
--- a/class/ordonnance.php
+++ b/class/ordonnance.php
@@ -3,12 +3,12 @@
 class Ordonnance extends Objet
 {
     protected $id;
-    protected $veterinaire;
+    protected $employe;
     protected $animal;
     protected $date;
     protected $prix;
     public $_specialFields = array(
-        "veterinaire" => array(
+        "employe" => array(
             "t" => "ForeignField"
         ),
         "animal" => array(
@@ -35,14 +35,14 @@ class Ordonnance extends Objet
         $this->date = $date;
     }
 
-    public function veterinaire()
+    public function employe()
     {
-        return $this->veterinaire;
+        return $this->employe;
     }
     
-    public function setVeterinaire($veterinaire)
+    public function setEmploye($employe)
     {
-        $this->veterinaire = $veterinaire;
+        $this->employe = $employe;
     }
 
     public function animal()
diff --git a/class/rdv.php b/class/rdv.php
index f3e2f98..ccb9095 100644
--- a/class/rdv.php
+++ b/class/rdv.php
@@ -3,12 +3,12 @@
 class Rdv extends Objet
 {
     protected $id;
-    protected $veterinaire;
+    protected $employe;
     protected $animal;
     protected $date;
     protected $duree;
     public $_specialFields = array(
-        "veterinaire" => array(
+        "employe" => array(
             "t" => "ForeignField"
         ),
         "animal" => array(
@@ -27,14 +27,14 @@ class Rdv extends Objet
     }
 
     
-    public function veterinaire()
+    public function employe()
     {
-        return $this->veterinaire;
+        return $this->employe;
     }
     
-    public function setVeterinaire($veterinaire)
+    public function setEmploye($employe)
     {
-        $this->veterinaire = $veterinaire;
+        $this->employe = $employe;
     }
 
     public function animal()
diff --git a/controller/animal.php b/controller/animal.php
index fbf6d18..79bb236 100644
--- a/controller/animal.php
+++ b/controller/animal.php
@@ -15,7 +15,7 @@ switch($action) {
 	case "listeAnimal":
 		$listArray = Animal::getAll();
 		$listParams = array("title" => "Liste des animaux de la clinique",
-							"keys" => array("id", "nom", "proprio", "race", "poids", "genre", "sterile", "date_naissance", "date_deces", "taille", "code"));
+							"keys" => array("id", "nom", "client", "race", "poids", "genre", "sterile", "date_naissance", "date_deces", "taille", "code"));
 		$editLink = "editAnimal";
 		include 'view/list.php';
 		break;
diff --git a/controller/ord.php b/controller/ord.php
index 1ffe63f..e77dcdd 100644
--- a/controller/ord.php
+++ b/controller/ord.php
@@ -15,7 +15,7 @@ switch($action) {
 	case "liste":
 		$listArray = Ordonnance::getAll();
 		$listParams = array("title" => "Liste des ordonnances",
-							"keys" => array("id", "animal", "veterinaire", "date", "prix"));
+							"keys" => array("id", "animal", "employe", "date", "prix"));
 		$editLink = "edit";
 		include 'view/list.php';
 		break;
diff --git a/controller/rdv.php b/controller/rdv.php
index 0b86097..63e761e 100644
--- a/controller/rdv.php
+++ b/controller/rdv.php
@@ -15,7 +15,7 @@ switch($action) {
 	case "liste":
 		$listArray = Rdv::getAll();
 		$listParams = array("title" => "Liste des rendez-vous",
-							"keys" => array("id", "animal", "veterinaire", "date", "duree"));
+							"keys" => array("id", "animal", "employe", "date", "duree"));
 		$editLink = "edit";
 		include 'view/list.php';
 		break;
-- 
GitLab