10 |
jpm |
1 |
<?php
|
170 |
mathias |
2 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
3 |
// | PHP version 5.1.1 |
|
|
|
4 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
5 |
// | Copyright (C) 2006 Tela Botanica (accueil@tela-botanica.org) |
|
|
|
6 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
7 |
// | This file is part of eFlore. |
|
|
|
8 |
// | |
|
|
|
9 |
// | Foobar is free software; you can redistribute it and/or modify |
|
|
|
10 |
// | it under the terms of the GNU General Public License as published by |
|
|
|
11 |
// | the Free Software Foundation; either version 2 of the License, or |
|
|
|
12 |
// | (at your option) any later version. |
|
|
|
13 |
// | |
|
|
|
14 |
// | Foobar is distributed in the hope that it will be useful, |
|
|
|
15 |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
|
|
16 |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
|
|
17 |
// | GNU General Public License for more details. |
|
|
|
18 |
// | |
|
|
|
19 |
// | You should have received a copy of the GNU General Public License |
|
|
|
20 |
// | along with Foobar; if not, write to the Free Software |
|
|
|
21 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
|
|
22 |
// +------------------------------------------------------------------------------------------------------+
|
10 |
jpm |
23 |
// CVS : $Id$
|
170 |
mathias |
24 |
/**
|
10 |
jpm |
25 |
* Classe FraisKmTaux
|
170 |
mathias |
26 |
*
|
|
|
27 |
* Description
|
|
|
28 |
*
|
|
|
29 |
*@package eFlore
|
|
|
30 |
*@subpackage modele
|
|
|
31 |
//Auteur original :
|
|
|
32 |
*@version 3
|
|
|
33 |
*@author Shaheen ABDOOL RAHEEM <shaheenar50@hotmail.com>
|
|
|
34 |
//Autres auteurs :
|
|
|
35 |
*@version 4
|
|
|
36 |
*@author Jean-Pascal MILCENT <jpm@clapas.org>
|
|
|
37 |
*@author aucun
|
|
|
38 |
*@copyright Tela-Botanica 2000-2006
|
10 |
jpm |
39 |
*@version $Revision$ $Date$
|
170 |
mathias |
40 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
41 |
*/
|
|
|
42 |
|
|
|
43 |
/**
|
|
|
44 |
* class FraisKmTaux : est à la fois le DAO et le conteneur de la table gestion_utilisateur.
|
|
|
45 |
* classe métier
|
|
|
46 |
*/
|
|
|
47 |
class FraisKmTaux extends aGttSql {
|
|
|
48 |
/*** Constantes : */
|
|
|
49 |
const GFKT_ID = 'FRAISKMTAUX_ID';
|
|
|
50 |
const GFKT_ID_MAX = 'FRAISKMTAUX_ID_MAX';
|
|
|
51 |
|
|
|
52 |
/*** Attributs : */
|
|
|
53 |
private $id_frais_km_taux;
|
|
|
54 |
private $taux;
|
|
|
55 |
|
|
|
56 |
/*** Aggregations : */
|
|
|
57 |
|
|
|
58 |
/*** Constructeur : */
|
|
|
59 |
public function __construct($cmd = null, $parametres = null)
|
|
|
60 |
{
|
|
|
61 |
$this->dao_table_nom = GTT_BDD_PREFIXE . 'gestion_frais_km_taux';
|
|
|
62 |
$this->dao_correspondance = array(
|
10 |
jpm |
63 |
'gfkt_id_frais_km_taux' => 'id_frais_km_taux',
|
|
|
64 |
'gfkt_taux' => 'taux');
|
170 |
mathias |
65 |
|
|
|
66 |
// Si l'on veut remplir l'objet à la création on lance la requete correspondante
|
|
|
67 |
if (!is_null($cmd)) {
|
|
|
68 |
$this->consulter($cmd, $parametres, true);
|
|
|
69 |
}
|
|
|
70 |
}
|
|
|
71 |
|
|
|
72 |
/*** Accesseurs : */
|
10 |
jpm |
73 |
// Id Frais Km Taux
|
170 |
mathias |
74 |
public function getIdFraisKmTaux()
|
|
|
75 |
{
|
|
|
76 |
return $this->id_frais_km_taux;
|
|
|
77 |
}
|
|
|
78 |
public function setIdFraisKmTaux( $ifkt )
|
|
|
79 |
{
|
|
|
80 |
$this->id_frais_km_taux = $ifkt;
|
|
|
81 |
}
|
|
|
82 |
|
10 |
jpm |
83 |
// Taux
|
170 |
mathias |
84 |
public function getTaux()
|
|
|
85 |
{
|
|
|
86 |
return $this->taux;
|
|
|
87 |
}
|
|
|
88 |
public function setTaux( $t )
|
|
|
89 |
{
|
|
|
90 |
$this->taux = $t;
|
|
|
91 |
}
|
|
|
92 |
|
|
|
93 |
/*** Méthodes : */
|
|
|
94 |
|
|
|
95 |
/**
|
|
|
96 |
* Consulter la table gestion_frais_km_taux.
|
|
|
97 |
* @return mixed un tableau d'objets FraisKmTaux s'il y en a plusieurs, l'objet FraisKmTaux s'il y en a 1 seul sinon false.
|
|
|
98 |
*/
|
|
|
99 |
public function consulter($cmd = '', $parametres = array(), $instancier = false)
|
|
|
100 |
{
|
|
|
101 |
switch ($cmd) {
|
|
|
102 |
case FraisKmTaux::GFKT_ID:
|
|
|
103 |
$requete = 'SELECT * '.
|
|
|
104 |
'FROM ' . GTT_BDD_PREFIXE . 'gestion_frais_km_taux '.
|
|
|
105 |
'WHERE gfkt_id_frais_km_taux = #0 ';
|
|
|
106 |
break;
|
|
|
107 |
case FraisKmTaux::GFKT_ID_MAX:
|
|
|
108 |
$requete = 'SELECT MAX(gfkt_id_frais_km_taux) '.
|
|
|
109 |
'FROM ' . GTT_BDD_PREFIXE . 'gestion_frais_km_taux ';
|
|
|
110 |
break;
|
|
|
111 |
default :
|
|
|
112 |
$message = 'Commande '.$cmd.'inconnue!';
|
|
|
113 |
$e = GestionnaireErreur::formaterMessageErreur(__FILE__, __LINE__, $message);
|
|
|
114 |
trigger_error($e, E_USER_ERROR);
|
|
|
115 |
}
|
|
|
116 |
return parent::consulter($requete, $parametres, $instancier);
|
|
|
117 |
}
|
|
|
118 |
}
|
|
|
119 |
|
|
|
120 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
|
|
121 |
*
|
10 |
jpm |
122 |
* $Log$
|
170 |
mathias |
123 |
*
|
|
|
124 |
* +-- Fin du code ----------------------------------------------------------------------------------------+
|
|
|
125 |
*/
|
10 |
jpm |
126 |
?>
|