159 |
jpm |
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
2 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
|
3 |
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
|
4 |
<head>
|
|
|
5 |
<!-- template designed by Marco Von Ballmoos -->
|
|
|
6 |
<title>Docs For Class Modele</title>
|
|
|
7 |
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'/>
|
|
|
8 |
<link rel="stylesheet" href="../media/stylesheet.css" />
|
|
|
9 |
<script src="../media/lib/classTree.js"></script>
|
|
|
10 |
<script language="javascript" type="text/javascript">
|
|
|
11 |
var imgPlus = new Image();
|
|
|
12 |
var imgMinus = new Image();
|
|
|
13 |
imgPlus.src = "../media/images/plus.png";
|
|
|
14 |
imgMinus.src = "../media/images/minus.png";
|
|
|
15 |
|
|
|
16 |
function showNode(Node){
|
|
|
17 |
switch(navigator.family){
|
|
|
18 |
case 'nn4':
|
|
|
19 |
// Nav 4.x code fork...
|
|
|
20 |
var oTable = document.layers["span" + Node];
|
|
|
21 |
var oImg = document.layers["img" + Node];
|
|
|
22 |
break;
|
|
|
23 |
case 'ie4':
|
|
|
24 |
// IE 4/5 code fork...
|
|
|
25 |
var oTable = document.all["span" + Node];
|
|
|
26 |
var oImg = document.all["img" + Node];
|
|
|
27 |
break;
|
|
|
28 |
case 'gecko':
|
|
|
29 |
// Standards Compliant code fork...
|
|
|
30 |
var oTable = document.getElementById("span" + Node);
|
|
|
31 |
var oImg = document.getElementById("img" + Node);
|
|
|
32 |
break;
|
|
|
33 |
}
|
|
|
34 |
oImg.src = imgMinus.src;
|
|
|
35 |
oTable.style.display = "block";
|
|
|
36 |
}
|
|
|
37 |
|
|
|
38 |
function hideNode(Node){
|
|
|
39 |
switch(navigator.family){
|
|
|
40 |
case 'nn4':
|
|
|
41 |
// Nav 4.x code fork...
|
|
|
42 |
var oTable = document.layers["span" + Node];
|
|
|
43 |
var oImg = document.layers["img" + Node];
|
|
|
44 |
break;
|
|
|
45 |
case 'ie4':
|
|
|
46 |
// IE 4/5 code fork...
|
|
|
47 |
var oTable = document.all["span" + Node];
|
|
|
48 |
var oImg = document.all["img" + Node];
|
|
|
49 |
break;
|
|
|
50 |
case 'gecko':
|
|
|
51 |
// Standards Compliant code fork...
|
|
|
52 |
var oTable = document.getElementById("span" + Node);
|
|
|
53 |
var oImg = document.getElementById("img" + Node);
|
|
|
54 |
break;
|
|
|
55 |
}
|
|
|
56 |
oImg.src = imgPlus.src;
|
|
|
57 |
oTable.style.display = "none";
|
|
|
58 |
}
|
|
|
59 |
|
|
|
60 |
function nodeIsVisible(Node){
|
|
|
61 |
switch(navigator.family){
|
|
|
62 |
case 'nn4':
|
|
|
63 |
// Nav 4.x code fork...
|
|
|
64 |
var oTable = document.layers["span" + Node];
|
|
|
65 |
break;
|
|
|
66 |
case 'ie4':
|
|
|
67 |
// IE 4/5 code fork...
|
|
|
68 |
var oTable = document.all["span" + Node];
|
|
|
69 |
break;
|
|
|
70 |
case 'gecko':
|
|
|
71 |
// Standards Compliant code fork...
|
|
|
72 |
var oTable = document.getElementById("span" + Node);
|
|
|
73 |
break;
|
|
|
74 |
}
|
|
|
75 |
return (oTable && oTable.style.display == "block");
|
|
|
76 |
}
|
|
|
77 |
|
|
|
78 |
function toggleNodeVisibility(Node){
|
|
|
79 |
if (nodeIsVisible(Node)){
|
|
|
80 |
hideNode(Node);
|
|
|
81 |
}else{
|
|
|
82 |
showNode(Node);
|
|
|
83 |
}
|
|
|
84 |
}
|
|
|
85 |
</script>
|
|
|
86 |
</head>
|
|
|
87 |
<body>
|
|
|
88 |
<div class="page-body">
|
|
|
89 |
<h2 class="class-name">Class Modele</h2>
|
|
|
90 |
|
|
|
91 |
<a name="sec-description"></a>
|
|
|
92 |
<div class="info-box">
|
|
|
93 |
<div class="info-box-title">Description</div>
|
|
|
94 |
<div class="nav-bar">
|
|
|
95 |
<span class="disabled">Description</span> |
|
|
|
96 |
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
|
|
97 |
|
|
|
98 |
</div>
|
|
|
99 |
<div class="info-box-body">
|
|
|
100 |
<!-- ========== Info from phpDoc block ========= -->
|
|
|
101 |
<p class="short-description">Classe modèle, donc d'accés au données, elle ne devrait pas être appelée de l'extérieur.</p>
|
|
|
102 |
<p class="description"><p>Elle fait office d'abstraction légère de base de données en utilisant diveres possibilités d'abstraction de base de données (PDO, mysql, mysqli, sqlite) Elle est abstraite donc doit obligatoirement être étendue.</p><p>PHP Version 5</p></p>
|
|
|
103 |
<ul class="tags">
|
|
|
104 |
<li><span class="field">author:</span> aurelien <<a href="mailto:aurelien@tela-botanica.org">aurelien@tela-botanica.org</a>></li>
|
|
|
105 |
<li><span class="field">version:</span> SVN: $$Id: Modele.php 145 2010-03-02 17:23:09Z jpm $$</li>
|
|
|
106 |
<li><span class="field">copyright:</span> 2009 Tela-Botanica</li>
|
|
|
107 |
<li><span class="field">link:</span> /doc/framework/</li>
|
|
|
108 |
<li><span class="field">abstract:</span> </li>
|
|
|
109 |
<li><span class="field">license:</span> <a href="http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt">Licence CECILL</a></li>
|
|
|
110 |
<li><span class="field">license:</span> <a href="http://www.gnu.org/licenses/gpl.html">Licence GNU-GPL</a></li>
|
|
|
111 |
</ul>
|
|
|
112 |
<p class="notes">
|
|
|
113 |
Located in <a class="field" href="_Modele.php.html">/Modele.php</a> (line <span class="field"><a href="../__filesource/fsource_Framework__Modele.php.html#a21">21</a></span>)
|
|
|
114 |
</p>
|
|
|
115 |
|
|
|
116 |
|
|
|
117 |
<pre></pre>
|
|
|
118 |
|
|
|
119 |
</div>
|
|
|
120 |
</div>
|
|
|
121 |
|
|
|
122 |
|
|
|
123 |
|
|
|
124 |
|
|
|
125 |
<a name="sec-method-summary"></a>
|
|
|
126 |
<div class="info-box">
|
|
|
127 |
<div class="info-box-title">Method Summary</span></div>
|
|
|
128 |
<div class="nav-bar">
|
|
|
129 |
<a href="#sec-description">Description</a> |
|
|
|
130 |
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
|
|
|
131 |
</div>
|
|
|
132 |
<div class="info-box-body">
|
|
|
133 |
<div class="method-summary">
|
|
|
134 |
|
|
|
135 |
<div class="method-definition">
|
|
|
136 |
<span class="method-result">Modele</span>
|
|
|
137 |
<a href="#__construct" title="details" class="method-name">__construct</a>
|
|
|
138 |
()
|
|
|
139 |
</div>
|
|
|
140 |
|
|
|
141 |
<div class="method-definition">
|
|
|
142 |
<span class="method-result">void</span>
|
|
|
143 |
<a href="#__destruct" title="details" class="method-name">__destruct</a>
|
|
|
144 |
()
|
|
|
145 |
</div>
|
|
|
146 |
|
|
|
147 |
<div class="method-definition">
|
|
|
148 |
<span class="method-result">void</span>
|
|
|
149 |
<a href="#initialiserProtocole" title="details" class="method-name">initialiserProtocole</a>
|
|
|
150 |
()
|
|
|
151 |
</div>
|
|
|
152 |
|
|
|
153 |
<div class="method-definition">
|
|
|
154 |
<span class="method-result">void</span>
|
|
|
155 |
<a href="#proteger" title="details" class="method-name">proteger</a>
|
|
|
156 |
(<span class="var-type"></span> <span class="var-name">$chaine</span>)
|
|
|
157 |
</div>
|
|
|
158 |
|
|
|
159 |
<div class="method-definition">
|
|
|
160 |
<span class="method-result">PDOStatement</span>
|
|
|
161 |
<a href="#requete" title="details" class="method-name">requete</a>
|
|
|
162 |
(<span class="var-type">string</span> <span class="var-name">$requete</span>)
|
|
|
163 |
</div>
|
|
|
164 |
|
|
|
165 |
<div class="method-definition">
|
|
|
166 |
<span class="method-result">void</span>
|
|
|
167 |
<a href="#requeteTous" title="details" class="method-name">requeteTous</a>
|
|
|
168 |
(<span class="var-type"></span> <span class="var-name">$requete</span>, [<span class="var-type"></span> <span class="var-name">$mode</span> = <span class="var-default">'ASSOC'</span>])
|
|
|
169 |
</div>
|
|
|
170 |
|
|
|
171 |
<div class="method-definition">
|
|
|
172 |
<span class="method-result">void</span>
|
|
|
173 |
<a href="#requeteUn" title="details" class="method-name">requeteUn</a>
|
|
|
174 |
(<span class="var-type"></span> <span class="var-name">$requete</span>, [<span class="var-type"></span> <span class="var-name">$mode</span> = <span class="var-default">'ASSOC'</span>])
|
|
|
175 |
</div>
|
|
|
176 |
</div>
|
|
|
177 |
</div>
|
|
|
178 |
</div>
|
|
|
179 |
|
|
|
180 |
|
|
|
181 |
<a name="sec-methods"></a>
|
|
|
182 |
<div class="info-box">
|
|
|
183 |
<div class="info-box-title">Methods</div>
|
|
|
184 |
<div class="nav-bar">
|
|
|
185 |
<a href="#sec-description">Description</a> |
|
|
|
186 |
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
|
|
|
187 |
|
|
|
188 |
</div>
|
|
|
189 |
<div class="info-box-body">
|
|
|
190 |
<A NAME='method_detail'></A>
|
|
|
191 |
<a name="method__construct" id="__construct"><!-- --></a>
|
|
|
192 |
<div class="oddrow">
|
|
|
193 |
|
|
|
194 |
<div class="method-header">
|
|
|
195 |
<span class="method-title">Constructor __construct</span> (line <span class="line-number"><a href="../__filesource/fsource_Framework__Modele.php.html#a77">77</a></span>)
|
|
|
196 |
</div>
|
|
|
197 |
|
|
|
198 |
<!-- ========== Info from phpDoc block ========= -->
|
|
|
199 |
<p class="short-description">Constructeur par défaut, appelé à l'initialisation.</p>
|
|
|
200 |
<ul class="tags">
|
|
|
201 |
<li><span class="field">access:</span> public</li>
|
|
|
202 |
</ul>
|
|
|
203 |
|
|
|
204 |
<div class="method-signature">
|
|
|
205 |
<span class="method-result">Modele</span>
|
|
|
206 |
<span class="method-name">
|
|
|
207 |
__construct
|
|
|
208 |
</span>
|
|
|
209 |
()
|
|
|
210 |
</div>
|
|
|
211 |
|
|
|
212 |
|
|
|
213 |
|
|
|
214 |
</div>
|
|
|
215 |
<a name="method__destruct" id="__destruct"><!-- --></a>
|
|
|
216 |
<div class="evenrow">
|
|
|
217 |
|
|
|
218 |
<div class="method-header">
|
|
|
219 |
<span class="method-title">Destructor __destruct</span> (line <span class="line-number"><a href="../__filesource/fsource_Framework__Modele.php.html#a323">323</a></span>)
|
|
|
220 |
</div>
|
|
|
221 |
|
|
|
222 |
<!-- ========== Info from phpDoc block ========= -->
|
|
|
223 |
<p class="short-description">Destructeur de classe, se contente de fermer explicitement la connexion</p>
|
|
|
224 |
<ul class="tags">
|
|
|
225 |
<li><span class="field">access:</span> public</li>
|
|
|
226 |
</ul>
|
|
|
227 |
|
|
|
228 |
<div class="method-signature">
|
|
|
229 |
<span class="method-result">void</span>
|
|
|
230 |
<span class="method-name">
|
|
|
231 |
__destruct
|
|
|
232 |
</span>
|
|
|
233 |
()
|
|
|
234 |
</div>
|
|
|
235 |
|
|
|
236 |
|
|
|
237 |
|
|
|
238 |
</div>
|
|
|
239 |
<a name="methodinitialiserProtocole" id="initialiserProtocole"><!-- --></a>
|
|
|
240 |
<div class="oddrow">
|
|
|
241 |
|
|
|
242 |
<div class="method-header">
|
|
|
243 |
<span class="method-title">initialiserProtocole</span> (line <span class="line-number"><a href="../__filesource/fsource_Framework__Modele.php.html#a295">295</a></span>)
|
|
|
244 |
</div>
|
|
|
245 |
|
|
|
246 |
<!-- ========== Info from phpDoc block ========= -->
|
|
|
247 |
<p class="short-description">initialise les constantes de classe à leur bonne valeur</p>
|
|
|
248 |
<p class="description"><p>et lance une exception si le protocole n'est pas bien défini</p></p>
|
|
|
249 |
<ul class="tags">
|
|
|
250 |
<li><span class="field">throws:</span> Exception</li>
|
|
|
251 |
<li><span class="field">access:</span> public</li>
|
|
|
252 |
</ul>
|
|
|
253 |
|
|
|
254 |
<div class="method-signature">
|
|
|
255 |
<span class="method-result">void</span>
|
|
|
256 |
<span class="method-name">
|
|
|
257 |
initialiserProtocole
|
|
|
258 |
</span>
|
|
|
259 |
()
|
|
|
260 |
</div>
|
|
|
261 |
|
|
|
262 |
|
|
|
263 |
|
|
|
264 |
</div>
|
|
|
265 |
<a name="methodproteger" id="proteger"><!-- --></a>
|
|
|
266 |
<div class="evenrow">
|
|
|
267 |
|
|
|
268 |
<div class="method-header">
|
|
|
269 |
<span class="method-title">proteger</span> (line <span class="line-number"><a href="../__filesource/fsource_Framework__Modele.php.html#a263">263</a></span>)
|
|
|
270 |
</div>
|
|
|
271 |
|
|
|
272 |
<!-- ========== Info from phpDoc block ========= -->
|
|
|
273 |
<p class="short-description">protège une chaine de caractères avant l'insertion dans la base de données</p>
|
|
|
274 |
<ul class="tags">
|
|
|
275 |
<li><span class="field">access:</span> protected</li>
|
|
|
276 |
</ul>
|
|
|
277 |
|
|
|
278 |
<div class="method-signature">
|
|
|
279 |
<span class="method-result">void</span>
|
|
|
280 |
<span class="method-name">
|
|
|
281 |
proteger
|
|
|
282 |
</span>
|
|
|
283 |
(<span class="var-type"></span> <span class="var-name">$chaine</span>)
|
|
|
284 |
</div>
|
|
|
285 |
|
|
|
286 |
<ul class="parameters">
|
|
|
287 |
<li>
|
|
|
288 |
<span class="var-type"></span>
|
|
|
289 |
<span class="var-name">$chaine</span> </li>
|
|
|
290 |
</ul>
|
|
|
291 |
|
|
|
292 |
|
|
|
293 |
</div>
|
|
|
294 |
<a name="methodrequete" id="requete"><!-- --></a>
|
|
|
295 |
<div class="oddrow">
|
|
|
296 |
|
|
|
297 |
<div class="method-header">
|
|
|
298 |
<span class="method-title">requete</span> (line <span class="line-number"><a href="../__filesource/fsource_Framework__Modele.php.html#a146">146</a></span>)
|
|
|
299 |
</div>
|
|
|
300 |
|
|
|
301 |
<!-- ========== Info from phpDoc block ========= -->
|
|
|
302 |
<p class="short-description">Fonction qui appelle la bonne fonction pour executer une requête suivant le type de bdd.</p>
|
|
|
303 |
<ul class="tags">
|
|
|
304 |
<li><span class="field">return:</span> un objet contenant le résultat de la requête</li>
|
|
|
305 |
<li><span class="field">access:</span> protected</li>
|
|
|
306 |
</ul>
|
|
|
307 |
|
|
|
308 |
<div class="method-signature">
|
|
|
309 |
<span class="method-result">PDOStatement</span>
|
|
|
310 |
<span class="method-name">
|
|
|
311 |
requete
|
|
|
312 |
</span>
|
|
|
313 |
(<span class="var-type">string</span> <span class="var-name">$requete</span>)
|
|
|
314 |
</div>
|
|
|
315 |
|
|
|
316 |
<ul class="parameters">
|
|
|
317 |
<li>
|
|
|
318 |
<span class="var-type">string</span>
|
|
|
319 |
<span class="var-name">$requete</span><span class="var-description">: la requete à effectuer</span> </li>
|
|
|
320 |
</ul>
|
|
|
321 |
|
|
|
322 |
|
|
|
323 |
</div>
|
|
|
324 |
<a name="methodrequeteTous" id="requeteTous"><!-- --></a>
|
|
|
325 |
<div class="evenrow">
|
|
|
326 |
|
|
|
327 |
<div class="method-header">
|
|
|
328 |
<span class="method-title">requeteTous</span> (line <span class="line-number"><a href="../__filesource/fsource_Framework__Modele.php.html#a203">203</a></span>)
|
|
|
329 |
</div>
|
|
|
330 |
|
|
|
331 |
<!-- ========== Info from phpDoc block ========= -->
|
|
|
332 |
<ul class="tags">
|
|
|
333 |
<li><span class="field">access:</span> protected</li>
|
|
|
334 |
</ul>
|
|
|
335 |
|
|
|
336 |
<div class="method-signature">
|
|
|
337 |
<span class="method-result">void</span>
|
|
|
338 |
<span class="method-name">
|
|
|
339 |
requeteTous
|
|
|
340 |
</span>
|
|
|
341 |
(<span class="var-type"></span> <span class="var-name">$requete</span>, [<span class="var-type"></span> <span class="var-name">$mode</span> = <span class="var-default">'ASSOC'</span>])
|
|
|
342 |
</div>
|
|
|
343 |
|
|
|
344 |
<ul class="parameters">
|
|
|
345 |
<li>
|
|
|
346 |
<span class="var-type"></span>
|
|
|
347 |
<span class="var-name">$requete</span> </li>
|
|
|
348 |
<li>
|
|
|
349 |
<span class="var-type"></span>
|
|
|
350 |
<span class="var-name">$mode</span> </li>
|
|
|
351 |
</ul>
|
|
|
352 |
|
|
|
353 |
|
|
|
354 |
</div>
|
|
|
355 |
<a name="methodrequeteUn" id="requeteUn"><!-- --></a>
|
|
|
356 |
<div class="oddrow">
|
|
|
357 |
|
|
|
358 |
<div class="method-header">
|
|
|
359 |
<span class="method-title">requeteUn</span> (line <span class="line-number"><a href="../__filesource/fsource_Framework__Modele.php.html#a172">172</a></span>)
|
|
|
360 |
</div>
|
|
|
361 |
|
|
|
362 |
<!-- ========== Info from phpDoc block ========= -->
|
|
|
363 |
<ul class="tags">
|
|
|
364 |
<li><span class="field">access:</span> protected</li>
|
|
|
365 |
</ul>
|
|
|
366 |
|
|
|
367 |
<div class="method-signature">
|
|
|
368 |
<span class="method-result">void</span>
|
|
|
369 |
<span class="method-name">
|
|
|
370 |
requeteUn
|
|
|
371 |
</span>
|
|
|
372 |
(<span class="var-type"></span> <span class="var-name">$requete</span>, [<span class="var-type"></span> <span class="var-name">$mode</span> = <span class="var-default">'ASSOC'</span>])
|
|
|
373 |
</div>
|
|
|
374 |
|
|
|
375 |
<ul class="parameters">
|
|
|
376 |
<li>
|
|
|
377 |
<span class="var-type"></span>
|
|
|
378 |
<span class="var-name">$requete</span> </li>
|
|
|
379 |
<li>
|
|
|
380 |
<span class="var-type"></span>
|
|
|
381 |
<span class="var-name">$mode</span> </li>
|
|
|
382 |
</ul>
|
|
|
383 |
|
|
|
384 |
|
|
|
385 |
</div>
|
|
|
386 |
|
|
|
387 |
</div>
|
|
|
388 |
</div>
|
|
|
389 |
|
|
|
390 |
|
|
|
391 |
<p class="notes" id="credit">
|
|
|
392 |
Documentation generated on Thu, 04 Mar 2010 19:27:25 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
|
|
393 |
</p>
|
|
|
394 |
</div></body>
|
|
|
395 |
</html>
|