- Added namespace support finaly :-)
[activemongo.git] / tests / coverage / lib_plugin_Cache_Cache.php.html
blob0aed651a916a7a09f4ae6c68e5fdd7bd250f7fed
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
3 <html lang="en">
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
6 <title>ActiveMongo Tests</title>
7 <link rel="stylesheet" type="text/css" href="style.css">
8 <link rel="stylesheet" type="text/css" href="container.css">
9 <script type="text/javascript" src="yahoo-dom-event.js"></script>
10 <script type="text/javascript" src="container-min.js"></script>
11 </head>
13 <body class="yui-skin-sam">
14 <table width="100%" border="0" cellspacing="0" cellpadding="0">
15 <tr><td class="title">ActiveMongo Tests</td></tr>
16 <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
18 <tr>
19 <td width="100%">
20 <table cellpadding="1" border="0" width="100%">
21 <tr>
22 <td class="headerItem" width="20%">Current file:</td>
23 <td class="headerValue" width="80%"><a href="index.html">/home/crodas/projects/playground/ActiveMongo</a>/<a href="lib.html">lib</a>/<a href="lib_plugin.html">plugin</a>/<a href="lib_plugin_Cache.html">Cache</a>/<a href="lib_plugin_Cache_Cache.php.html">Cache.php</a></td>
24 </tr>
25 <tr>
26 <td class="legendItem" width="20%">Legend:</td>
27 <td class="legendValue" width="80%">
28 <span class="legendCov">executed</span>
29 <span class="legendNoCov">not executed</span>
30 <span class="legendDeadCode">dead code</span>
31 </td>
32 </tr>
33 </table>
34 </td>
35 </tr>
37 <tr>
38 <td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td>
39 </tr>
40 </table>
42 <br />
44 <center>
45 <table width="90%" cellpadding="2" cellspacing="1" border="0">
46 <tr>
47 <td class="tableHead" width="30%">&nbsp;</td>
48 <td class="tableHead" colspan="9">Coverage</td>
49 </tr>
50 <tr>
51 <td class="tableHead">&nbsp;</td>
52 <td class="tableHead" colspan="3">Classes</td>
53 <td class="tableHead" colspan="3">Functions / Methods</td>
54 <td class="tableHead" colspan="3">Lines</td>
55 </tr>
56 <tr>
57 <td class="coverItem">Total</td>
58 <td class="coverBar" align="center" width="100">
59 <table border="0" cellspacing="0" cellpadding="1">
60 <tr>
61 <td class="coverBarOutline"><img src="scarlet_red.png" width="0" height="10" alt="0.00%"><img src="snow.png" width="100" height="10" alt="0.00%"></td>
62 </tr>
63 </table>
64 </td>
65 <td class="coverPerLo">0.00%</td>
66 <td class="coverNumLo">0 / 3</td>
67 <td class="coverBar" align="center" width="100">
68 <table border="0" cellspacing="0" cellpadding="1">
69 <tr>
70 <td class="coverBarOutline"><img src="butter.png" width="58" height="10" alt="58.06%"><img src="snow.png" width="42" height="10" alt="58.06%"></td>
71 </tr>
72 </table>
73 </td>
74 <td class="coverPerMed">58.06%</td>
75 <td class="coverNumMed">18 / 31</td>
76 <td class="coverBar" align="center" width="100">
77 <table border="0" cellspacing="0" cellpadding="1">
78 <tr>
79 <td class="coverBarOutline"><img src="chameleon.png" width="85" height="10" alt="85.90%"><img src="snow.png" width="15" height="10" alt="85.90%"></td>
80 </tr>
81 </table>
82 </td>
83 <td class="coverPerHi">85.90%</td>
84 <td class="coverNumHi">134 / 156</td>
85 </tr>
87 <tr>
88 <td class="tableHead" colspan="10">&nbsp;</td>
89 </tr>
90 <tr>
91 <td class="coverItem"><b><a href="#55">CacheCursor</a></b></td>
92 <td class="coverBar" align="center" width="100">
93 <table border="0" cellspacing="0" cellpadding="1">
94 <tr>
95 <td class="coverBarOutline"><img src="scarlet_red.png" width="0" height="10" alt="0.00%"><img src="snow.png" width="100" height="10" alt="0.00%"></td>
96 </tr>
97 </table>
98 </td>
99 <td class="coverPerLo">0.00%</td>
100 <td class="coverNumLo">0 / 1</td>
101 <td class="coverBar" align="center" width="100">
102 <table border="0" cellspacing="0" cellpadding="1">
103 <tr>
104 <td class="coverBarOutline"><img src="chameleon.png" width="88" height="10" alt="88.89%"><img src="snow.png" width="12" height="10" alt="88.89%"></td>
105 </tr>
106 </table>
107 </td>
108 <td class="coverPerHi">88.89%</td>
109 <td class="coverNumHi">8 / 9</td>
110 <td class="coverBar" align="center" width="100">
111 <table border="0" cellspacing="0" cellpadding="1">
112 <tr>
113 <td class="coverBarOutline"><img src="chameleon.png" width="94" height="10" alt="94.74%"><img src="snow.png" width="6" height="10" alt="94.74%"></td>
114 </tr>
115 </table>
116 </td>
117 <td class="coverPerHi">94.74%</td>
118 <td class="coverNumHi">18 / 19</td>
119 </tr>
121 <tr>
122 <td class="coverFile" colspan="4">&nbsp;<a href="#61">function __construct(Array $array)</a></td>
123 <td class="coverBar" align="center" width="100">
124 <table border="0" cellspacing="0" cellpadding="1">
125 <tr>
126 <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
127 </tr>
128 </table>
129 </td>
130 <td class="coverPerHi">100.00%</td>
131 <td class="coverNumHi">1 / 1</td>
132 <td class="coverBar" align="center" width="100">
133 <table border="0" cellspacing="0" cellpadding="1">
134 <tr>
135 <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
136 </tr>
137 </table>
138 </td>
139 <td class="coverPerHi">100.00%</td>
140 <td class="coverNumHi">4 / 4</td>
141 </tr>
143 <tr>
144 <td class="coverFile" colspan="4">&nbsp;<a href="#68">function reset()</a></td>
145 <td class="coverBar" align="center" width="100">
146 <table border="0" cellspacing="0" cellpadding="1">
147 <tr>
148 <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
149 </tr>
150 </table>
151 </td>
152 <td class="coverPerHi">100.00%</td>
153 <td class="coverNumHi">1 / 1</td>
154 <td class="coverBar" align="center" width="100">
155 <table border="0" cellspacing="0" cellpadding="1">
156 <tr>
157 <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
158 </tr>
159 </table>
160 </td>
161 <td class="coverPerHi">100.00%</td>
162 <td class="coverNumHi">2 / 2</td>
163 </tr>
165 <tr>
166 <td class="coverFile" colspan="4">&nbsp;<a href="#73">function key()</a></td>
167 <td class="coverBar" align="center" width="100">
168 <table border="0" cellspacing="0" cellpadding="1">
169 <tr>
170 <td class="coverBarOutline"><img src="scarlet_red.png" width="0" height="10" alt="0.00%"><img src="snow.png" width="100" height="10" alt="0.00%"></td>
171 </tr>
172 </table>
173 </td>
174 <td class="coverPerLo">0.00%</td>
175 <td class="coverNumLo">0 / 1</td>
176 <td class="coverBar" align="center" width="100">
177 <table border="0" cellspacing="0" cellpadding="1">
178 <tr>
179 <td class="coverBarOutline"><img src="scarlet_red.png" width="0" height="10" alt="0.00%"><img src="snow.png" width="100" height="10" alt="0.00%"></td>
180 </tr>
181 </table>
182 </td>
183 <td class="coverPerLo">0.00%</td>
184 <td class="coverNumLo">0 / 1</td>
185 </tr>
187 <tr>
188 <td class="coverFile" colspan="4">&nbsp;<a href="#78">function current()</a></td>
189 <td class="coverBar" align="center" width="100">
190 <table border="0" cellspacing="0" cellpadding="1">
191 <tr>
192 <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
193 </tr>
194 </table>
195 </td>
196 <td class="coverPerHi">100.00%</td>
197 <td class="coverNumHi">1 / 1</td>
198 <td class="coverBar" align="center" width="100">
199 <table border="0" cellspacing="0" cellpadding="1">
200 <tr>
201 <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
202 </tr>
203 </table>
204 </td>
205 <td class="coverPerHi">100.00%</td>
206 <td class="coverNumHi">3 / 3</td>
207 </tr>
209 <tr>
210 <td class="coverFile" colspan="4">&nbsp;<a href="#86">function next()</a></td>
211 <td class="coverBar" align="center" width="100">
212 <table border="0" cellspacing="0" cellpadding="1">
213 <tr>
214 <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
215 </tr>
216 </table>
217 </td>
218 <td class="coverPerHi">100.00%</td>
219 <td class="coverNumHi">1 / 1</td>
220 <td class="coverBar" align="center" width="100">
221 <table border="0" cellspacing="0" cellpadding="1">
222 <tr>
223 <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
224 </tr>
225 </table>
226 </td>
227 <td class="coverPerHi">100.00%</td>
228 <td class="coverNumHi">2 / 2</td>
229 </tr>
231 <tr>
232 <td class="coverFile" colspan="4">&nbsp;<a href="#91">function valid()</a></td>
233 <td class="coverBar" align="center" width="100">
234 <table border="0" cellspacing="0" cellpadding="1">
235 <tr>
236 <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
237 </tr>
238 </table>
239 </td>
240 <td class="coverPerHi">100.00%</td>
241 <td class="coverNumHi">1 / 1</td>
242 <td class="coverBar" align="center" width="100">
243 <table border="0" cellspacing="0" cellpadding="1">
244 <tr>
245 <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
246 </tr>
247 </table>
248 </td>
249 <td class="coverPerHi">100.00%</td>
250 <td class="coverNumHi">1 / 1</td>
251 </tr>
253 <tr>
254 <td class="coverFile" colspan="4">&nbsp;<a href="#96">function rewind()</a></td>
255 <td class="coverBar" align="center" width="100">
256 <table border="0" cellspacing="0" cellpadding="1">
257 <tr>
258 <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
259 </tr>
260 </table>
261 </td>
262 <td class="coverPerHi">100.00%</td>
263 <td class="coverNumHi">1 / 1</td>
264 <td class="coverBar" align="center" width="100">
265 <table border="0" cellspacing="0" cellpadding="1">
266 <tr>
267 <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
268 </tr>
269 </table>
270 </td>
271 <td class="coverPerHi">100.00%</td>
272 <td class="coverNumHi">3 / 3</td>
273 </tr>
275 <tr>
276 <td class="coverFile" colspan="4">&nbsp;<a href="#102">function getNext()</a></td>
277 <td class="coverBar" align="center" width="100">
278 <table border="0" cellspacing="0" cellpadding="1">
279 <tr>
280 <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
281 </tr>
282 </table>
283 </td>
284 <td class="coverPerHi">100.00%</td>
285 <td class="coverNumHi">1 / 1</td>
286 <td class="coverBar" align="center" width="100">
287 <table border="0" cellspacing="0" cellpadding="1">
288 <tr>
289 <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
290 </tr>
291 </table>
292 </td>
293 <td class="coverPerHi">100.00%</td>
294 <td class="coverNumHi">2 / 2</td>
295 </tr>
297 <tr>
298 <td class="coverFile" colspan="4">&nbsp;<a href="#108">function count()</a></td>
299 <td class="coverBar" align="center" width="100">
300 <table border="0" cellspacing="0" cellpadding="1">
301 <tr>
302 <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
303 </tr>
304 </table>
305 </td>
306 <td class="coverPerHi">100.00%</td>
307 <td class="coverNumHi">1 / 1</td>
308 <td class="coverBar" align="center" width="100">
309 <table border="0" cellspacing="0" cellpadding="1">
310 <tr>
311 <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
312 </tr>
313 </table>
314 </td>
315 <td class="coverPerHi">100.00%</td>
316 <td class="coverNumHi">1 / 1</td>
317 </tr>
319 <tr>
320 <td class="coverItem"><b><a href="#127">CacheDriver</a></b></td>
321 <td class="coverBar" align="center" width="100">
322 <table border="0" cellspacing="0" cellpadding="1">
323 <tr>
324 <td class="coverBarOutline"><img src="scarlet_red.png" width="0" height="10" alt="0.00%"><img src="snow.png" width="100" height="10" alt="0.00%"></td>
325 </tr>
326 </table>
327 </td>
328 <td class="coverPerLo">0.00%</td>
329 <td class="coverNumLo">0 / 1</td>
330 <td class="coverBar" align="center" width="100">
331 <table border="0" cellspacing="0" cellpadding="1">
332 <tr>
333 <td class="coverBarOutline"><img src="chameleon.png" width="83" height="10" alt="83.33%"><img src="snow.png" width="17" height="10" alt="83.33%"></td>
334 </tr>
335 </table>
336 </td>
337 <td class="coverPerHi">83.33%</td>
338 <td class="coverNumHi">5 / 6</td>
339 <td class="coverBar" align="center" width="100">
340 <table border="0" cellspacing="0" cellpadding="1">
341 <tr>
342 <td class="coverBarOutline"><img src="chameleon.png" width="94" height="10" alt="94.12%"><img src="snow.png" width="6" height="10" alt="94.12%"></td>
343 </tr>
344 </table>
345 </td>
346 <td class="coverPerHi">94.12%</td>
347 <td class="coverNumHi">16 / 17</td>
348 </tr>
350 <tr>
351 <td class="coverFile" colspan="4">&nbsp;<a href="#138">function serialize($object)</a></td>
352 <td class="coverBar" align="center" width="100">
353 <table border="0" cellspacing="0" cellpadding="1">
354 <tr>
355 <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
356 </tr>
357 </table>
358 </td>
359 <td class="coverPerHi">100.00%</td>
360 <td class="coverNumHi">1 / 1</td>
361 <td class="coverBar" align="center" width="100">
362 <table border="0" cellspacing="0" cellpadding="1">
363 <tr>
364 <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
365 </tr>
366 </table>
367 </td>
368 <td class="coverPerHi">100.00%</td>
369 <td class="coverNumHi">1 / 1</td>
370 </tr>
372 <tr>
373 <td class="coverFile" colspan="4">&nbsp;<a href="#150">function deserialize($string)</a></td>
374 <td class="coverBar" align="center" width="100">
375 <table border="0" cellspacing="0" cellpadding="1">
376 <tr>
377 <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
378 </tr>
379 </table>
380 </td>
381 <td class="coverPerHi">100.00%</td>
382 <td class="coverNumHi">1 / 1</td>
383 <td class="coverBar" align="center" width="100">
384 <table border="0" cellspacing="0" cellpadding="1">
385 <tr>
386 <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
387 </tr>
388 </table>
389 </td>
390 <td class="coverPerHi">100.00%</td>
391 <td class="coverNumHi">1 / 1</td>
392 </tr>
394 <tr>
395 <td class="coverFile" colspan="4">&nbsp;<a href="#170">function getMulti(Array $keys, Array &$objects)</a></td>
396 <td class="coverBar" align="center" width="100">
397 <table border="0" cellspacing="0" cellpadding="1">
398 <tr>
399 <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
400 </tr>
401 </table>
402 </td>
403 <td class="coverPerHi">100.00%</td>
404 <td class="coverNumHi">1 / 1</td>
405 <td class="coverBar" align="center" width="100">
406 <table border="0" cellspacing="0" cellpadding="1">
407 <tr>
408 <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
409 </tr>
410 </table>
411 </td>
412 <td class="coverPerHi">100.00%</td>
413 <td class="coverNumHi">6 / 6</td>
414 </tr>
416 <tr>
417 <td class="coverFile" colspan="4">&nbsp;<a href="#194">function setMulti(Array $objects, Array $ttl)</a></td>
418 <td class="coverBar" align="center" width="100">
419 <table border="0" cellspacing="0" cellpadding="1">
420 <tr>
421 <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
422 </tr>
423 </table>
424 </td>
425 <td class="coverPerHi">100.00%</td>
426 <td class="coverNumHi">1 / 1</td>
427 <td class="coverBar" align="center" width="100">
428 <table border="0" cellspacing="0" cellpadding="1">
429 <tr>
430 <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
431 </tr>
432 </table>
433 </td>
434 <td class="coverPerHi">100.00%</td>
435 <td class="coverNumHi">7 / 7</td>
436 </tr>
438 <tr>
439 <td class="coverFile" colspan="4">&nbsp;<a href="#214">function config($variable, $value)</a></td>
440 <td class="coverBar" align="center" width="100">
441 <table border="0" cellspacing="0" cellpadding="1">
442 <tr>
443 <td class="coverBarOutline"><img src="scarlet_red.png" width="0" height="10" alt="0.00%"><img src="snow.png" width="100" height="10" alt="0.00%"></td>
444 </tr>
445 </table>
446 </td>
447 <td class="coverPerLo">0.00%</td>
448 <td class="coverNumLo">0 / 1</td>
449 <td class="coverBar" align="center" width="100">
450 <table border="0" cellspacing="0" cellpadding="1">
451 <tr>
452 <td class="coverBarOutline"><img src="scarlet_red.png" width="0" height="10" alt="0.00%"><img src="snow.png" width="100" height="10" alt="0.00%"></td>
453 </tr>
454 </table>
455 </td>
456 <td class="coverPerLo">0.00%</td>
457 <td class="coverNumLo">0 / 1</td>
458 </tr>
460 <tr>
461 <td class="coverFile" colspan="4">&nbsp;<a href="#220">function isEnabled()</a></td>
462 <td class="coverBar" align="center" width="100">
463 <table border="0" cellspacing="0" cellpadding="1">
464 <tr>
465 <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
466 </tr>
467 </table>
468 </td>
469 <td class="coverPerHi">100.00%</td>
470 <td class="coverNumHi">1 / 1</td>
471 <td class="coverBar" align="center" width="100">
472 <table border="0" cellspacing="0" cellpadding="1">
473 <tr>
474 <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
475 </tr>
476 </table>
477 </td>
478 <td class="coverPerHi">100.00%</td>
479 <td class="coverNumHi">1 / 1</td>
480 </tr>
482 <tr>
483 <td class="coverItem"><b><a href="#253">ActiveMongo_Cache</a></b></td>
484 <td class="coverBar" align="center" width="100">
485 <table border="0" cellspacing="0" cellpadding="1">
486 <tr>
487 <td class="coverBarOutline"><img src="scarlet_red.png" width="0" height="10" alt="0.00%"><img src="snow.png" width="100" height="10" alt="0.00%"></td>
488 </tr>
489 </table>
490 </td>
491 <td class="coverPerLo">0.00%</td>
492 <td class="coverNumLo">0 / 1</td>
493 <td class="coverBar" align="center" width="100">
494 <table border="0" cellspacing="0" cellpadding="1">
495 <tr>
496 <td class="coverBarOutline"><img src="scarlet_red.png" width="31" height="10" alt="31.25%"><img src="snow.png" width="69" height="10" alt="31.25%"></td>
497 </tr>
498 </table>
499 </td>
500 <td class="coverPerLo">31.25%</td>
501 <td class="coverNumLo">5 / 16</td>
502 <td class="coverBar" align="center" width="100">
503 <table border="0" cellspacing="0" cellpadding="1">
504 <tr>
505 <td class="coverBarOutline"><img src="chameleon.png" width="83" height="10" alt="83.33%"><img src="snow.png" width="17" height="10" alt="83.33%"></td>
506 </tr>
507 </table>
508 </td>
509 <td class="coverPerHi">83.33%</td>
510 <td class="coverNumHi">100 / 120</td>
511 </tr>
513 <tr>
514 <td class="coverFile" colspan="4">&nbsp;<a href="#271">private function __construct()</a></td>
515 <td class="coverBar" align="center" width="100">
516 <table border="0" cellspacing="0" cellpadding="1">
517 <tr>
518 <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
519 </tr>
520 </table>
521 </td>
522 <td class="coverPerHi">100.00%</td>
523 <td class="coverNumHi">1 / 1</td>
524 <td class="coverBar" align="center" width="100">
525 <table border="0" cellspacing="0" cellpadding="1">
526 <tr>
527 <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
528 </tr>
529 </table>
530 </td>
531 <td class="coverPerHi">100.00%</td>
532 <td class="coverNumHi">5 / 5</td>
533 </tr>
535 <tr>
536 <td class="coverFile" colspan="4">&nbsp;<a href="#287">public static function Init()</a></td>
537 <td class="coverBar" align="center" width="100">
538 <table border="0" cellspacing="0" cellpadding="1">
539 <tr>
540 <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
541 </tr>
542 </table>
543 </td>
544 <td class="coverPerHi">100.00%</td>
545 <td class="coverNumHi">1 / 1</td>
546 <td class="coverBar" align="center" width="100">
547 <table border="0" cellspacing="0" cellpadding="1">
548 <tr>
549 <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
550 </tr>
551 </table>
552 </td>
553 <td class="coverPerHi">100.00%</td>
554 <td class="coverNumHi">4 / 4</td>
555 </tr>
557 <tr>
558 <td class="coverFile" colspan="4">&nbsp;<a href="#305">public static function setDriver(CacheDriver $driver)</a></td>
559 <td class="coverBar" align="center" width="100">
560 <table border="0" cellspacing="0" cellpadding="1">
561 <tr>
562 <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
563 </tr>
564 </table>
565 </td>
566 <td class="coverPerHi">100.00%</td>
567 <td class="coverNumHi">1 / 1</td>
568 <td class="coverBar" align="center" width="100">
569 <table border="0" cellspacing="0" cellpadding="1">
570 <tr>
571 <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
572 </tr>
573 </table>
574 </td>
575 <td class="coverPerHi">100.00%</td>
576 <td class="coverNumHi">4 / 4</td>
577 </tr>
579 <tr>
580 <td class="coverFile" colspan="4">&nbsp;<a href="#321">public static function enable()</a></td>
581 <td class="coverBar" align="center" width="100">
582 <table border="0" cellspacing="0" cellpadding="1">
583 <tr>
584 <td class="coverBarOutline"><img src="scarlet_red.png" width="0" height="10" alt="0.00%"><img src="snow.png" width="100" height="10" alt="0.00%"></td>
585 </tr>
586 </table>
587 </td>
588 <td class="coverPerLo">0.00%</td>
589 <td class="coverNumLo">0 / 1</td>
590 <td class="coverBar" align="center" width="100">
591 <table border="0" cellspacing="0" cellpadding="1">
592 <tr>
593 <td class="coverBarOutline"><img src="scarlet_red.png" width="0" height="10" alt="0.00%"><img src="snow.png" width="100" height="10" alt="0.00%"></td>
594 </tr>
595 </table>
596 </td>
597 <td class="coverPerLo">0.00%</td>
598 <td class="coverNumLo">0 / 3</td>
599 </tr>
601 <tr>
602 <td class="coverFile" colspan="4">&nbsp;<a href="#334">public static function config($name, $value)</a></td>
603 <td class="coverBar" align="center" width="100">
604 <table border="0" cellspacing="0" cellpadding="1">
605 <tr>
606 <td class="coverBarOutline"><img src="scarlet_red.png" width="0" height="10" alt="0.00%"><img src="snow.png" width="100" height="10" alt="0.00%"></td>
607 </tr>
608 </table>
609 </td>
610 <td class="coverPerLo">0.00%</td>
611 <td class="coverNumLo">0 / 1</td>
612 <td class="coverBar" align="center" width="100">
613 <table border="0" cellspacing="0" cellpadding="1">
614 <tr>
615 <td class="coverBarOutline"><img src="chameleon.png" width="80" height="10" alt="80.00%"><img src="snow.png" width="20" height="10" alt="80.00%"></td>
616 </tr>
617 </table>
618 </td>
619 <td class="coverPerHi">80.00%</td>
620 <td class="coverNumHi">4 / 5</td>
621 </tr>
623 <tr>
624 <td class="coverFile" colspan="4">&nbsp;<a href="#354">function cacheFailed()</a></td>
625 <td class="coverBar" align="center" width="100">
626 <table border="0" cellspacing="0" cellpadding="1">
627 <tr>
628 <td class="coverBarOutline"><img src="scarlet_red.png" width="0" height="10" alt="0.00%"><img src="snow.png" width="100" height="10" alt="0.00%"></td>
629 </tr>
630 </table>
631 </td>
632 <td class="coverPerLo">0.00%</td>
633 <td class="coverNumLo">0 / 1</td>
634 <td class="coverBar" align="center" width="100">
635 <table border="0" cellspacing="0" cellpadding="1">
636 <tr>
637 <td class="coverBarOutline"><img src="scarlet_red.png" width="0" height="10" alt="0.00%"><img src="snow.png" width="100" height="10" alt="0.00%"></td>
638 </tr>
639 </table>
640 </td>
641 <td class="coverPerLo">0.00%</td>
642 <td class="coverNumLo">0 / 2</td>
643 </tr>
645 <tr>
646 <td class="coverFile" colspan="4">&nbsp;<a href="#369">public static function disable()</a></td>
647 <td class="coverBar" align="center" width="100">
648 <table border="0" cellspacing="0" cellpadding="1">
649 <tr>
650 <td class="coverBarOutline"><img src="scarlet_red.png" width="0" height="10" alt="0.00%"><img src="snow.png" width="100" height="10" alt="0.00%"></td>
651 </tr>
652 </table>
653 </td>
654 <td class="coverPerLo">0.00%</td>
655 <td class="coverNumLo">0 / 1</td>
656 <td class="coverBar" align="center" width="100">
657 <table border="0" cellspacing="0" cellpadding="1">
658 <tr>
659 <td class="coverBarOutline"><img src="scarlet_red.png" width="0" height="10" alt="0.00%"><img src="snow.png" width="100" height="10" alt="0.00%"></td>
660 </tr>
661 </table>
662 </td>
663 <td class="coverPerLo">0.00%</td>
664 <td class="coverNumLo">0 / 3</td>
665 </tr>
667 <tr>
668 <td class="coverFile" colspan="4">&nbsp;<a href="#383">static function isDriverActived()</a></td>
669 <td class="coverBar" align="center" width="100">
670 <table border="0" cellspacing="0" cellpadding="1">
671 <tr>
672 <td class="coverBarOutline"><img src="scarlet_red.png" width="0" height="10" alt="0.00%"><img src="snow.png" width="100" height="10" alt="0.00%"></td>
673 </tr>
674 </table>
675 </td>
676 <td class="coverPerLo">0.00%</td>
677 <td class="coverNumLo">0 / 1</td>
678 <td class="coverBar" align="center" width="100">
679 <table border="0" cellspacing="0" cellpadding="1">
680 <tr>
681 <td class="coverBarOutline"><img src="chameleon.png" width="75" height="10" alt="75.00%"><img src="snow.png" width="25" height="10" alt="75.00%"></td>
682 </tr>
683 </table>
684 </td>
685 <td class="coverPerHi">75.00%</td>
686 <td class="coverNumHi">6 / 8</td>
687 </tr>
689 <tr>
690 <td class="coverFile" colspan="4">&nbsp;<a href="#404">static function flushCache()</a></td>
691 <td class="coverBar" align="center" width="100">
692 <table border="0" cellspacing="0" cellpadding="1">
693 <tr>
694 <td class="coverBarOutline"><img src="scarlet_red.png" width="0" height="10" alt="0.00%"><img src="snow.png" width="100" height="10" alt="0.00%"></td>
695 </tr>
696 </table>
697 </td>
698 <td class="coverPerLo">0.00%</td>
699 <td class="coverNumLo">0 / 1</td>
700 <td class="coverBar" align="center" width="100">
701 <table border="0" cellspacing="0" cellpadding="1">
702 <tr>
703 <td class="coverBarOutline"><img src="chameleon.png" width="75" height="10" alt="75.00%"><img src="snow.png" width="25" height="10" alt="75.00%"></td>
704 </tr>
705 </table>
706 </td>
707 <td class="coverPerHi">75.00%</td>
708 <td class="coverNumHi">6 / 8</td>
709 </tr>
711 <tr>
712 <td class="coverFile" colspan="4">&nbsp;<a href="#427">final protected function canUseCache($class)</a></td>
713 <td class="coverBar" align="center" width="100">
714 <table border="0" cellspacing="0" cellpadding="1">
715 <tr>
716 <td class="coverBarOutline"><img src="scarlet_red.png" width="0" height="10" alt="0.00%"><img src="snow.png" width="100" height="10" alt="0.00%"></td>
717 </tr>
718 </table>
719 </td>
720 <td class="coverPerLo">0.00%</td>
721 <td class="coverNumLo">0 / 1</td>
722 <td class="coverBar" align="center" width="100">
723 <table border="0" cellspacing="0" cellpadding="1">
724 <tr>
725 <td class="coverBarOutline"><img src="chameleon.png" width="80" height="10" alt="80.00%"><img src="snow.png" width="20" height="10" alt="80.00%"></td>
726 </tr>
727 </table>
728 </td>
729 <td class="coverPerHi">80.00%</td>
730 <td class="coverNumHi">8 / 10</td>
731 </tr>
733 <tr>
734 <td class="coverFile" colspan="4">&nbsp;<a href="#454">final protected function getQueryID($query_document)</a></td>
735 <td class="coverBar" align="center" width="100">
736 <table border="0" cellspacing="0" cellpadding="1">
737 <tr>
738 <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
739 </tr>
740 </table>
741 </td>
742 <td class="coverPerHi">100.00%</td>
743 <td class="coverNumHi">1 / 1</td>
744 <td class="coverBar" align="center" width="100">
745 <table border="0" cellspacing="0" cellpadding="1">
746 <tr>
747 <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
748 </tr>
749 </table>
750 </td>
751 <td class="coverPerHi">100.00%</td>
752 <td class="coverNumHi">2 / 2</td>
753 </tr>
755 <tr>
756 <td class="coverFile" colspan="4">&nbsp;<a href="#472">final static function deleteObject($id)</a></td>
757 <td class="coverBar" align="center" width="100">
758 <table border="0" cellspacing="0" cellpadding="1">
759 <tr>
760 <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
761 </tr>
762 </table>
763 </td>
764 <td class="coverPerHi">100.00%</td>
765 <td class="coverNumHi">1 / 1</td>
766 <td class="coverBar" align="center" width="100">
767 <table border="0" cellspacing="0" cellpadding="1">
768 <tr>
769 <td class="coverBarOutline"><img src="chameleon.png" width="100" height="10" alt="100.00%"><img src="snow.png" width="0" height="10" alt="100.00%"></td>
770 </tr>
771 </table>
772 </td>
773 <td class="coverPerHi">100.00%</td>
774 <td class="coverNumHi">4 / 4</td>
775 </tr>
777 <tr>
778 <td class="coverFile" colspan="4">&nbsp;<a href="#489">final static function getObject($id)</a></td>
779 <td class="coverBar" align="center" width="100">
780 <table border="0" cellspacing="0" cellpadding="1">
781 <tr>
782 <td class="coverBarOutline"><img src="scarlet_red.png" width="0" height="10" alt="0.00%"><img src="snow.png" width="100" height="10" alt="0.00%"></td>
783 </tr>
784 </table>
785 </td>
786 <td class="coverPerLo">0.00%</td>
787 <td class="coverNumLo">0 / 1</td>
788 <td class="coverBar" align="center" width="100">
789 <table border="0" cellspacing="0" cellpadding="1">
790 <tr>
791 <td class="coverBarOutline"><img src="chameleon.png" width="85" height="10" alt="85.71%"><img src="snow.png" width="15" height="10" alt="85.71%"></td>
792 </tr>
793 </table>
794 </td>
795 <td class="coverPerHi">85.71%</td>
796 <td class="coverNumHi">6 / 7</td>
797 </tr>
799 <tr>
800 <td class="coverFile" colspan="4">&nbsp;<a href="#517">function QueryRead($class, $query_document, &$resultset, $use_cache=TRUE)</a></td>
801 <td class="coverBar" align="center" width="100">
802 <table border="0" cellspacing="0" cellpadding="1">
803 <tr>
804 <td class="coverBarOutline"><img src="scarlet_red.png" width="0" height="10" alt="0.00%"><img src="snow.png" width="100" height="10" alt="0.00%"></td>
805 </tr>
806 </table>
807 </td>
808 <td class="coverPerLo">0.00%</td>
809 <td class="coverNumLo">0 / 1</td>
810 <td class="coverBar" align="center" width="100">
811 <table border="0" cellspacing="0" cellpadding="1">
812 <tr>
813 <td class="coverBarOutline"><img src="chameleon.png" width="96" height="10" alt="96.67%"><img src="snow.png" width="4" height="10" alt="96.67%"></td>
814 </tr>
815 </table>
816 </td>
817 <td class="coverPerHi">96.67%</td>
818 <td class="coverNumHi">29 / 30</td>
819 </tr>
821 <tr>
822 <td class="coverFile" colspan="4">&nbsp;<a href="#584">function QuerySave($class, $query_document, $cursor)</a></td>
823 <td class="coverBar" align="center" width="100">
824 <table border="0" cellspacing="0" cellpadding="1">
825 <tr>
826 <td class="coverBarOutline"><img src="scarlet_red.png" width="0" height="10" alt="0.00%"><img src="snow.png" width="100" height="10" alt="0.00%"></td>
827 </tr>
828 </table>
829 </td>
830 <td class="coverPerLo">0.00%</td>
831 <td class="coverNumLo">0 / 1</td>
832 <td class="coverBar" align="center" width="100">
833 <table border="0" cellspacing="0" cellpadding="1">
834 <tr>
835 <td class="coverBarOutline"><img src="chameleon.png" width="93" height="10" alt="93.33%"><img src="snow.png" width="7" height="10" alt="93.33%"></td>
836 </tr>
837 </table>
838 </td>
839 <td class="coverPerHi">93.33%</td>
840 <td class="coverNumHi">14 / 15</td>
841 </tr>
843 <tr>
844 <td class="coverFile" colspan="4">&nbsp;<a href="#623">function UpdateDocumentHook($class, $document, $obj)</a></td>
845 <td class="coverBar" align="center" width="100">
846 <table border="0" cellspacing="0" cellpadding="1">
847 <tr>
848 <td class="coverBarOutline"><img src="scarlet_red.png" width="0" height="10" alt="0.00%"><img src="snow.png" width="100" height="10" alt="0.00%"></td>
849 </tr>
850 </table>
851 </td>
852 <td class="coverPerLo">0.00%</td>
853 <td class="coverNumLo">0 / 1</td>
854 <td class="coverBar" align="center" width="100">
855 <table border="0" cellspacing="0" cellpadding="1">
856 <tr>
857 <td class="coverBarOutline"><img src="chameleon.png" width="80" height="10" alt="80.00%"><img src="snow.png" width="20" height="10" alt="80.00%"></td>
858 </tr>
859 </table>
860 </td>
861 <td class="coverPerHi">80.00%</td>
862 <td class="coverNumHi">8 / 10</td>
863 </tr>
866 </table>
867 </center>
869 <br />
871 <table cellpadding="0" cellspacing="0" border="0">
872 <tr>
873 <td><br /></td>
874 </tr>
875 <tr>
876 <td>
877 <pre class="source">
878 <span class="lineNum" id="container1"><a name="1"></a><a href="#1" id="line1"> 1</a> </span> : &lt;?php
879 <span class="lineNum" id="container2"><a name="2"></a><a href="#2" id="line2"> 2</a> </span> : /*
880 <span class="lineNum" id="container3"><a name="3"></a><a href="#3" id="line3"> 3</a> </span> : +---------------------------------------------------------------------------------+
881 <span class="lineNum" id="container4"><a name="4"></a><a href="#4" id="line4"> 4</a> </span> : | Copyright (c) 2010 ActiveMongo |
882 <span class="lineNum" id="container5"><a name="5"></a><a href="#5" id="line5"> 5</a> </span> : +---------------------------------------------------------------------------------+
883 <span class="lineNum" id="container6"><a name="6"></a><a href="#6" id="line6"> 6</a> </span> : | Redistribution and use in source and binary forms, with or without |
884 <span class="lineNum" id="container7"><a name="7"></a><a href="#7" id="line7"> 7</a> </span> : | modification, are permitted provided that the following conditions are met: |
885 <span class="lineNum" id="container8"><a name="8"></a><a href="#8" id="line8"> 8</a> </span> : | 1. Redistributions of source code must retain the above copyright |
886 <span class="lineNum" id="container9"><a name="9"></a><a href="#9" id="line9"> 9</a> </span> : | notice, this list of conditions and the following disclaimer. |
887 <span class="lineNum" id="container10"><a name="10"></a><a href="#10" id="line10"> 10</a> </span> : | |
888 <span class="lineNum" id="container11"><a name="11"></a><a href="#11" id="line11"> 11</a> </span> : | 2. Redistributions in binary form must reproduce the above copyright |
889 <span class="lineNum" id="container12"><a name="12"></a><a href="#12" id="line12"> 12</a> </span> : | notice, this list of conditions and the following disclaimer in the |
890 <span class="lineNum" id="container13"><a name="13"></a><a href="#13" id="line13"> 13</a> </span> : | documentation and/or other materials provided with the distribution. |
891 <span class="lineNum" id="container14"><a name="14"></a><a href="#14" id="line14"> 14</a> </span> : | |
892 <span class="lineNum" id="container15"><a name="15"></a><a href="#15" id="line15"> 15</a> </span> : | 3. All advertising materials mentioning features or use of this software |
893 <span class="lineNum" id="container16"><a name="16"></a><a href="#16" id="line16"> 16</a> </span> : | must display the following acknowledgement: |
894 <span class="lineNum" id="container17"><a name="17"></a><a href="#17" id="line17"> 17</a> </span> : | This product includes software developed by César D. Rodas. |
895 <span class="lineNum" id="container18"><a name="18"></a><a href="#18" id="line18"> 18</a> </span> : | |
896 <span class="lineNum" id="container19"><a name="19"></a><a href="#19" id="line19"> 19</a> </span> : | 4. Neither the name of the César D. Rodas nor the |
897 <span class="lineNum" id="container20"><a name="20"></a><a href="#20" id="line20"> 20</a> </span> : | names of its contributors may be used to endorse or promote products |
898 <span class="lineNum" id="container21"><a name="21"></a><a href="#21" id="line21"> 21</a> </span> : | derived from this software without specific prior written permission. |
899 <span class="lineNum" id="container22"><a name="22"></a><a href="#22" id="line22"> 22</a> </span> : | |
900 <span class="lineNum" id="container23"><a name="23"></a><a href="#23" id="line23"> 23</a> </span> : | THIS SOFTWARE IS PROVIDED BY CÉSAR D. RODAS ''AS IS'' AND ANY |
901 <span class="lineNum" id="container24"><a name="24"></a><a href="#24" id="line24"> 24</a> </span> : | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
902 <span class="lineNum" id="container25"><a name="25"></a><a href="#25" id="line25"> 25</a> </span> : | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
903 <span class="lineNum" id="container26"><a name="26"></a><a href="#26" id="line26"> 26</a> </span> : | DISCLAIMED. IN NO EVENT SHALL CÉSAR D. RODAS BE LIABLE FOR ANY |
904 <span class="lineNum" id="container27"><a name="27"></a><a href="#27" id="line27"> 27</a> </span> : | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
905 <span class="lineNum" id="container28"><a name="28"></a><a href="#28" id="line28"> 28</a> </span> : | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
906 <span class="lineNum" id="container29"><a name="29"></a><a href="#29" id="line29"> 29</a> </span> : | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
907 <span class="lineNum" id="container30"><a name="30"></a><a href="#30" id="line30"> 30</a> </span> : | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
908 <span class="lineNum" id="container31"><a name="31"></a><a href="#31" id="line31"> 31</a> </span> : | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
909 <span class="lineNum" id="container32"><a name="32"></a><a href="#32" id="line32"> 32</a> </span> : | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE |
910 <span class="lineNum" id="container33"><a name="33"></a><a href="#33" id="line33"> 33</a> </span> : +---------------------------------------------------------------------------------+
911 <span class="lineNum" id="container34"><a name="34"></a><a href="#34" id="line34"> 34</a> </span> : | Authors: César Rodas &lt;crodas@php.net&gt; |
912 <span class="lineNum" id="container35"><a name="35"></a><a href="#35" id="line35"> 35</a> </span> : +---------------------------------------------------------------------------------+
913 <span class="lineNum" id="container36"><a name="36"></a><a href="#36" id="line36"> 36</a> </span> : */
914 <span class="lineNum" id="container37"><a name="37"></a><a href="#37" id="line37"> 37</a> </span> :
915 <span class="lineNum" id="container38"><a name="38"></a><a href="#38" id="line38"> 38</a> </span> : // class CursorCache {{{
916 <span class="lineNum" id="container39"><a name="39"></a><a href="#39" id="line39"> 39</a> </span> : /**
917 <span class="lineNum" id="container40"><a name="40"></a><a href="#40" id="line40"> 40</a> </span> : * Cursor used for cached items
918 <span class="lineNum" id="container41"><a name="41"></a><a href="#41" id="line41"> 41</a> </span> : *
919 <span class="lineNum" id="container42"><a name="42"></a><a href="#42" id="line42"> 42</a> </span> : * Hack for ActiveMongo, fake MongoCursor
920 <span class="lineNum" id="container43"><a name="43"></a><a href="#43" id="line43"> 43</a> </span> : * subclass that iterates in a given array.
921 <span class="lineNum" id="container44"><a name="44"></a><a href="#44" id="line44"> 44</a> </span> : *
922 <span class="lineNum" id="container45"><a name="45"></a><a href="#45" id="line45"> 45</a> </span> : * This avoid re-write the main iteration
923 <span class="lineNum" id="container46"><a name="46"></a><a href="#46" id="line46"> 46</a> </span> : * support at MongoDB, nevertheless this might
924 <span class="lineNum" id="container47"><a name="47"></a><a href="#47" id="line47"> 47</a> </span> : * be improved in the future.
925 <span class="lineNum" id="container48"><a name="48"></a><a href="#48" id="line48"> 48</a> </span> : *
926 <span class="lineNum" id="container49"><a name="49"></a><a href="#49" id="line49"> 49</a> </span> : * @author César D. Rodas &lt;crodas@php.net&gt;
927 <span class="lineNum" id="container50"><a name="50"></a><a href="#50" id="line50"> 50</a> </span> : * @license BSD License
928 <span class="lineNum" id="container51"><a name="51"></a><a href="#51" id="line51"> 51</a> </span> : * @package ActiveMongo
929 <span class="lineNum" id="container52"><a name="52"></a><a href="#52" id="line52"> 52</a> </span> : * @version 1.0
930 <span class="lineNum" id="container53"><a name="53"></a><a href="#53" id="line53"> 53</a> </span> : *
931 <span class="lineNum" id="container54"><a name="54"></a><a href="#54" id="line54"> 54</a> </span> : */
932 <span class="lineNum" id="container55"><a name="55"></a><a href="#55" id="line55"> 55</a> </span> : final class CacheCursor Extends MongoCursor
933 <span class="lineNum" id="container56"><a name="56"></a><a href="#56" id="line56"> 56</a> </span> : {
934 <span class="lineNum" id="container57"><a name="57"></a><a href="#57" id="line57"> 57</a> </span> : protected $var;
935 <span class="lineNum" id="container58"><a name="58"></a><a href="#58" id="line58"> 58</a> </span> : protected $size;
936 <span class="lineNum" id="container59"><a name="59"></a><a href="#59" id="line59"> 59</a> </span> : protected $pos;
937 <span class="lineNum" id="container60"><a name="60"></a><a href="#60" id="line60"> 60</a> </span> :
938 <span class="lineNum" id="container61"><a name="61"></a><a href="#61" id="line61"> 61</a> </span> : function __construct(Array $array)
939 <span class="lineNum" id="container62"><a name="62"></a><a href="#62" id="line62"> 62</a> </span> : {
940 <span class="lineNum" id="container63"><a name="63"></a><a href="#63" id="line63"> 63</a> </span><span class="lineCov"> 6 : $this-&gt;var = array_values($array); </span>
941 <span class="lineNum" id="container64"><a name="64"></a><a href="#64" id="line64"> 64</a> </span><span class="lineCov"> 6 : $this-&gt;size = count($array); </span>
942 <span class="lineNum" id="container65"><a name="65"></a><a href="#65" id="line65"> 65</a> </span><span class="lineCov"> 6 : $this-&gt;pos = 0; </span>
943 <span class="lineNum" id="container66"><a name="66"></a><a href="#66" id="line66"> 66</a> </span><span class="lineCov"> 6 : } </span>
944 <span class="lineNum" id="container67"><a name="67"></a><a href="#67" id="line67"> 67</a> </span> :
945 <span class="lineNum" id="container68"><a name="68"></a><a href="#68" id="line68"> 68</a> </span> : function reset()
946 <span class="lineNum" id="container69"><a name="69"></a><a href="#69" id="line69"> 69</a> </span> : {
947 <span class="lineNum" id="container70"><a name="70"></a><a href="#70" id="line70"> 70</a> </span><span class="lineCov"> 6 : $this-&gt;pos = -1; </span>
948 <span class="lineNum" id="container71"><a name="71"></a><a href="#71" id="line71"> 71</a> </span><span class="lineCov"> 6 : } </span>
949 <span class="lineNum" id="container72"><a name="72"></a><a href="#72" id="line72"> 72</a> </span> :
950 <span class="lineNum" id="container73"><a name="73"></a><a href="#73" id="line73"> 73</a> </span> : function key()
951 <span class="lineNum" id="container74"><a name="74"></a><a href="#74" id="line74"> 74</a> </span> : {
952 <span class="lineNum" id="container75"><a name="75"></a><a href="#75" id="line75"> 75</a> </span><span class="lineNoCov"> 0 : return (string)$this-&gt;var[$this-&gt;pos]['_id']; </span>
953 <span class="lineNum" id="container76"><a name="76"></a><a href="#76" id="line76"> 76</a> </span><span class="lineDeadCode"> : } </span>
954 <span class="lineNum" id="container77"><a name="77"></a><a href="#77" id="line77"> 77</a> </span> :
955 <span class="lineNum" id="container78"><a name="78"></a><a href="#78" id="line78"> 78</a> </span> : function current()
956 <span class="lineNum" id="container79"><a name="79"></a><a href="#79" id="line79"> 79</a> </span> : {
957 <span class="lineNum" id="container80"><a name="80"></a><a href="#80" id="line80"> 80</a> </span><span class="lineCov"> 2 : if (!$this-&gt;valid()) { </span>
958 <span class="lineNum" id="container81"><a name="81"></a><a href="#81" id="line81"> 81</a> </span><span class="lineCov"> 2 : return array(); </span>
959 <span class="lineNum" id="container82"><a name="82"></a><a href="#82" id="line82"> 82</a> </span><span class="lineDeadCode"> : } </span>
960 <span class="lineNum" id="container83"><a name="83"></a><a href="#83" id="line83"> 83</a> </span><span class="lineCov"> 2 : return $this-&gt;var[$this-&gt;pos]; </span>
961 <span class="lineNum" id="container84"><a name="84"></a><a href="#84" id="line84"> 84</a> </span><span class="lineDeadCode"> : } </span>
962 <span class="lineNum" id="container85"><a name="85"></a><a href="#85" id="line85"> 85</a> </span> :
963 <span class="lineNum" id="container86"><a name="86"></a><a href="#86" id="line86"> 86</a> </span> : function next()
964 <span class="lineNum" id="container87"><a name="87"></a><a href="#87" id="line87"> 87</a> </span> : {
965 <span class="lineNum" id="container88"><a name="88"></a><a href="#88" id="line88"> 88</a> </span><span class="lineCov"> 6 : ++$this-&gt;pos; </span>
966 <span class="lineNum" id="container89"><a name="89"></a><a href="#89" id="line89"> 89</a> </span><span class="lineCov"> 6 : } </span>
967 <span class="lineNum" id="container90"><a name="90"></a><a href="#90" id="line90"> 90</a> </span> :
968 <span class="lineNum" id="container91"><a name="91"></a><a href="#91" id="line91"> 91</a> </span> : function valid()
969 <span class="lineNum" id="container92"><a name="92"></a><a href="#92" id="line92"> 92</a> </span> : {
970 <span class="lineNum" id="container93"><a name="93"></a><a href="#93" id="line93"> 93</a> </span><span class="lineCov"> 4 : return isset($this-&gt;var[$this-&gt;pos]); </span>
971 <span class="lineNum" id="container94"><a name="94"></a><a href="#94" id="line94"> 94</a> </span><span class="lineDeadCode"> : } </span>
972 <span class="lineNum" id="container95"><a name="95"></a><a href="#95" id="line95"> 95</a> </span> :
973 <span class="lineNum" id="container96"><a name="96"></a><a href="#96" id="line96"> 96</a> </span> : function rewind()
974 <span class="lineNum" id="container97"><a name="97"></a><a href="#97" id="line97"> 97</a> </span> : {
975 <span class="lineNum" id="container98"><a name="98"></a><a href="#98" id="line98"> 98</a> </span><span class="lineCov"> 6 : $this-&gt;reset(); </span>
976 <span class="lineNum" id="container99"><a name="99"></a><a href="#99" id="line99"> 99</a> </span><span class="lineCov"> 6 : $this-&gt;next(); </span>
977 <span class="lineNum" id="container100"><a name="100"></a><a href="#100" id="line100"> 100</a> </span><span class="lineCov"> 6 : } </span>
978 <span class="lineNum" id="container101"><a name="101"></a><a href="#101" id="line101"> 101</a> </span> :
979 <span class="lineNum" id="container102"><a name="102"></a><a href="#102" id="line102"> 102</a> </span> : function getNext()
980 <span class="lineNum" id="container103"><a name="103"></a><a href="#103" id="line103"> 103</a> </span> : {
981 <span class="lineNum" id="container104"><a name="104"></a><a href="#104" id="line104"> 104</a> </span><span class="lineCov"> 6 : $this-&gt;rewind(); </span>
982 <span class="lineNum" id="container105"><a name="105"></a><a href="#105" id="line105"> 105</a> </span><span class="lineCov"> 6 : return $this-&gt;var[$this-&gt;pos]; </span>
983 <span class="lineNum" id="container106"><a name="106"></a><a href="#106" id="line106"> 106</a> </span><span class="lineDeadCode"> : } </span>
984 <span class="lineNum" id="container107"><a name="107"></a><a href="#107" id="line107"> 107</a> </span> :
985 <span class="lineNum" id="container108"><a name="108"></a><a href="#108" id="line108"> 108</a> </span> : function count()
986 <span class="lineNum" id="container109"><a name="109"></a><a href="#109" id="line109"> 109</a> </span> : {
987 <span class="lineNum" id="container110"><a name="110"></a><a href="#110" id="line110"> 110</a> </span><span class="lineCov"> 4 : return count($this-&gt;var); </span>
988 <span class="lineNum" id="container111"><a name="111"></a><a href="#111" id="line111"> 111</a> </span><span class="lineDeadCode"> : } </span>
989 <span class="lineNum" id="container112"><a name="112"></a><a href="#112" id="line112"> 112</a> </span> :
990 <span class="lineNum" id="container113"><a name="113"></a><a href="#113" id="line113"> 113</a> </span> : }
991 <span class="lineNum" id="container114"><a name="114"></a><a href="#114" id="line114"> 114</a> </span> : // }}}
992 <span class="lineNum" id="container115"><a name="115"></a><a href="#115" id="line115"> 115</a> </span> :
993 <span class="lineNum" id="container116"><a name="116"></a><a href="#116" id="line116"> 116</a> </span> : /**
994 <span class="lineNum" id="container117"><a name="117"></a><a href="#117" id="line117"> 117</a> </span> : * CacheDriver
995 <span class="lineNum" id="container118"><a name="118"></a><a href="#118" id="line118"> 118</a> </span> : *
996 <span class="lineNum" id="container119"><a name="119"></a><a href="#119" id="line119"> 119</a> </span> : * Cache base class, each driver must inherit
997 <span class="lineNum" id="container120"><a name="120"></a><a href="#120" id="line120"> 120</a> </span> : * this class, and must implement each method.
998 <span class="lineNum" id="container121"><a name="121"></a><a href="#121" id="line121"> 121</a> </span> : *
999 <span class="lineNum" id="container122"><a name="122"></a><a href="#122" id="line122"> 122</a> </span> : * @author César D. Rodas &lt;crodas@php.net&gt;
1000 <span class="lineNum" id="container123"><a name="123"></a><a href="#123" id="line123"> 123</a> </span> : * @license BSD License
1001 <span class="lineNum" id="container124"><a name="124"></a><a href="#124" id="line124"> 124</a> </span> : * @package ActiveMongo
1002 <span class="lineNum" id="container125"><a name="125"></a><a href="#125" id="line125"> 125</a> </span> : * @version 1.0
1003 <span class="lineNum" id="container126"><a name="126"></a><a href="#126" id="line126"> 126</a> </span> : */
1004 <span class="lineNum" id="container127"><a name="127"></a><a href="#127" id="line127"> 127</a> </span> : abstract class CacheDriver
1005 <span class="lineNum" id="container128"><a name="128"></a><a href="#128" id="line128"> 128</a> </span> : {
1006 <span class="lineNum" id="container129"><a name="129"></a><a href="#129" id="line129"> 129</a> </span> :
1007 <span class="lineNum" id="container130"><a name="130"></a><a href="#130" id="line130"> 130</a> </span> : // Serialization {{{
1008 <span class="lineNum" id="container131"><a name="131"></a><a href="#131" id="line131"> 131</a> </span> : /**
1009 <span class="lineNum" id="container132"><a name="132"></a><a href="#132" id="line132"> 132</a> </span> : * serialize -- by default with BSON
1010 <span class="lineNum" id="container133"><a name="133"></a><a href="#133" id="line133"> 133</a> </span> : *
1011 <span class="lineNum" id="container134"><a name="134"></a><a href="#134" id="line134"> 134</a> </span> : * @param object $object
1012 <span class="lineNum" id="container135"><a name="135"></a><a href="#135" id="line135"> 135</a> </span> : *
1013 <span class="lineNum" id="container136"><a name="136"></a><a href="#136" id="line136"> 136</a> </span> : * @return string
1014 <span class="lineNum" id="container137"><a name="137"></a><a href="#137" id="line137"> 137</a> </span> : */
1015 <span class="lineNum" id="container138"><a name="138"></a><a href="#138" id="line138"> 138</a> </span> : function serialize($object)
1016 <span class="lineNum" id="container139"><a name="139"></a><a href="#139" id="line139"> 139</a> </span> : {
1017 <span class="lineNum" id="container140"><a name="140"></a><a href="#140" id="line140"> 140</a> </span><span class="lineCov"> 6 : return bson_encode($object); </span>
1018 <span class="lineNum" id="container141"><a name="141"></a><a href="#141" id="line141"> 141</a> </span><span class="lineDeadCode"> : } </span>
1019 <span class="lineNum" id="container142"><a name="142"></a><a href="#142" id="line142"> 142</a> </span> :
1020 <span class="lineNum" id="container143"><a name="143"></a><a href="#143" id="line143"> 143</a> </span> : /**
1021 <span class="lineNum" id="container144"><a name="144"></a><a href="#144" id="line144"> 144</a> </span> : * deserialize -- by default with BSON
1022 <span class="lineNum" id="container145"><a name="145"></a><a href="#145" id="line145"> 145</a> </span> : *
1023 <span class="lineNum" id="container146"><a name="146"></a><a href="#146" id="line146"> 146</a> </span> : * @param string $string
1024 <span class="lineNum" id="container147"><a name="147"></a><a href="#147" id="line147"> 147</a> </span> : *
1025 <span class="lineNum" id="container148"><a name="148"></a><a href="#148" id="line148"> 148</a> </span> : * @return object
1026 <span class="lineNum" id="container149"><a name="149"></a><a href="#149" id="line149"> 149</a> </span> : */
1027 <span class="lineNum" id="container150"><a name="150"></a><a href="#150" id="line150"> 150</a> </span> : function deserialize($string)
1028 <span class="lineNum" id="container151"><a name="151"></a><a href="#151" id="line151"> 151</a> </span> : {
1029 <span class="lineNum" id="container152"><a name="152"></a><a href="#152" id="line152"> 152</a> </span><span class="lineCov"> 5 : return bson_decode($string); </span>
1030 <span class="lineNum" id="container153"><a name="153"></a><a href="#153" id="line153"> 153</a> </span><span class="lineDeadCode"> : } </span>
1031 <span class="lineNum" id="container154"><a name="154"></a><a href="#154" id="line154"> 154</a> </span> : // }}}
1032 <span class="lineNum" id="container155"><a name="155"></a><a href="#155" id="line155"> 155</a> </span> :
1033 <span class="lineNum" id="container156"><a name="156"></a><a href="#156" id="line156"> 156</a> </span> : // void getMulti (Array $keys, Array &amp;$objects) {{{
1034 <span class="lineNum" id="container157"><a name="157"></a><a href="#157" id="line157"> 157</a> </span> : /**
1035 <span class="lineNum" id="container158"><a name="158"></a><a href="#158" id="line158"> 158</a> </span> : * Simple but inneficient implementation of
1036 <span class="lineNum" id="container159"><a name="159"></a><a href="#159" id="line159"> 159</a> </span> : * the getMulti. It retrieve multiple objects
1037 <span class="lineNum" id="container160"><a name="160"></a><a href="#160" id="line160"> 160</a> </span> : * from the cache that matchs the array of keys.
1038 <span class="lineNum" id="container161"><a name="161"></a><a href="#161" id="line161"> 161</a> </span> : *
1039 <span class="lineNum" id="container162"><a name="162"></a><a href="#162" id="line162"> 162</a> </span> : * If the cache supports multiple
1040 <span class="lineNum" id="container163"><a name="163"></a><a href="#163" id="line163"> 163</a> </span> : * get (as memcached does) it should be overrided.
1041 <span class="lineNum" id="container164"><a name="164"></a><a href="#164" id="line164"> 164</a> </span> : *
1042 <span class="lineNum" id="container165"><a name="165"></a><a href="#165" id="line165"> 165</a> </span> : *
1043 <span class="lineNum" id="container166"><a name="166"></a><a href="#166" id="line166"> 166</a> </span> : * @param array $keys
1044 <span class="lineNum" id="container167"><a name="167"></a><a href="#167" id="line167"> 167</a> </span> : * @param array &amp;$objects
1045 <span class="lineNum" id="container168"><a name="168"></a><a href="#168" id="line168"> 168</a> </span> : *
1046 <span class="lineNum" id="container169"><a name="169"></a><a href="#169" id="line169"> 169</a> </span> : */
1047 <span class="lineNum" id="container170"><a name="170"></a><a href="#170" id="line170"> 170</a> </span> : function getMulti(Array $keys, Array &amp;$objects)
1048 <span class="lineNum" id="container171"><a name="171"></a><a href="#171" id="line171"> 171</a> </span> : {
1049 <span class="lineNum" id="container172"><a name="172"></a><a href="#172" id="line172"> 172</a> </span><span class="lineCov"> 5 : foreach ($keys as $key) { </span>
1050 <span class="lineNum" id="container173"><a name="173"></a><a href="#173" id="line173"> 173</a> </span><span class="lineCov"> 5 : if ($this-&gt;get($key, $objects[$key]) === FALSE) { </span>
1051 <span class="lineNum" id="container174"><a name="174"></a><a href="#174" id="line174"> 174</a> </span><span class="lineCov"> 1 : $objects[$key] = FALSE; </span>
1052 <span class="lineNum" id="container175"><a name="175"></a><a href="#175" id="line175"> 175</a> </span><span class="lineCov"> 1 : } </span>
1053 <span class="lineNum" id="container176"><a name="176"></a><a href="#176" id="line176"> 176</a> </span><span class="lineCov"> 5 : } </span>
1054 <span class="lineNum" id="container177"><a name="177"></a><a href="#177" id="line177"> 177</a> </span><span class="lineCov"> 5 : } </span>
1055 <span class="lineNum" id="container178"><a name="178"></a><a href="#178" id="line178"> 178</a> </span> : // }}}
1056 <span class="lineNum" id="container179"><a name="179"></a><a href="#179" id="line179"> 179</a> </span> :
1057 <span class="lineNum" id="container180"><a name="180"></a><a href="#180" id="line180"> 180</a> </span> : // setMulti(Array $objects, Array $ttl) {{{
1058 <span class="lineNum" id="container181"><a name="181"></a><a href="#181" id="line181"> 181</a> </span> : /**
1059 <span class="lineNum" id="container182"><a name="182"></a><a href="#182" id="line182"> 182</a> </span> : * Simple but inneficient implementation of the
1060 <span class="lineNum" id="container183"><a name="183"></a><a href="#183" id="line183"> 183</a> </span> : * setMulti, it basically push a set of objects
1061 <span class="lineNum" id="container184"><a name="184"></a><a href="#184" id="line184"> 184</a> </span> : * to the cache at once.
1062 <span class="lineNum" id="container185"><a name="185"></a><a href="#185" id="line185"> 185</a> </span> : *
1063 <span class="lineNum" id="container186"><a name="186"></a><a href="#186" id="line186"> 186</a> </span> : * If the cache driver support this operation,
1064 <span class="lineNum" id="container187"><a name="187"></a><a href="#187" id="line187"> 187</a> </span> : * this method should be overrided.
1065 <span class="lineNum" id="container188"><a name="188"></a><a href="#188" id="line188"> 188</a> </span> : *
1066 <span class="lineNum" id="container189"><a name="189"></a><a href="#189" id="line189"> 189</a> </span> : * @param Array $objects
1067 <span class="lineNum" id="container190"><a name="190"></a><a href="#190" id="line190"> 190</a> </span> : * @param Array $ttl
1068 <span class="lineNum" id="container191"><a name="191"></a><a href="#191" id="line191"> 191</a> </span> : *
1069 <span class="lineNum" id="container192"><a name="192"></a><a href="#192" id="line192"> 192</a> </span> : * @retun voie
1070 <span class="lineNum" id="container193"><a name="193"></a><a href="#193" id="line193"> 193</a> </span> : */
1071 <span class="lineNum" id="container194"><a name="194"></a><a href="#194" id="line194"> 194</a> </span> : function setMulti(Array $objects, Array $ttl)
1072 <span class="lineNum" id="container195"><a name="195"></a><a href="#195" id="line195"> 195</a> </span> : {
1073 <span class="lineNum" id="container196"><a name="196"></a><a href="#196" id="line196"> 196</a> </span><span class="lineCov"> 4 : foreach ($objects as $id =&gt; $value) { </span>
1074 <span class="lineNum" id="container197"><a name="197"></a><a href="#197" id="line197"> 197</a> </span><span class="lineCov"> 4 : if (!isset($ttl[$id])) { </span>
1075 <span class="lineNum" id="container198"><a name="198"></a><a href="#198" id="line198"> 198</a> </span><span class="lineCov"> 1 : $ttl[$id] = 3600; </span>
1076 <span class="lineNum" id="container199"><a name="199"></a><a href="#199" id="line199"> 199</a> </span><span class="lineCov"> 1 : } </span>
1077 <span class="lineNum" id="container200"><a name="200"></a><a href="#200" id="line200"> 200</a> </span><span class="lineCov"> 4 : $this-&gt;set($id, $value, $ttl[$id]); </span>
1078 <span class="lineNum" id="container201"><a name="201"></a><a href="#201" id="line201"> 201</a> </span><span class="lineCov"> 4 : } </span>
1079 <span class="lineNum" id="container202"><a name="202"></a><a href="#202" id="line202"> 202</a> </span><span class="lineCov"> 4 : } </span>
1080 <span class="lineNum" id="container203"><a name="203"></a><a href="#203" id="line203"> 203</a> </span> : // }}}
1081 <span class="lineNum" id="container204"><a name="204"></a><a href="#204" id="line204"> 204</a> </span> :
1082 <span class="lineNum" id="container205"><a name="205"></a><a href="#205" id="line205"> 205</a> </span> : // config($variable, $value) {{{
1083 <span class="lineNum" id="container206"><a name="206"></a><a href="#206" id="line206"> 206</a> </span> : /**
1084 <span class="lineNum" id="container207"><a name="207"></a><a href="#207" id="line207"> 207</a> </span> : * configuration for the driver
1085 <span class="lineNum" id="container208"><a name="208"></a><a href="#208" id="line208"> 208</a> </span> : *
1086 <span class="lineNum" id="container209"><a name="209"></a><a href="#209" id="line209"> 209</a> </span> : * @param string $variable
1087 <span class="lineNum" id="container210"><a name="210"></a><a href="#210" id="line210"> 210</a> </span> : * @param mixed $value
1088 <span class="lineNum" id="container211"><a name="211"></a><a href="#211" id="line211"> 211</a> </span> : *
1089 <span class="lineNum" id="container212"><a name="212"></a><a href="#212" id="line212"> 212</a> </span> : * @return NULL
1090 <span class="lineNum" id="container213"><a name="213"></a><a href="#213" id="line213"> 213</a> </span> : */
1091 <span class="lineNum" id="container214"><a name="214"></a><a href="#214" id="line214"> 214</a> </span> : function config($variable, $value)
1092 <span class="lineNum" id="container215"><a name="215"></a><a href="#215" id="line215"> 215</a> </span> : {
1093 <span class="lineNum" id="container216"><a name="216"></a><a href="#216" id="line216"> 216</a> </span><span class="lineNoCov"> 0 : } </span>
1094 <span class="lineNum" id="container217"><a name="217"></a><a href="#217" id="line217"> 217</a> </span> : // }}}
1095 <span class="lineNum" id="container218"><a name="218"></a><a href="#218" id="line218"> 218</a> </span> :
1096 <span class="lineNum" id="container219"><a name="219"></a><a href="#219" id="line219"> 219</a> </span> : // isEnabled() {{{
1097 <span class="lineNum" id="container220"><a name="220"></a><a href="#220" id="line220"> 220</a> </span> : function isEnabled()
1098 <span class="lineNum" id="container221"><a name="221"></a><a href="#221" id="line221"> 221</a> </span> : {
1099 <span class="lineNum" id="container222"><a name="222"></a><a href="#222" id="line222"> 222</a> </span><span class="lineCov"> 1 : return TRUE; </span>
1100 <span class="lineNum" id="container223"><a name="223"></a><a href="#223" id="line223"> 223</a> </span><span class="lineDeadCode"> : } </span>
1101 <span class="lineNum" id="container224"><a name="224"></a><a href="#224" id="line224"> 224</a> </span> : // }}}
1102 <span class="lineNum" id="container225"><a name="225"></a><a href="#225" id="line225"> 225</a> </span> :
1103 <span class="lineNum" id="container226"><a name="226"></a><a href="#226" id="line226"> 226</a> </span> : abstract function flush();
1104 <span class="lineNum" id="container227"><a name="227"></a><a href="#227" id="line227"> 227</a> </span> :
1105 <span class="lineNum" id="container228"><a name="228"></a><a href="#228" id="line228"> 228</a> </span> : abstract function get($key, &amp;$object);
1106 <span class="lineNum" id="container229"><a name="229"></a><a href="#229" id="line229"> 229</a> </span> :
1107 <span class="lineNum" id="container230"><a name="230"></a><a href="#230" id="line230"> 230</a> </span> : abstract function set($key, $document, $ttl);
1108 <span class="lineNum" id="container231"><a name="231"></a><a href="#231" id="line231"> 231</a> </span> :
1109 <span class="lineNum" id="container232"><a name="232"></a><a href="#232" id="line232"> 232</a> </span> : abstract function delete(Array $key);
1110 <span class="lineNum" id="container233"><a name="233"></a><a href="#233" id="line233"> 233</a> </span> :
1111 <span class="lineNum" id="container234"><a name="234"></a><a href="#234" id="line234"> 234</a> </span> : }
1112 <span class="lineNum" id="container235"><a name="235"></a><a href="#235" id="line235"> 235</a> </span> :
1113 <span class="lineNum" id="container236"><a name="236"></a><a href="#236" id="line236"> 236</a> </span> : /**
1114 <span class="lineNum" id="container237"><a name="237"></a><a href="#237" id="line237"> 237</a> </span> : * CacheDriver
1115 <span class="lineNum" id="container238"><a name="238"></a><a href="#238" id="line238"> 238</a> </span> : *
1116 <span class="lineNum" id="container239"><a name="239"></a><a href="#239" id="line239"> 239</a> </span> : * Plug-in which adds cache capabilities to all
1117 <span class="lineNum" id="container240"><a name="240"></a><a href="#240" id="line240"> 240</a> </span> : * ActiveMongo objects. The cache could be enabled
1118 <span class="lineNum" id="container241"><a name="241"></a><a href="#241" id="line241"> 241</a> </span> : * for all objects (by default disabled), or for specified
1119 <span class="lineNum" id="container242"><a name="242"></a><a href="#242" id="line242"> 242</a> </span> : * objects which has the static property cacheable to TRUE.
1120 <span class="lineNum" id="container243"><a name="243"></a><a href="#243" id="line243"> 243</a> </span> : *
1121 <span class="lineNum" id="container244"><a name="244"></a><a href="#244" id="line244"> 244</a> </span> : * At query time is also posible to disable the cache, passing
1122 <span class="lineNum" id="container245"><a name="245"></a><a href="#245" id="line245"> 245</a> </span> : * false to doQuery, also this method will override the cache
1123 <span class="lineNum" id="container246"><a name="246"></a><a href="#246" id="line246"> 246</a> </span> : * values if the query can use cache.
1124 <span class="lineNum" id="container247"><a name="247"></a><a href="#247" id="line247"> 247</a> </span> : *
1125 <span class="lineNum" id="container248"><a name="248"></a><a href="#248" id="line248"> 248</a> </span> : * @author César D. Rodas &lt;crodas@php.net&gt;
1126 <span class="lineNum" id="container249"><a name="249"></a><a href="#249" id="line249"> 249</a> </span> : * @license BSD License
1127 <span class="lineNum" id="container250"><a name="250"></a><a href="#250" id="line250"> 250</a> </span> : * @package ActiveMongo
1128 <span class="lineNum" id="container251"><a name="251"></a><a href="#251" id="line251"> 251</a> </span> : * @version 1.0
1129 <span class="lineNum" id="container252"><a name="252"></a><a href="#252" id="line252"> 252</a> </span> : */
1130 <span class="lineNum" id="container253"><a name="253"></a><a href="#253" id="line253"> 253</a> </span> : final class ActiveMongo_Cache
1131 <span class="lineNum" id="container254"><a name="254"></a><a href="#254" id="line254"> 254</a> </span> : {
1132 <span class="lineNum" id="container255"><a name="255"></a><a href="#255" id="line255"> 255</a> </span> : private static $instance;
1133 <span class="lineNum" id="container256"><a name="256"></a><a href="#256" id="line256"> 256</a> </span> : private $enabled;
1134 <span class="lineNum" id="container257"><a name="257"></a><a href="#257" id="line257"> 257</a> </span> : private $driver;
1135 <span class="lineNum" id="container258"><a name="258"></a><a href="#258" id="line258"> 258</a> </span> : private $driver_enabled;
1136 <span class="lineNum" id="container259"><a name="259"></a><a href="#259" id="line259"> 259</a> </span> :
1137 <span class="lineNum" id="container260"><a name="260"></a><a href="#260" id="line260"> 260</a> </span> : // __construct() {{{
1138 <span class="lineNum" id="container261"><a name="261"></a><a href="#261" id="line261"> 261</a> </span> : /**
1139 <span class="lineNum" id="container262"><a name="262"></a><a href="#262" id="line262"> 262</a> </span> : * Class contructor
1140 <span class="lineNum" id="container263"><a name="263"></a><a href="#263" id="line263"> 263</a> </span> : *
1141 <span class="lineNum" id="container264"><a name="264"></a><a href="#264" id="line264"> 264</a> </span> : * This is class is private, so it can be contructed
1142 <span class="lineNum" id="container265"><a name="265"></a><a href="#265" id="line265"> 265</a> </span> : * only using the singleton interfaz.
1143 <span class="lineNum" id="container266"><a name="266"></a><a href="#266" id="line266"> 266</a> </span> : *
1144 <span class="lineNum" id="container267"><a name="267"></a><a href="#267" id="line267"> 267</a> </span> : * This method also setup all needed hooks
1145 <span class="lineNum" id="container268"><a name="268"></a><a href="#268" id="line268"> 268</a> </span> : *
1146 <span class="lineNum" id="container269"><a name="269"></a><a href="#269" id="line269"> 269</a> </span> : * @return void
1147 <span class="lineNum" id="container270"><a name="270"></a><a href="#270" id="line270"> 270</a> </span> : */
1148 <span class="lineNum" id="container271"><a name="271"></a><a href="#271" id="line271"> 271</a> </span> : private function __construct()
1149 <span class="lineNum" id="container272"><a name="272"></a><a href="#272" id="line272"> 272</a> </span> : {
1150 <span class="lineNum" id="container273"><a name="273"></a><a href="#273" id="line273"> 273</a> </span><span class="lineCov"> 1 : ActiveMongo::addEvent('before_query', array($this, 'QueryRead')); </span>
1151 <span class="lineNum" id="container274"><a name="274"></a><a href="#274" id="line274"> 274</a> </span><span class="lineCov"> 1 : ActiveMongo::addEvent('after_query', array($this, 'QuerySave')); </span>
1152 <span class="lineNum" id="container275"><a name="275"></a><a href="#275" id="line275"> 275</a> </span><span class="lineCov"> 1 : ActiveMongo::addEvent('after_create', array($this, 'UpdateDocumentHook')); </span>
1153 <span class="lineNum" id="container276"><a name="276"></a><a href="#276" id="line276"> 276</a> </span><span class="lineCov"> 1 : ActiveMongo::addEvent('after_update', array($this, 'UpdateDocumentHook')); </span>
1154 <span class="lineNum" id="container277"><a name="277"></a><a href="#277" id="line277"> 277</a> </span><span class="lineCov"> 1 : } </span>
1155 <span class="lineNum" id="container278"><a name="278"></a><a href="#278" id="line278"> 278</a> </span> : // }}}
1156 <span class="lineNum" id="container279"><a name="279"></a><a href="#279" id="line279"> 279</a> </span> :
1157 <span class="lineNum" id="container280"><a name="280"></a><a href="#280" id="line280"> 280</a> </span> : // Init() {{{
1158 <span class="lineNum" id="container281"><a name="281"></a><a href="#281" id="line281"> 281</a> </span> : /**
1159 <span class="lineNum" id="container282"><a name="282"></a><a href="#282" id="line282"> 282</a> </span> : * Initialize the Cache system, this is done
1160 <span class="lineNum" id="container283"><a name="283"></a><a href="#283" id="line283"> 283</a> </span> : * automatically.
1161 <span class="lineNum" id="container284"><a name="284"></a><a href="#284" id="line284"> 284</a> </span> : *
1162 <span class="lineNum" id="container285"><a name="285"></a><a href="#285" id="line285"> 285</a> </span> : * @return void
1163 <span class="lineNum" id="container286"><a name="286"></a><a href="#286" id="line286"> 286</a> </span> : */
1164 <span class="lineNum" id="container287"><a name="287"></a><a href="#287" id="line287"> 287</a> </span> : public static function Init()
1165 <span class="lineNum" id="container288"><a name="288"></a><a href="#288" id="line288"> 288</a> </span> : {
1166 <span class="lineNum" id="container289"><a name="289"></a><a href="#289" id="line289"> 289</a> </span><span class="lineCov"> 4 : if (self::$instance) { </span>
1167 <span class="lineNum" id="container290"><a name="290"></a><a href="#290" id="line290"> 290</a> </span><span class="lineCov"> 3 : return; </span>
1168 <span class="lineNum" id="container291"><a name="291"></a><a href="#291" id="line291"> 291</a> </span><span class="lineDeadCode"> : } </span>
1169 <span class="lineNum" id="container292"><a name="292"></a><a href="#292" id="line292"> 292</a> </span><span class="lineCov"> 1 : self::$instance = new ActiveMongo_Cache; </span>
1170 <span class="lineNum" id="container293"><a name="293"></a><a href="#293" id="line293"> 293</a> </span><span class="lineCov"> 1 : } </span>
1171 <span class="lineNum" id="container294"><a name="294"></a><a href="#294" id="line294"> 294</a> </span> : // }}}
1172 <span class="lineNum" id="container295"><a name="295"></a><a href="#295" id="line295"> 295</a> </span> :
1173 <span class="lineNum" id="container296"><a name="296"></a><a href="#296" id="line296"> 296</a> </span> : // setDriver(CacheDriver $driver) {{{
1174 <span class="lineNum" id="container297"><a name="297"></a><a href="#297" id="line297"> 297</a> </span> : /**
1175 <span class="lineNum" id="container298"><a name="298"></a><a href="#298" id="line298"> 298</a> </span> : * Set the CacheDriver object that will be used
1176 <span class="lineNum" id="container299"><a name="299"></a><a href="#299" id="line299"> 299</a> </span> : * to cache object, must be a sub-class of CacheDriver
1177 <span class="lineNum" id="container300"><a name="300"></a><a href="#300" id="line300"> 300</a> </span> : *
1178 <span class="lineNum" id="container301"><a name="301"></a><a href="#301" id="line301"> 301</a> </span> : * @param CacheDriver $driver
1179 <span class="lineNum" id="container302"><a name="302"></a><a href="#302" id="line302"> 302</a> </span> : *
1180 <span class="lineNum" id="container303"><a name="303"></a><a href="#303" id="line303"> 303</a> </span> : * @return void
1181 <span class="lineNum" id="container304"><a name="304"></a><a href="#304" id="line304"> 304</a> </span> : */
1182 <span class="lineNum" id="container305"><a name="305"></a><a href="#305" id="line305"> 305</a> </span> : public static function setDriver(CacheDriver $driver)
1183 <span class="lineNum" id="container306"><a name="306"></a><a href="#306" id="line306"> 306</a> </span> : {
1184 <span class="lineNum" id="container307"><a name="307"></a><a href="#307" id="line307"> 307</a> </span><span class="lineCov"> 2 : self::Init(); </span>
1185 <span class="lineNum" id="container308"><a name="308"></a><a href="#308" id="line308"> 308</a> </span><span class="lineCov"> 2 : self::$instance-&gt;driver = &amp;$driver; </span>
1186 <span class="lineNum" id="container309"><a name="309"></a><a href="#309" id="line309"> 309</a> </span><span class="lineCov"> 2 : self::$instance-&gt;driver_enabled = FALSE; </span>
1187 <span class="lineNum" id="container310"><a name="310"></a><a href="#310" id="line310"> 310</a> </span> :
1188 <span class="lineNum" id="container311"><a name="311"></a><a href="#311" id="line311"> 311</a> </span><span class="lineCov"> 2 : } </span>
1189 <span class="lineNum" id="container312"><a name="312"></a><a href="#312" id="line312"> 312</a> </span> : // }}}
1190 <span class="lineNum" id="container313"><a name="313"></a><a href="#313" id="line313"> 313</a> </span> :
1191 <span class="lineNum" id="container314"><a name="314"></a><a href="#314" id="line314"> 314</a> </span> : // enable() {{{
1192 <span class="lineNum" id="container315"><a name="315"></a><a href="#315" id="line315"> 315</a> </span> : /**
1193 <span class="lineNum" id="container316"><a name="316"></a><a href="#316" id="line316"> 316</a> </span> : * Enable the cache for all classes, even those
1194 <span class="lineNum" id="container317"><a name="317"></a><a href="#317" id="line317"> 317</a> </span> : * which does not has the state property $cacheable
1195 <span class="lineNum" id="container318"><a name="318"></a><a href="#318" id="line318"> 318</a> </span> : *
1196 <span class="lineNum" id="container319"><a name="319"></a><a href="#319" id="line319"> 319</a> </span> : * @return void
1197 <span class="lineNum" id="container320"><a name="320"></a><a href="#320" id="line320"> 320</a> </span> : */
1198 <span class="lineNum" id="container321"><a name="321"></a><a href="#321" id="line321"> 321</a> </span> : public static function enable()
1199 <span class="lineNum" id="container322"><a name="322"></a><a href="#322" id="line322"> 322</a> </span> : {
1200 <span class="lineNum" id="container323"><a name="323"></a><a href="#323" id="line323"> 323</a> </span><span class="lineNoCov"> 0 : self::Init(); </span>
1201 <span class="lineNum" id="container324"><a name="324"></a><a href="#324" id="line324"> 324</a> </span><span class="lineNoCov"> 0 : self::$instance-&gt;enabled = TRUE; </span>
1202 <span class="lineNum" id="container325"><a name="325"></a><a href="#325" id="line325"> 325</a> </span><span class="lineNoCov"> 0 : } </span>
1203 <span class="lineNum" id="container326"><a name="326"></a><a href="#326" id="line326"> 326</a> </span> : // }}}
1204 <span class="lineNum" id="container327"><a name="327"></a><a href="#327" id="line327"> 327</a> </span> :
1205 <span class="lineNum" id="container328"><a name="328"></a><a href="#328" id="line328"> 328</a> </span> : // config($name, $value) {{{
1206 <span class="lineNum" id="container329"><a name="329"></a><a href="#329" id="line329"> 329</a> </span> : /**
1207 <span class="lineNum" id="container330"><a name="330"></a><a href="#330" id="line330"> 330</a> </span> : * Pass a configuration to the cache driver
1208 <span class="lineNum" id="container331"><a name="331"></a><a href="#331" id="line331"> 331</a> </span> : *
1209 <span class="lineNum" id="container332"><a name="332"></a><a href="#332" id="line332"> 332</a> </span> : * @return mixed
1210 <span class="lineNum" id="container333"><a name="333"></a><a href="#333" id="line333"> 333</a> </span> : */
1211 <span class="lineNum" id="container334"><a name="334"></a><a href="#334" id="line334"> 334</a> </span> : public static function config($name, $value)
1212 <span class="lineNum" id="container335"><a name="335"></a><a href="#335" id="line335"> 335</a> </span> : {
1213 <span class="lineNum" id="container336"><a name="336"></a><a href="#336" id="line336"> 336</a> </span><span class="lineCov"> 1 : self::Init(); </span>
1214 <span class="lineNum" id="container337"><a name="337"></a><a href="#337" id="line337"> 337</a> </span><span class="lineCov"> 1 : $self = self::$instance; </span>
1215 <span class="lineNum" id="container338"><a name="338"></a><a href="#338" id="line338"> 338</a> </span><span class="lineCov"> 1 : if (!$self-&gt;driver) { </span>
1216 <span class="lineNum" id="container339"><a name="339"></a><a href="#339" id="line339"> 339</a> </span><span class="lineNoCov"> 0 : return FALSE; </span>
1217 <span class="lineNum" id="container340"><a name="340"></a><a href="#340" id="line340"> 340</a> </span><span class="lineDeadCode"> : } </span>
1218 <span class="lineNum" id="container341"><a name="341"></a><a href="#341" id="line341"> 341</a> </span><span class="lineCov"> 1 : return $self-&gt;driver-&gt;config($name, $value); </span>
1219 <span class="lineNum" id="container342"><a name="342"></a><a href="#342" id="line342"> 342</a> </span><span class="lineDeadCode"> : } </span>
1220 <span class="lineNum" id="container343"><a name="343"></a><a href="#343" id="line343"> 343</a> </span> : // }}}
1221 <span class="lineNum" id="container344"><a name="344"></a><a href="#344" id="line344"> 344</a> </span> :
1222 <span class="lineNum" id="container345"><a name="345"></a><a href="#345" id="line345"> 345</a> </span> : // cacheFailed() {{{
1223 <span class="lineNum" id="container346"><a name="346"></a><a href="#346" id="line346"> 346</a> </span> : /**
1224 <span class="lineNum" id="container347"><a name="347"></a><a href="#347" id="line347"> 347</a> </span> : * Tell to ActiveMongo_Cache that the driver cache failed
1225 <span class="lineNum" id="container348"><a name="348"></a><a href="#348" id="line348"> 348</a> </span> : * (it throwed some exception). Currently it is disabled
1226 <span class="lineNum" id="container349"><a name="349"></a><a href="#349" id="line349"> 349</a> </span> : * temporarily, in the future it might have a threshold
1227 <span class="lineNum" id="container350"><a name="350"></a><a href="#350" id="line350"> 350</a> </span> : * of error and then disable permanently for the request.
1228 <span class="lineNum" id="container351"><a name="351"></a><a href="#351" id="line351"> 351</a> </span> : *
1229 <span class="lineNum" id="container352"><a name="352"></a><a href="#352" id="line352"> 352</a> </span> : * @return void
1230 <span class="lineNum" id="container353"><a name="353"></a><a href="#353" id="line353"> 353</a> </span> : */
1231 <span class="lineNum" id="container354"><a name="354"></a><a href="#354" id="line354"> 354</a> </span> : function cacheFailed()
1232 <span class="lineNum" id="container355"><a name="355"></a><a href="#355" id="line355"> 355</a> </span> : {
1233 <span class="lineNum" id="container356"><a name="356"></a><a href="#356" id="line356"> 356</a> </span> : /* something went wrong, disable the cache */
1234 <span class="lineNum" id="container357"><a name="357"></a><a href="#357" id="line357"> 357</a> </span> : /* temporarily */
1235 <span class="lineNum" id="container358"><a name="358"></a><a href="#358" id="line358"> 358</a> </span><span class="lineNoCov"> 0 : $this-&gt;driver_enabled = FALSE; </span>
1236 <span class="lineNum" id="container359"><a name="359"></a><a href="#359" id="line359"> 359</a> </span><span class="lineNoCov"> 0 : } </span>
1237 <span class="lineNum" id="container360"><a name="360"></a><a href="#360" id="line360"> 360</a> </span> : // }}}
1238 <span class="lineNum" id="container361"><a name="361"></a><a href="#361" id="line361"> 361</a> </span> :
1239 <span class="lineNum" id="container362"><a name="362"></a><a href="#362" id="line362"> 362</a> </span> : // disable() {{{
1240 <span class="lineNum" id="container363"><a name="363"></a><a href="#363" id="line363"> 363</a> </span> : /**
1241 <span class="lineNum" id="container364"><a name="364"></a><a href="#364" id="line364"> 364</a> </span> : * Disable the cache for all classes, except those
1242 <span class="lineNum" id="container365"><a name="365"></a><a href="#365" id="line365"> 365</a> </span> : * which has the state property $cacheable =TRUE
1243 <span class="lineNum" id="container366"><a name="366"></a><a href="#366" id="line366"> 366</a> </span> : *
1244 <span class="lineNum" id="container367"><a name="367"></a><a href="#367" id="line367"> 367</a> </span> : * @return void
1245 <span class="lineNum" id="container368"><a name="368"></a><a href="#368" id="line368"> 368</a> </span> : */
1246 <span class="lineNum" id="container369"><a name="369"></a><a href="#369" id="line369"> 369</a> </span> : public static function disable()
1247 <span class="lineNum" id="container370"><a name="370"></a><a href="#370" id="line370"> 370</a> </span> : {
1248 <span class="lineNum" id="container371"><a name="371"></a><a href="#371" id="line371"> 371</a> </span><span class="lineNoCov"> 0 : self::Init(); </span>
1249 <span class="lineNum" id="container372"><a name="372"></a><a href="#372" id="line372"> 372</a> </span><span class="lineNoCov"> 0 : self::$instance-&gt;enabled = FALSE; </span>
1250 <span class="lineNum" id="container373"><a name="373"></a><a href="#373" id="line373"> 373</a> </span><span class="lineNoCov"> 0 : } </span>
1251 <span class="lineNum" id="container374"><a name="374"></a><a href="#374" id="line374"> 374</a> </span> : // }}}
1252 <span class="lineNum" id="container375"><a name="375"></a><a href="#375" id="line375"> 375</a> </span> :
1253 <span class="lineNum" id="container376"><a name="376"></a><a href="#376" id="line376"> 376</a> </span> : // isDriverActived() {{{
1254 <span class="lineNum" id="container377"><a name="377"></a><a href="#377" id="line377"> 377</a> </span> : /**
1255 <span class="lineNum" id="container378"><a name="378"></a><a href="#378" id="line378"> 378</a> </span> : * Check if it has a cache driver and
1256 <span class="lineNum" id="container379"><a name="379"></a><a href="#379" id="line379"> 379</a> </span> : * if it is valid.
1257 <span class="lineNum" id="container380"><a name="380"></a><a href="#380" id="line380"> 380</a> </span> : *
1258 <span class="lineNum" id="container381"><a name="381"></a><a href="#381" id="line381"> 381</a> </span> : * @return bool
1259 <span class="lineNum" id="container382"><a name="382"></a><a href="#382" id="line382"> 382</a> </span> : */
1260 <span class="lineNum" id="container383"><a name="383"></a><a href="#383" id="line383"> 383</a> </span> : static function isDriverActived()
1261 <span class="lineNum" id="container384"><a name="384"></a><a href="#384" id="line384"> 384</a> </span> : {
1262 <span class="lineNum" id="container385"><a name="385"></a><a href="#385" id="line385"> 385</a> </span><span class="lineCov"> 1 : self::Init(); </span>
1263 <span class="lineNum" id="container386"><a name="386"></a><a href="#386" id="line386"> 386</a> </span><span class="lineCov"> 1 : $self = self::$instance; </span>
1264 <span class="lineNum" id="container387"><a name="387"></a><a href="#387" id="line387"> 387</a> </span><span class="lineCov"> 1 : if (!$self-&gt;driver InstanceOf CacheDriver) { </span>
1265 <span class="lineNum" id="container388"><a name="388"></a><a href="#388" id="line388"> 388</a> </span><span class="lineNoCov"> 0 : return FALSE; </span>
1266 <span class="lineNum" id="container389"><a name="389"></a><a href="#389" id="line389"> 389</a> </span><span class="lineDeadCode"> : } </span>
1267 <span class="lineNum" id="container390"><a name="390"></a><a href="#390" id="line390"> 390</a> </span><span class="lineCov"> 1 : if (!$self-&gt;driver_enabled &amp;&amp; !$self-&gt;driver-&gt;isEnabled()) { </span>
1268 <span class="lineNum" id="container391"><a name="391"></a><a href="#391" id="line391"> 391</a> </span><span class="lineNoCov"> 0 : return FALSE; </span>
1269 <span class="lineNum" id="container392"><a name="392"></a><a href="#392" id="line392"> 392</a> </span><span class="lineDeadCode"> : } </span>
1270 <span class="lineNum" id="container393"><a name="393"></a><a href="#393" id="line393"> 393</a> </span><span class="lineCov"> 1 : $self-&gt;_driver_enabled = TRUE; </span>
1271 <span class="lineNum" id="container394"><a name="394"></a><a href="#394" id="line394"> 394</a> </span><span class="lineCov"> 1 : return TRUE; </span>
1272 <span class="lineNum" id="container395"><a name="395"></a><a href="#395" id="line395"> 395</a> </span><span class="lineDeadCode"> : } </span>
1273 <span class="lineNum" id="container396"><a name="396"></a><a href="#396" id="line396"> 396</a> </span> : // }}}
1274 <span class="lineNum" id="container397"><a name="397"></a><a href="#397" id="line397"> 397</a> </span> :
1275 <span class="lineNum" id="container398"><a name="398"></a><a href="#398" id="line398"> 398</a> </span> : // flushCache() {{{
1276 <span class="lineNum" id="container399"><a name="399"></a><a href="#399" id="line399"> 399</a> </span> : /**
1277 <span class="lineNum" id="container400"><a name="400"></a><a href="#400" id="line400"> 400</a> </span> : * Delete all the cache content, I can't figureout
1278 <span class="lineNum" id="container401"><a name="401"></a><a href="#401" id="line401"> 401</a> </span> : * how this can be useful, but I'm using for testing :-)
1279 <span class="lineNum" id="container402"><a name="402"></a><a href="#402" id="line402"> 402</a> </span> : *
1280 <span class="lineNum" id="container403"><a name="403"></a><a href="#403" id="line403"> 403</a> </span> : */
1281 <span class="lineNum" id="container404"><a name="404"></a><a href="#404" id="line404"> 404</a> </span> : static function flushCache()
1282 <span class="lineNum" id="container405"><a name="405"></a><a href="#405" id="line405"> 405</a> </span> : {
1283 <span class="lineNum" id="container406"><a name="406"></a><a href="#406" id="line406"> 406</a> </span><span class="lineCov"> 1 : self::Init(); </span>
1284 <span class="lineNum" id="container407"><a name="407"></a><a href="#407" id="line407"> 407</a> </span><span class="lineCov"> 1 : $self = self::$instance; </span>
1285 <span class="lineNum" id="container408"><a name="408"></a><a href="#408" id="line408"> 408</a> </span><span class="lineCov"> 1 : if (!$self-&gt;driver InstanceOf CacheDriver) { </span>
1286 <span class="lineNum" id="container409"><a name="409"></a><a href="#409" id="line409"> 409</a> </span><span class="lineNoCov"> 0 : return FALSE; </span>
1287 <span class="lineNum" id="container410"><a name="410"></a><a href="#410" id="line410"> 410</a> </span><span class="lineDeadCode"> : } </span>
1288 <span class="lineNum" id="container411"><a name="411"></a><a href="#411" id="line411"> 411</a> </span><span class="lineCov"> 1 : if (!$self-&gt;driver_enabled &amp;&amp; !$self-&gt;driver-&gt;isEnabled()) { </span>
1289 <span class="lineNum" id="container412"><a name="412"></a><a href="#412" id="line412"> 412</a> </span><span class="lineNoCov"> 0 : return FALSE; </span>
1290 <span class="lineNum" id="container413"><a name="413"></a><a href="#413" id="line413"> 413</a> </span><span class="lineDeadCode"> : } </span>
1291 <span class="lineNum" id="container414"><a name="414"></a><a href="#414" id="line414"> 414</a> </span><span class="lineCov"> 1 : $self-&gt;driver-&gt;flush(); </span>
1292 <span class="lineNum" id="container415"><a name="415"></a><a href="#415" id="line415"> 415</a> </span><span class="lineCov"> 1 : } </span>
1293 <span class="lineNum" id="container416"><a name="416"></a><a href="#416" id="line416"> 416</a> </span> : // }}}
1294 <span class="lineNum" id="container417"><a name="417"></a><a href="#417" id="line417"> 417</a> </span> :
1295 <span class="lineNum" id="container418"><a name="418"></a><a href="#418" id="line418"> 418</a> </span> : // canUseCache($class) {{{
1296 <span class="lineNum" id="container419"><a name="419"></a><a href="#419" id="line419"> 419</a> </span> : /**
1297 <span class="lineNum" id="container420"><a name="420"></a><a href="#420" id="line420"> 420</a> </span> : * Return TRUE is the current query
1298 <span class="lineNum" id="container421"><a name="421"></a><a href="#421" id="line421"> 421</a> </span> : * can use a cache.
1299 <span class="lineNum" id="container422"><a name="422"></a><a href="#422" id="line422"> 422</a> </span> : *
1300 <span class="lineNum" id="container423"><a name="423"></a><a href="#423" id="line423"> 423</a> </span> : * @param string $class Class name
1301 <span class="lineNum" id="container424"><a name="424"></a><a href="#424" id="line424"> 424</a> </span> : *
1302 <span class="lineNum" id="container425"><a name="425"></a><a href="#425" id="line425"> 425</a> </span> : * @return bool
1303 <span class="lineNum" id="container426"><a name="426"></a><a href="#426" id="line426"> 426</a> </span> : */
1304 <span class="lineNum" id="container427"><a name="427"></a><a href="#427" id="line427"> 427</a> </span> : final protected function canUseCache($class)
1305 <span class="lineNum" id="container428"><a name="428"></a><a href="#428" id="line428"> 428</a> </span> : {
1306 <span class="lineNum" id="container429"><a name="429"></a><a href="#429" id="line429"> 429</a> </span><span class="lineCov"> 6 : if (!$this-&gt;driver InstanceOf CacheDriver) { </span>
1307 <span class="lineNum" id="container430"><a name="430"></a><a href="#430" id="line430"> 430</a> </span><span class="lineNoCov"> 0 : return FALSE; </span>
1308 <span class="lineNum" id="container431"><a name="431"></a><a href="#431" id="line431"> 431</a> </span><span class="lineDeadCode"> : } </span>
1309 <span class="lineNum" id="container432"><a name="432"></a><a href="#432" id="line432"> 432</a> </span><span class="lineCov"> 6 : if (!$this-&gt;driver_enabled) { </span>
1310 <span class="lineNum" id="container433"><a name="433"></a><a href="#433" id="line433"> 433</a> </span><span class="lineCov"> 2 : $enabled = $this-&gt;driver-&gt;isEnabled(); </span>
1311 <span class="lineNum" id="container434"><a name="434"></a><a href="#434" id="line434"> 434</a> </span><span class="lineCov"> 2 : if (!$enabled) { </span>
1312 <span class="lineNum" id="container435"><a name="435"></a><a href="#435" id="line435"> 435</a> </span><span class="lineNoCov"> 0 : return FALSE; </span>
1313 <span class="lineNum" id="container436"><a name="436"></a><a href="#436" id="line436"> 436</a> </span><span class="lineDeadCode"> : } </span>
1314 <span class="lineNum" id="container437"><a name="437"></a><a href="#437" id="line437"> 437</a> </span><span class="lineCov"> 2 : $this-&gt;driver_enabled = TRUE; </span>
1315 <span class="lineNum" id="container438"><a name="438"></a><a href="#438" id="line438"> 438</a> </span><span class="lineCov"> 2 : } </span>
1316 <span class="lineNum" id="container439"><a name="439"></a><a href="#439" id="line439"> 439</a> </span><span class="lineCov"> 6 : $enable = isset_static_variable($class, 'cacheable') ? get_static_variable($class, 'cacheable') : $this-&gt;enabled;</span>
1317 <span class="lineNum" id="container440"><a name="440"></a><a href="#440" id="line440"> 440</a> </span><span class="lineCov"> 6 : return $enable; </span>
1318 <span class="lineNum" id="container441"><a name="441"></a><a href="#441" id="line441"> 441</a> </span><span class="lineDeadCode"> : } </span>
1319 <span class="lineNum" id="container442"><a name="442"></a><a href="#442" id="line442"> 442</a> </span> : // }}}
1320 <span class="lineNum" id="container443"><a name="443"></a><a href="#443" id="line443"> 443</a> </span> :
1321 <span class="lineNum" id="container444"><a name="444"></a><a href="#444" id="line444"> 444</a> </span> : // getQueryID(Array $query_docuement) {{{
1322 <span class="lineNum" id="container445"><a name="445"></a><a href="#445" id="line445"> 445</a> </span> : /**
1323 <span class="lineNum" id="container446"><a name="446"></a><a href="#446" id="line446"> 446</a> </span> : * Get a ID from a given query, right now it is very
1324 <span class="lineNum" id="container447"><a name="447"></a><a href="#447" id="line447"> 447</a> </span> : * simple, it serialize the query document, it should
1325 <span class="lineNum" id="container448"><a name="448"></a><a href="#448" id="line448"> 448</a> </span> : * be improved to easily delete old queries
1326 <span class="lineNum" id="container449"><a name="449"></a><a href="#449" id="line449"> 449</a> </span> : *
1327 <span class="lineNum" id="container450"><a name="450"></a><a href="#450" id="line450"> 450</a> </span> : * @param array $query_document
1328 <span class="lineNum" id="container451"><a name="451"></a><a href="#451" id="line451"> 451</a> </span> : *
1329 <span class="lineNum" id="container452"><a name="452"></a><a href="#452" id="line452"> 452</a> </span> : * @return string
1330 <span class="lineNum" id="container453"><a name="453"></a><a href="#453" id="line453"> 453</a> </span> : */
1331 <span class="lineNum" id="container454"><a name="454"></a><a href="#454" id="line454"> 454</a> </span> : final protected function getQueryID($query_document)
1332 <span class="lineNum" id="container455"><a name="455"></a><a href="#455" id="line455"> 455</a> </span> : {
1333 <span class="lineNum" id="container456"><a name="456"></a><a href="#456" id="line456"> 456</a> </span> : /* TODO: Peform some sort of sorting */
1334 <span class="lineNum" id="container457"><a name="457"></a><a href="#457" id="line457"> 457</a> </span> : /* to treat queries with same parameters but */
1335 <span class="lineNum" id="container458"><a name="458"></a><a href="#458" id="line458"> 458</a> </span> : /* different order equal */
1336 <span class="lineNum" id="container459"><a name="459"></a><a href="#459" id="line459"> 459</a> </span> :
1337 <span class="lineNum" id="container460"><a name="460"></a><a href="#460" id="line460"> 460</a> </span><span class="lineCov"> 6 : $id = $this-&gt;driver-&gt;serialize($query_document); </span>
1338 <span class="lineNum" id="container461"><a name="461"></a><a href="#461" id="line461"> 461</a> </span> :
1339 <span class="lineNum" id="container462"><a name="462"></a><a href="#462" id="line462"> 462</a> </span><span class="lineCov"> 6 : return sha1($id); </span>
1340 <span class="lineNum" id="container463"><a name="463"></a><a href="#463" id="line463"> 463</a> </span><span class="lineDeadCode"> : } </span>
1341 <span class="lineNum" id="container464"><a name="464"></a><a href="#464" id="line464"> 464</a> </span> : // }}}
1342 <span class="lineNum" id="container465"><a name="465"></a><a href="#465" id="line465"> 465</a> </span> :
1343 <span class="lineNum" id="container466"><a name="466"></a><a href="#466" id="line466"> 466</a> </span> : // deleteObject($id) {{{
1344 <span class="lineNum" id="container467"><a name="467"></a><a href="#467" id="line467"> 467</a> </span> : /**
1345 <span class="lineNum" id="container468"><a name="468"></a><a href="#468" id="line468"> 468</a> </span> : * Delete an object from the cache by its $id
1346 <span class="lineNum" id="container469"><a name="469"></a><a href="#469" id="line469"> 469</a> </span> : *
1347 <span class="lineNum" id="container470"><a name="470"></a><a href="#470" id="line470"> 470</a> </span> : * @return void
1348 <span class="lineNum" id="container471"><a name="471"></a><a href="#471" id="line471"> 471</a> </span> : */
1349 <span class="lineNum" id="container472"><a name="472"></a><a href="#472" id="line472"> 472</a> </span> : final static function deleteObject($id)
1350 <span class="lineNum" id="container473"><a name="473"></a><a href="#473" id="line473"> 473</a> </span> : {
1351 <span class="lineNum" id="container474"><a name="474"></a><a href="#474" id="line474"> 474</a> </span><span class="lineCov"> 2 : self::Init(); </span>
1352 <span class="lineNum" id="container475"><a name="475"></a><a href="#475" id="line475"> 475</a> </span><span class="lineCov"> 2 : $self = self::$instance; </span>
1353 <span class="lineNum" id="container476"><a name="476"></a><a href="#476" id="line476"> 476</a> </span><span class="lineCov"> 2 : $self-&gt;driver-&gt;delete(array((string)$id)); </span>
1354 <span class="lineNum" id="container477"><a name="477"></a><a href="#477" id="line477"> 477</a> </span><span class="lineCov"> 2 : } </span>
1355 <span class="lineNum" id="container478"><a name="478"></a><a href="#478" id="line478"> 478</a> </span> : // }}}
1356 <span class="lineNum" id="container479"><a name="479"></a><a href="#479" id="line479"> 479</a> </span> :
1357 <span class="lineNum" id="container480"><a name="480"></a><a href="#480" id="line480"> 480</a> </span> : // mixed getObject($id) {{{
1358 <span class="lineNum" id="container481"><a name="481"></a><a href="#481" id="line481"> 481</a> </span> : /**
1359 <span class="lineNum" id="container482"><a name="482"></a><a href="#482" id="line482"> 482</a> </span> : * Return an object from the cache, if it doesn't
1360 <span class="lineNum" id="container483"><a name="483"></a><a href="#483" id="line483"> 483</a> </span> : * exists it would return FALSE
1361 <span class="lineNum" id="container484"><a name="484"></a><a href="#484" id="line484"> 484</a> </span> : *
1362 <span class="lineNum" id="container485"><a name="485"></a><a href="#485" id="line485"> 485</a> </span> : * @param mixed $id
1363 <span class="lineNum" id="container486"><a name="486"></a><a href="#486" id="line486"> 486</a> </span> : * @return mixed $object
1364 <span class="lineNum" id="container487"><a name="487"></a><a href="#487" id="line487"> 487</a> </span> : *
1365 <span class="lineNum" id="container488"><a name="488"></a><a href="#488" id="line488"> 488</a> </span> : */
1366 <span class="lineNum" id="container489"><a name="489"></a><a href="#489" id="line489"> 489</a> </span> : final static function getObject($id)
1367 <span class="lineNum" id="container490"><a name="490"></a><a href="#490" id="line490"> 490</a> </span> : {
1368 <span class="lineNum" id="container491"><a name="491"></a><a href="#491" id="line491"> 491</a> </span><span class="lineCov"> 2 : self::Init(); </span>
1369 <span class="lineNum" id="container492"><a name="492"></a><a href="#492" id="line492"> 492</a> </span><span class="lineCov"> 2 : $self = self::$instance; </span>
1370 <span class="lineNum" id="container493"><a name="493"></a><a href="#493" id="line493"> 493</a> </span><span class="lineCov"> 2 : if (!$self-&gt;driver) { </span>
1371 <span class="lineNum" id="container494"><a name="494"></a><a href="#494" id="line494"> 494</a> </span><span class="lineNoCov"> 0 : return FALSE; </span>
1372 <span class="lineNum" id="container495"><a name="495"></a><a href="#495" id="line495"> 495</a> </span><span class="lineDeadCode"> : } </span>
1373 <span class="lineNum" id="container496"><a name="496"></a><a href="#496" id="line496"> 496</a> </span><span class="lineCov"> 2 : $object = FALSE; </span>
1374 <span class="lineNum" id="container497"><a name="497"></a><a href="#497" id="line497"> 497</a> </span><span class="lineCov"> 2 : $self-&gt;driver-&gt;get((string)$id, $object); </span>
1375 <span class="lineNum" id="container498"><a name="498"></a><a href="#498" id="line498"> 498</a> </span> :
1376 <span class="lineNum" id="container499"><a name="499"></a><a href="#499" id="line499"> 499</a> </span><span class="lineCov"> 2 : return $object; </span>
1377 <span class="lineNum" id="container500"><a name="500"></a><a href="#500" id="line500"> 500</a> </span><span class="lineDeadCode"> : } </span>
1378 <span class="lineNum" id="container501"><a name="501"></a><a href="#501" id="line501"> 501</a> </span> : // }}}
1379 <span class="lineNum" id="container502"><a name="502"></a><a href="#502" id="line502"> 502</a> </span> :
1380 <span class="lineNum" id="container503"><a name="503"></a><a href="#503" id="line503"> 503</a> </span> : // QueryRead($class, $query_document, &amp;$resultset, $use_cache=TRUE){{{
1381 <span class="lineNum" id="container504"><a name="504"></a><a href="#504" id="line504"> 504</a> </span> : /**
1382 <span class="lineNum" id="container505"><a name="505"></a><a href="#505" id="line505"> 505</a> </span> : * Return the resultset for the current query from the cache if the
1383 <span class="lineNum" id="container506"><a name="506"></a><a href="#506" id="line506"> 506</a> </span> : * cache is enabled, if the current query can be cacheable and if
1384 <span class="lineNum" id="container507"><a name="507"></a><a href="#507" id="line507"> 507</a> </span> : * it already exists on cache.
1385 <span class="lineNum" id="container508"><a name="508"></a><a href="#508" id="line508"> 508</a> </span> : *
1386 <span class="lineNum" id="container509"><a name="509"></a><a href="#509" id="line509"> 509</a> </span> : * @param string $class Class name
1387 <span class="lineNum" id="container510"><a name="510"></a><a href="#510" id="line510"> 510</a> </span> : * @param array $query_document Query sent to mongodb
1388 <span class="lineNum" id="container511"><a name="511"></a><a href="#511" id="line511"> 511</a> </span> : * @param array &amp;$resultset The resultset
1389 <span class="lineNum" id="container512"><a name="512"></a><a href="#512" id="line512"> 512</a> </span> : * @param bool $use_cache True if cache can be used
1390 <span class="lineNum" id="container513"><a name="513"></a><a href="#513" id="line513"> 513</a> </span> : *
1391 <span class="lineNum" id="container514"><a name="514"></a><a href="#514" id="line514"> 514</a> </span> : *
1392 <span class="lineNum" id="container515"><a name="515"></a><a href="#515" id="line515"> 515</a> </span> : * @return mixed FALSE or NULL
1393 <span class="lineNum" id="container516"><a name="516"></a><a href="#516" id="line516"> 516</a> </span> : */
1394 <span class="lineNum" id="container517"><a name="517"></a><a href="#517" id="line517"> 517</a> </span> : function QueryRead($class, $query_document, &amp;$resultset, $use_cache=TRUE)
1395 <span class="lineNum" id="container518"><a name="518"></a><a href="#518" id="line518"> 518</a> </span> : {
1396 <span class="lineNum" id="container519"><a name="519"></a><a href="#519" id="line519"> 519</a> </span><span class="lineCov"> 6 : if (!$this-&gt;canUseCache($class) || !$use_cache) { </span>
1397 <span class="lineNum" id="container520"><a name="520"></a><a href="#520" id="line520"> 520</a> </span><span class="lineCov"> 3 : return; </span>
1398 <span class="lineNum" id="container521"><a name="521"></a><a href="#521" id="line521"> 521</a> </span><span class="lineDeadCode"> : } </span>
1399 <span class="lineNum" id="container522"><a name="522"></a><a href="#522" id="line522"> 522</a> </span> : try {
1400 <span class="lineNum" id="container523"><a name="523"></a><a href="#523" id="line523"> 523</a> </span> :
1401 <span class="lineNum" id="container524"><a name="524"></a><a href="#524" id="line524"> 524</a> </span><span class="lineCov"> 6 : $query_id = $this-&gt;getQueryID($query_document); </span>
1402 <span class="lineNum" id="container525"><a name="525"></a><a href="#525" id="line525"> 525</a> </span><span class="lineCov"> 6 : if ($this-&gt;driver-&gt;get($query_id, $query_result) === FALSE) { </span>
1403 <span class="lineNum" id="container526"><a name="526"></a><a href="#526" id="line526"> 526</a> </span><span class="lineCov"> 3 : return; </span>
1404 <span class="lineNum" id="container527"><a name="527"></a><a href="#527" id="line527"> 527</a> </span><span class="lineDeadCode"> : } </span>
1405 <span class="lineNum" id="container528"><a name="528"></a><a href="#528" id="line528"> 528</a> </span> :
1406 <span class="lineNum" id="container529"><a name="529"></a><a href="#529" id="line529"> 529</a> </span><span class="lineCov"> 6 : if (!is_array($query_result) || count($query_result) == 0) { </span>
1407 <span class="lineNum" id="container530"><a name="530"></a><a href="#530" id="line530"> 530</a> </span><span class="lineNoCov"> 0 : return; </span>
1408 <span class="lineNum" id="container531"><a name="531"></a><a href="#531" id="line531"> 531</a> </span><span class="lineDeadCode"> : } </span>
1409 <span class="lineNum" id="container532"><a name="532"></a><a href="#532" id="line532"> 532</a> </span> :
1410 <span class="lineNum" id="container533"><a name="533"></a><a href="#533" id="line533"> 533</a> </span><span class="lineCov"> 6 : $toquery = array(); </span>
1411 <span class="lineNum" id="container534"><a name="534"></a><a href="#534" id="line534"> 534</a> </span><span class="lineCov"> 6 : $result = array(); </span>
1412 <span class="lineNum" id="container535"><a name="535"></a><a href="#535" id="line535"> 535</a> </span> :
1413 <span class="lineNum" id="container536"><a name="536"></a><a href="#536" id="line536"> 536</a> </span><span class="lineCov"> 6 : $cache_ids = array_combine(array_keys($query_result), array_keys($query_result)); </span>
1414 <span class="lineNum" id="container537"><a name="537"></a><a href="#537" id="line537"> 537</a> </span> :
1415 <span class="lineNum" id="container538"><a name="538"></a><a href="#538" id="line538"> 538</a> </span><span class="lineCov"> 6 : $this-&gt;driver-&gt;getMulti($cache_ids, $result); </span>
1416 <span class="lineNum" id="container539"><a name="539"></a><a href="#539" id="line539"> 539</a> </span> :
1417 <span class="lineNum" id="container540"><a name="540"></a><a href="#540" id="line540"> 540</a> </span><span class="lineCov"> 6 : foreach ($result as $id =&gt; $doc) { </span>
1418 <span class="lineNum" id="container541"><a name="541"></a><a href="#541" id="line541"> 541</a> </span><span class="lineCov"> 6 : if (!is_array($doc)) { </span>
1419 <span class="lineNum" id="container542"><a name="542"></a><a href="#542" id="line542"> 542</a> </span><span class="lineCov"> 2 : $toquery[$id] = $query_result[$id]; </span>
1420 <span class="lineNum" id="container543"><a name="543"></a><a href="#543" id="line543"> 543</a> </span><span class="lineCov"> 2 : } </span>
1421 <span class="lineNum" id="container544"><a name="544"></a><a href="#544" id="line544"> 544</a> </span><span class="lineCov"> 6 : } </span>
1422 <span class="lineNum" id="container545"><a name="545"></a><a href="#545" id="line545"> 545</a> </span> :
1423 <span class="lineNum" id="container546"><a name="546"></a><a href="#546" id="line546"> 546</a> </span><span class="lineCov"> 6 : if (count($toquery) &gt; 0) { </span>
1424 <span class="lineNum" id="container547"><a name="547"></a><a href="#547" id="line547"> 547</a> </span><span class="lineCov"> 2 : $db = new $class; </span>
1425 <span class="lineNum" id="container548"><a name="548"></a><a href="#548" id="line548"> 548</a> </span><span class="lineCov"> 2 : $db-&gt;where('_id IN', array_values($toquery)); </span>
1426 <span class="lineNum" id="container549"><a name="549"></a><a href="#549" id="line549"> 549</a> </span><span class="lineCov"> 2 : $db-&gt;doQuery(FALSE); </span>
1427 <span class="lineNum" id="container550"><a name="550"></a><a href="#550" id="line550"> 550</a> </span><span class="lineCov"> 2 : $dresult = array(); </span>
1428 <span class="lineNum" id="container551"><a name="551"></a><a href="#551" id="line551"> 551</a> </span><span class="lineCov"> 2 : foreach ($db as $doc) { </span>
1429 <span class="lineNum" id="container552"><a name="552"></a><a href="#552" id="line552"> 552</a> </span><span class="lineCov"> 2 : $dresult[$doc-&gt;key()] = $doc-&gt;getArray(); </span>
1430 <span class="lineNum" id="container553"><a name="553"></a><a href="#553" id="line553"> 553</a> </span><span class="lineCov"> 2 : } </span>
1431 <span class="lineNum" id="container554"><a name="554"></a><a href="#554" id="line554"> 554</a> </span><span class="lineCov"> 2 : $this-&gt;driver-&gt;setMulti($dresult, array()); </span>
1432 <span class="lineNum" id="container555"><a name="555"></a><a href="#555" id="line555"> 555</a> </span><span class="lineCov"> 2 : $result = array_merge($result, $dresult); </span>
1433 <span class="lineNum" id="container556"><a name="556"></a><a href="#556" id="line556"> 556</a> </span><span class="lineCov"> 2 : } </span>
1434 <span class="lineNum" id="container557"><a name="557"></a><a href="#557" id="line557"> 557</a> </span> :
1435 <span class="lineNum" id="container558"><a name="558"></a><a href="#558" id="line558"> 558</a> </span> :
1436 <span class="lineNum" id="container559"><a name="559"></a><a href="#559" id="line559"> 559</a> </span><span class="lineCov"> 6 : $resultset = new CacheCursor($result); </span>
1437 <span class="lineNum" id="container560"><a name="560"></a><a href="#560" id="line560"> 560</a> </span> :
1438 <span class="lineNum" id="container561"><a name="561"></a><a href="#561" id="line561"> 561</a> </span><span class="lineCov"> 6 : } catch (Exception $e) { </span>
1439 <span class="lineNum" id="container562"><a name="562"></a><a href="#562" id="line562"> 562</a> </span> : /* If any goes wrong it shouldn't interupt the current query */
1440 <span class="lineNum" id="container563"><a name="563"></a><a href="#563" id="line563"> 563</a> </span><span class="lineDeadCode"> : $this-&gt;cacheFailed(); </span>
1441 <span class="lineNum" id="container564"><a name="564"></a><a href="#564" id="line564"> 564</a> </span><span class="lineDeadCode"> : $resultset = NULL; </span>
1442 <span class="lineNum" id="container565"><a name="565"></a><a href="#565" id="line565"> 565</a> </span> : }
1443 <span class="lineNum" id="container566"><a name="566"></a><a href="#566" id="line566"> 566</a> </span> :
1444 <span class="lineNum" id="container567"><a name="567"></a><a href="#567" id="line567"> 567</a> </span> : /* Return FALSE to prevent the execution of
1445 <span class="lineNum" id="container568"><a name="568"></a><a href="#568" id="line568"> 568</a> </span> : * any hook similar hook
1446 <span class="lineNum" id="container569"><a name="569"></a><a href="#569" id="line569"> 569</a> </span> : */
1447 <span class="lineNum" id="container570"><a name="570"></a><a href="#570" id="line570"> 570</a> </span><span class="lineCov"> 6 : return FALSE; </span>
1448 <span class="lineNum" id="container571"><a name="571"></a><a href="#571" id="line571"> 571</a> </span><span class="lineDeadCode"> : } </span>
1449 <span class="lineNum" id="container572"><a name="572"></a><a href="#572" id="line572"> 572</a> </span> : // }}}
1450 <span class="lineNum" id="container573"><a name="573"></a><a href="#573" id="line573"> 573</a> </span> :
1451 <span class="lineNum" id="container574"><a name="574"></a><a href="#574" id="line574"> 574</a> </span> : // QuerySave($class, $query_document, $cursor) {{{
1452 <span class="lineNum" id="container575"><a name="575"></a><a href="#575" id="line575"> 575</a> </span> : /**
1453 <span class="lineNum" id="container576"><a name="576"></a><a href="#576" id="line576"> 576</a> </span> : * Save the current resultset into the cache
1454 <span class="lineNum" id="container577"><a name="577"></a><a href="#577" id="line577"> 577</a> </span> : *
1455 <span class="lineNum" id="container578"><a name="578"></a><a href="#578" id="line578"> 578</a> </span> : * @param string $class
1456 <span class="lineNum" id="container579"><a name="579"></a><a href="#579" id="line579"> 579</a> </span> : * @param array $query_document
1457 <span class="lineNum" id="container580"><a name="580"></a><a href="#580" id="line580"> 580</a> </span> : * @param MongoCursor $cursor
1458 <span class="lineNum" id="container581"><a name="581"></a><a href="#581" id="line581"> 581</a> </span> : *
1459 <span class="lineNum" id="container582"><a name="582"></a><a href="#582" id="line582"> 582</a> </span> : * @return void
1460 <span class="lineNum" id="container583"><a name="583"></a><a href="#583" id="line583"> 583</a> </span> : */
1461 <span class="lineNum" id="container584"><a name="584"></a><a href="#584" id="line584"> 584</a> </span> : function QuerySave($class, $query_document, $cursor)
1462 <span class="lineNum" id="container585"><a name="585"></a><a href="#585" id="line585"> 585</a> </span> : {
1463 <span class="lineNum" id="container586"><a name="586"></a><a href="#586" id="line586"> 586</a> </span><span class="lineCov"> 5 : if (!$this-&gt;canUseCache($class)) { </span>
1464 <span class="lineNum" id="container587"><a name="587"></a><a href="#587" id="line587"> 587</a> </span><span class="lineNoCov"> 0 : return; </span>
1465 <span class="lineNum" id="container588"><a name="588"></a><a href="#588" id="line588"> 588</a> </span><span class="lineDeadCode"> : } </span>
1466 <span class="lineNum" id="container589"><a name="589"></a><a href="#589" id="line589"> 589</a> </span> :
1467 <span class="lineNum" id="container590"><a name="590"></a><a href="#590" id="line590"> 590</a> </span><span class="lineCov"> 5 : $query_id = $this-&gt;getQueryID($query_document); </span>
1468 <span class="lineNum" id="container591"><a name="591"></a><a href="#591" id="line591"> 591</a> </span><span class="lineCov"> 5 : $ids = array(); </span>
1469 <span class="lineNum" id="container592"><a name="592"></a><a href="#592" id="line592"> 592</a> </span><span class="lineCov"> 5 : $ttl = array(); </span>
1470 <span class="lineNum" id="container593"><a name="593"></a><a href="#593" id="line593"> 593</a> </span><span class="lineCov"> 5 : $docs = array(); </span>
1471 <span class="lineNum" id="container594"><a name="594"></a><a href="#594" id="line594"> 594</a> </span> :
1472 <span class="lineNum" id="container595"><a name="595"></a><a href="#595" id="line595"> 595</a> </span> : try {
1473 <span class="lineNum" id="container596"><a name="596"></a><a href="#596" id="line596"> 596</a> </span><span class="lineCov"> 5 : foreach ($cursor as $id=&gt;$document) { </span>
1474 <span class="lineNum" id="container597"><a name="597"></a><a href="#597" id="line597"> 597</a> </span><span class="lineCov"> 5 : $ids[$id] = $document['_id']; </span>
1475 <span class="lineNum" id="container598"><a name="598"></a><a href="#598" id="line598"> 598</a> </span><span class="lineCov"> 5 : $docs[$id] = $document; </span>
1476 <span class="lineNum" id="container599"><a name="599"></a><a href="#599" id="line599"> 599</a> </span><span class="lineCov"> 5 : $ttl[$id] = 3600; </span>
1477 <span class="lineNum" id="container600"><a name="600"></a><a href="#600" id="line600"> 600</a> </span><span class="lineCov"> 5 : } </span>
1478 <span class="lineNum" id="container601"><a name="601"></a><a href="#601" id="line601"> 601</a> </span><span class="lineCov"> 5 : $this-&gt;driver-&gt;setMulti($docs, $ttl); </span>
1479 <span class="lineNum" id="container602"><a name="602"></a><a href="#602" id="line602"> 602</a> </span><span class="lineCov"> 5 : $this-&gt;driver-&gt;set($query_id, $ids, 3600); </span>
1480 <span class="lineNum" id="container603"><a name="603"></a><a href="#603" id="line603"> 603</a> </span><span class="lineCov"> 5 : } catch (Exception $e) { </span>
1481 <span class="lineNum" id="container604"><a name="604"></a><a href="#604" id="line604"> 604</a> </span><span class="lineDeadCode"> : $this-&gt;cacheFailed(); </span>
1482 <span class="lineNum" id="container605"><a name="605"></a><a href="#605" id="line605"> 605</a> </span> : }
1483 <span class="lineNum" id="container606"><a name="606"></a><a href="#606" id="line606"> 606</a> </span> :
1484 <span class="lineNum" id="container607"><a name="607"></a><a href="#607" id="line607"> 607</a> </span><span class="lineCov"> 5 : } </span>
1485 <span class="lineNum" id="container608"><a name="608"></a><a href="#608" id="line608"> 608</a> </span> : // }}}
1486 <span class="lineNum" id="container609"><a name="609"></a><a href="#609" id="line609"> 609</a> </span> :
1487 <span class="lineNum" id="container610"><a name="610"></a><a href="#610" id="line610"> 610</a> </span> : // UpdateDocumentHook($class, $document, $obj) {{{
1488 <span class="lineNum" id="container611"><a name="611"></a><a href="#611" id="line611"> 611</a> </span> : /**
1489 <span class="lineNum" id="container612"><a name="612"></a><a href="#612" id="line612"> 612</a> </span> : * Update Hook
1490 <span class="lineNum" id="container613"><a name="613"></a><a href="#613" id="line613"> 613</a> </span> : *
1491 <span class="lineNum" id="container614"><a name="614"></a><a href="#614" id="line614"> 614</a> </span> : * Save or Replace an object (document)
1492 <span class="lineNum" id="container615"><a name="615"></a><a href="#615" id="line615"> 615</a> </span> : * into the cache.
1493 <span class="lineNum" id="container616"><a name="616"></a><a href="#616" id="line616"> 616</a> </span> : *
1494 <span class="lineNum" id="container617"><a name="617"></a><a href="#617" id="line617"> 617</a> </span> : * @param string $class Class name
1495 <span class="lineNum" id="container618"><a name="618"></a><a href="#618" id="line618"> 618</a> </span> : * @param object $document Document sent to mongodb
1496 <span class="lineNum" id="container619"><a name="619"></a><a href="#619" id="line619"> 619</a> </span> : * @param object $obj ActiveMongo Object
1497 <span class="lineNum" id="container620"><a name="620"></a><a href="#620" id="line620"> 620</a> </span> : *
1498 <span class="lineNum" id="container621"><a name="621"></a><a href="#621" id="line621"> 621</a> </span> : * @return NULL
1499 <span class="lineNum" id="container622"><a name="622"></a><a href="#622" id="line622"> 622</a> </span> : */
1500 <span class="lineNum" id="container623"><a name="623"></a><a href="#623" id="line623"> 623</a> </span> : function UpdateDocumentHook($class, $document, $obj)
1501 <span class="lineNum" id="container624"><a name="624"></a><a href="#624" id="line624"> 624</a> </span> : {
1502 <span class="lineNum" id="container625"><a name="625"></a><a href="#625" id="line625"> 625</a> </span><span class="lineCov"> 5 : if (!$this-&gt;canUseCache($class)) { </span>
1503 <span class="lineNum" id="container626"><a name="626"></a><a href="#626" id="line626"> 626</a> </span><span class="lineNoCov"> 0 : return; </span>
1504 <span class="lineNum" id="container627"><a name="627"></a><a href="#627" id="line627"> 627</a> </span><span class="lineDeadCode"> : } </span>
1505 <span class="lineNum" id="container628"><a name="628"></a><a href="#628" id="line628"> 628</a> </span> :
1506 <span class="lineNum" id="container629"><a name="629"></a><a href="#629" id="line629"> 629</a> </span><span class="lineCov"> 5 : if (!isset($obj['_id'])) { </span>
1507 <span class="lineNum" id="container630"><a name="630"></a><a href="#630" id="line630"> 630</a> </span><span class="lineCov"> 4 : if (!isset($document['_id'])) { </span>
1508 <span class="lineNum" id="container631"><a name="631"></a><a href="#631" id="line631"> 631</a> </span><span class="lineNoCov"> 0 : return; /* Weird condition */ </span>
1509 <span class="lineNum" id="container632"><a name="632"></a><a href="#632" id="line632"> 632</a> </span><span class="lineDeadCode"> : } </span>
1510 <span class="lineNum" id="container633"><a name="633"></a><a href="#633" id="line633"> 633</a> </span><span class="lineCov"> 4 : $obj['_id'] = $document['_id']; </span>
1511 <span class="lineNum" id="container634"><a name="634"></a><a href="#634" id="line634"> 634</a> </span><span class="lineCov"> 4 : } </span>
1512 <span class="lineNum" id="container635"><a name="635"></a><a href="#635" id="line635"> 635</a> </span> :
1513 <span class="lineNum" id="container636"><a name="636"></a><a href="#636" id="line636"> 636</a> </span> : try {
1514 <span class="lineNum" id="container637"><a name="637"></a><a href="#637" id="line637"> 637</a> </span><span class="lineCov"> 5 : $this-&gt;driver-&gt;set((string)$obj['_id'], $obj, 3600); </span>
1515 <span class="lineNum" id="container638"><a name="638"></a><a href="#638" id="line638"> 638</a> </span><span class="lineCov"> 5 : } catch (Exception $e) { </span>
1516 <span class="lineNum" id="container639"><a name="639"></a><a href="#639" id="line639"> 639</a> </span><span class="lineDeadCode"> : $this-&gt;cacheFailed(); </span>
1517 <span class="lineNum" id="container640"><a name="640"></a><a href="#640" id="line640"> 640</a> </span> : }
1518 <span class="lineNum" id="container641"><a name="641"></a><a href="#641" id="line641"> 641</a> </span><span class="lineCov"> 5 : } </span>
1519 <span class="lineNum" id="container642"><a name="642"></a><a href="#642" id="line642"> 642</a> </span> : // }}}
1520 <span class="lineNum" id="container643"><a name="643"></a><a href="#643" id="line643"> 643</a> </span> :
1521 <span class="lineNum" id="container644"><a name="644"></a><a href="#644" id="line644"> 644</a> </span> : }
1522 <span class="lineNum" id="container645"><a name="645"></a><a href="#645" id="line645"> 645</a> </span> :
1523 <span class="lineNum" id="container646"><a name="646"></a><a href="#646" id="line646"> 646</a> </span> : /*
1524 <span class="lineNum" id="container647"><a name="647"></a><a href="#647" id="line647"> 647</a> </span> : * Local variables:
1525 <span class="lineNum" id="container648"><a name="648"></a><a href="#648" id="line648"> 648</a> </span> : * tab-width: 4
1526 <span class="lineNum" id="container649"><a name="649"></a><a href="#649" id="line649"> 649</a> </span> : * c-basic-offset: 4
1527 <span class="lineNum" id="container650"><a name="650"></a><a href="#650" id="line650"> 650</a> </span> : * End:
1528 <span class="lineNum" id="container651"><a name="651"></a><a href="#651" id="line651"> 651</a> </span> : * vim600: sw=4 ts=4 fdm=marker
1529 <span class="lineNum" id="container652"><a name="652"></a><a href="#652" id="line652"> 652</a> </span> : * vim&lt;600: sw=4 ts=4
1530 <span class="lineNum" id="container653"><a name="653"></a><a href="#653" id="line653"> 653</a> </span> : */
1532 </pre>
1533 </td>
1534 </tr>
1535 </table>
1537 <table width="100%" border="0" cellspacing="0" cellpadding="0">
1538 <tr><td class="ruler"><img src="glass.png" width="3" height="3" alt=""></td></tr>
1539 <tr><td class="versionInfo">Generated by <a href="http://www.phpunit.de/" target="_top">PHPUnit 3.4.12</a> and <a href="http://www.xdebug.org/" target="_top">Xdebug 2.0.5</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.2</a> at Mon Jun 7 1:48:19 PYT 2010.</td></tr>
1540 </table>
1542 <br />
1544 <script type="text/javascript">
1545 //<![CDATA[
1546 $E = YAHOO.util.Event;
1547 YAHOO.namespace("phpunit.container");
1548 YAHOO.phpunit.container.panelsData = {
1549 "panel63": {
1550 "header": "6 tests cover line 63",
1551 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateCache</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1552 "footer": ""
1554 "panel64": {
1555 "header": "6 tests cover line 64",
1556 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateCache</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1557 "footer": ""
1559 "panel65": {
1560 "header": "6 tests cover line 65",
1561 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateCache</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1562 "footer": ""
1564 "panel66": {
1565 "header": "6 tests cover line 66",
1566 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateCache</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1567 "footer": ""
1569 "panel70": {
1570 "header": "6 tests cover line 70",
1571 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateCache</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1572 "footer": ""
1574 "panel71": {
1575 "header": "6 tests cover line 71",
1576 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateCache</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1577 "footer": ""
1579 "panel80": {
1580 "header": "2 tests cover line 80",
1581 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1582 "footer": ""
1584 "panel81": {
1585 "header": "2 tests cover line 81",
1586 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1587 "footer": ""
1589 "panel83": {
1590 "header": "2 tests cover line 83",
1591 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1592 "footer": ""
1594 "panel88": {
1595 "header": "6 tests cover line 88",
1596 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateCache</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1597 "footer": ""
1599 "panel89": {
1600 "header": "6 tests cover line 89",
1601 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateCache</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1602 "footer": ""
1604 "panel93": {
1605 "header": "4 tests cover line 93",
1606 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateCache</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1607 "footer": ""
1609 "panel98": {
1610 "header": "6 tests cover line 98",
1611 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateCache</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1612 "footer": ""
1614 "panel99": {
1615 "header": "6 tests cover line 99",
1616 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateCache</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1617 "footer": ""
1619 "panel100": {
1620 "header": "6 tests cover line 100",
1621 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateCache</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1622 "footer": ""
1624 "panel104": {
1625 "header": "6 tests cover line 104",
1626 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateCache</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1627 "footer": ""
1629 "panel105": {
1630 "header": "6 tests cover line 105",
1631 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateCache</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1632 "footer": ""
1634 "panel110": {
1635 "header": "4 tests cover line 110",
1636 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateCache</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1637 "footer": ""
1639 "panel140": {
1640 "header": "6 tests cover line 140",
1641 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateCache</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1642 "footer": ""
1644 "panel152": {
1645 "header": "5 tests cover line 152",
1646 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateCache</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li></ul>",
1647 "footer": ""
1649 "panel172": {
1650 "header": "5 tests cover line 172",
1651 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateCache</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li></ul>",
1652 "footer": ""
1654 "panel173": {
1655 "header": "5 tests cover line 173",
1656 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateCache</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li></ul>",
1657 "footer": ""
1659 "panel174": {
1660 "header": "1 test covers line 174",
1661 "body": "<ul><li class=\"testPassed\">CacheTest::testFetchFromCache</li></ul>",
1662 "footer": ""
1664 "panel175": {
1665 "header": "1 test covers line 175",
1666 "body": "<ul><li class=\"testPassed\">CacheTest::testFetchFromCache</li></ul>",
1667 "footer": ""
1669 "panel176": {
1670 "header": "5 tests cover line 176",
1671 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateCache</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li></ul>",
1672 "footer": ""
1674 "panel177": {
1675 "header": "5 tests cover line 177",
1676 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateCache</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li></ul>",
1677 "footer": ""
1679 "panel196": {
1680 "header": "4 tests cover line 196",
1681 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li></ul>",
1682 "footer": ""
1684 "panel197": {
1685 "header": "4 tests cover line 197",
1686 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li></ul>",
1687 "footer": ""
1689 "panel198": {
1690 "header": "1 test covers line 198",
1691 "body": "<ul><li class=\"testPassed\">CacheTest::testFetchFromCache</li></ul>",
1692 "footer": ""
1694 "panel199": {
1695 "header": "1 test covers line 199",
1696 "body": "<ul><li class=\"testPassed\">CacheTest::testFetchFromCache</li></ul>",
1697 "footer": ""
1699 "panel200": {
1700 "header": "4 tests cover line 200",
1701 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li></ul>",
1702 "footer": ""
1704 "panel201": {
1705 "header": "4 tests cover line 201",
1706 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li></ul>",
1707 "footer": ""
1709 "panel202": {
1710 "header": "4 tests cover line 202",
1711 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li></ul>",
1712 "footer": ""
1714 "panel222": {
1715 "header": "1 test covers line 222",
1716 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li></ul>",
1717 "footer": ""
1719 "panel273": {
1720 "header": "1 test covers line 273",
1721 "body": "<ul><li class=\"testPassed\">CacheTest::testInit</li></ul>",
1722 "footer": ""
1724 "panel274": {
1725 "header": "1 test covers line 274",
1726 "body": "<ul><li class=\"testPassed\">CacheTest::testInit</li></ul>",
1727 "footer": ""
1729 "panel275": {
1730 "header": "1 test covers line 275",
1731 "body": "<ul><li class=\"testPassed\">CacheTest::testInit</li></ul>",
1732 "footer": ""
1734 "panel276": {
1735 "header": "1 test covers line 276",
1736 "body": "<ul><li class=\"testPassed\">CacheTest::testInit</li></ul>",
1737 "footer": ""
1739 "panel277": {
1740 "header": "1 test covers line 277",
1741 "body": "<ul><li class=\"testPassed\">CacheTest::testInit</li></ul>",
1742 "footer": ""
1744 "panel289": {
1745 "header": "4 tests cover line 289",
1746 "body": "<ul><li class=\"testPassed\">CacheTest::testInit</li><li class=\"testPassed\">CacheTest::testCacheDriverConfig</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1747 "footer": ""
1749 "panel290": {
1750 "header": "3 tests cover line 290",
1751 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheDriverConfig</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1752 "footer": ""
1754 "panel292": {
1755 "header": "1 test covers line 292",
1756 "body": "<ul><li class=\"testPassed\">CacheTest::testInit</li></ul>",
1757 "footer": ""
1759 "panel293": {
1760 "header": "1 test covers line 293",
1761 "body": "<ul><li class=\"testPassed\">CacheTest::testInit</li></ul>",
1762 "footer": ""
1764 "panel307": {
1765 "header": "2 tests cover line 307",
1766 "body": "<ul><li class=\"testPassed\">CacheTest::testInit</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1767 "footer": ""
1769 "panel308": {
1770 "header": "2 tests cover line 308",
1771 "body": "<ul><li class=\"testPassed\">CacheTest::testInit</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1772 "footer": ""
1774 "panel309": {
1775 "header": "2 tests cover line 309",
1776 "body": "<ul><li class=\"testPassed\">CacheTest::testInit</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1777 "footer": ""
1779 "panel311": {
1780 "header": "2 tests cover line 311",
1781 "body": "<ul><li class=\"testPassed\">CacheTest::testInit</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1782 "footer": ""
1784 "panel336": {
1785 "header": "1 test covers line 336",
1786 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheDriverConfig</li></ul>",
1787 "footer": ""
1789 "panel337": {
1790 "header": "1 test covers line 337",
1791 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheDriverConfig</li></ul>",
1792 "footer": ""
1794 "panel338": {
1795 "header": "1 test covers line 338",
1796 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheDriverConfig</li></ul>",
1797 "footer": ""
1799 "panel341": {
1800 "header": "1 test covers line 341",
1801 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheDriverConfig</li></ul>",
1802 "footer": ""
1804 "panel385": {
1805 "header": "1 test covers line 385",
1806 "body": "<ul><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1807 "footer": ""
1809 "panel386": {
1810 "header": "1 test covers line 386",
1811 "body": "<ul><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1812 "footer": ""
1814 "panel387": {
1815 "header": "1 test covers line 387",
1816 "body": "<ul><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1817 "footer": ""
1819 "panel390": {
1820 "header": "1 test covers line 390",
1821 "body": "<ul><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1822 "footer": ""
1824 "panel393": {
1825 "header": "1 test covers line 393",
1826 "body": "<ul><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1827 "footer": ""
1829 "panel394": {
1830 "header": "1 test covers line 394",
1831 "body": "<ul><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1832 "footer": ""
1834 "panel406": {
1835 "header": "1 test covers line 406",
1836 "body": "<ul><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1837 "footer": ""
1839 "panel407": {
1840 "header": "1 test covers line 407",
1841 "body": "<ul><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1842 "footer": ""
1844 "panel408": {
1845 "header": "1 test covers line 408",
1846 "body": "<ul><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1847 "footer": ""
1849 "panel411": {
1850 "header": "1 test covers line 411",
1851 "body": "<ul><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1852 "footer": ""
1854 "panel414": {
1855 "header": "1 test covers line 414",
1856 "body": "<ul><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1857 "footer": ""
1859 "panel415": {
1860 "header": "1 test covers line 415",
1861 "body": "<ul><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1862 "footer": ""
1864 "panel429": {
1865 "header": "6 tests cover line 429",
1866 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateCache</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1867 "footer": ""
1869 "panel432": {
1870 "header": "6 tests cover line 432",
1871 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateCache</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1872 "footer": ""
1874 "panel433": {
1875 "header": "2 tests cover line 433",
1876 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1877 "footer": ""
1879 "panel434": {
1880 "header": "2 tests cover line 434",
1881 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1882 "footer": ""
1884 "panel437": {
1885 "header": "2 tests cover line 437",
1886 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1887 "footer": ""
1889 "panel438": {
1890 "header": "2 tests cover line 438",
1891 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1892 "footer": ""
1894 "panel439": {
1895 "header": "6 tests cover line 439",
1896 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateCache</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1897 "footer": ""
1899 "panel440": {
1900 "header": "6 tests cover line 440",
1901 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateCache</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1902 "footer": ""
1904 "panel460": {
1905 "header": "6 tests cover line 460",
1906 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateCache</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1907 "footer": ""
1909 "panel462": {
1910 "header": "6 tests cover line 462",
1911 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateCache</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1912 "footer": ""
1914 "panel474": {
1915 "header": "2 tests cover line 474",
1916 "body": "<ul><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1917 "footer": ""
1919 "panel475": {
1920 "header": "2 tests cover line 475",
1921 "body": "<ul><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1922 "footer": ""
1924 "panel476": {
1925 "header": "2 tests cover line 476",
1926 "body": "<ul><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1927 "footer": ""
1929 "panel477": {
1930 "header": "2 tests cover line 477",
1931 "body": "<ul><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1932 "footer": ""
1934 "panel491": {
1935 "header": "2 tests cover line 491",
1936 "body": "<ul><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1937 "footer": ""
1939 "panel492": {
1940 "header": "2 tests cover line 492",
1941 "body": "<ul><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1942 "footer": ""
1944 "panel493": {
1945 "header": "2 tests cover line 493",
1946 "body": "<ul><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1947 "footer": ""
1949 "panel496": {
1950 "header": "2 tests cover line 496",
1951 "body": "<ul><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1952 "footer": ""
1954 "panel497": {
1955 "header": "2 tests cover line 497",
1956 "body": "<ul><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1957 "footer": ""
1959 "panel499": {
1960 "header": "2 tests cover line 499",
1961 "body": "<ul><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1962 "footer": ""
1964 "panel519": {
1965 "header": "6 tests cover line 519",
1966 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateCache</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1967 "footer": ""
1969 "panel520": {
1970 "header": "3 tests cover line 520",
1971 "body": "<ul><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1972 "footer": ""
1974 "panel524": {
1975 "header": "6 tests cover line 524",
1976 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateCache</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1977 "footer": ""
1979 "panel525": {
1980 "header": "6 tests cover line 525",
1981 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateCache</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1982 "footer": ""
1984 "panel526": {
1985 "header": "3 tests cover line 526",
1986 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1987 "footer": ""
1989 "panel529": {
1990 "header": "6 tests cover line 529",
1991 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateCache</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1992 "footer": ""
1994 "panel533": {
1995 "header": "6 tests cover line 533",
1996 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateCache</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
1997 "footer": ""
1999 "panel534": {
2000 "header": "6 tests cover line 534",
2001 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateCache</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
2002 "footer": ""
2004 "panel536": {
2005 "header": "6 tests cover line 536",
2006 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateCache</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
2007 "footer": ""
2009 "panel538": {
2010 "header": "6 tests cover line 538",
2011 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateCache</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
2012 "footer": ""
2014 "panel540": {
2015 "header": "6 tests cover line 540",
2016 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateCache</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
2017 "footer": ""
2019 "panel541": {
2020 "header": "6 tests cover line 541",
2021 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateCache</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
2022 "footer": ""
2024 "panel542": {
2025 "header": "2 tests cover line 542",
2026 "body": "<ul><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
2027 "footer": ""
2029 "panel543": {
2030 "header": "2 tests cover line 543",
2031 "body": "<ul><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
2032 "footer": ""
2034 "panel544": {
2035 "header": "6 tests cover line 544",
2036 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateCache</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
2037 "footer": ""
2039 "panel546": {
2040 "header": "6 tests cover line 546",
2041 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateCache</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
2042 "footer": ""
2044 "panel547": {
2045 "header": "2 tests cover line 547",
2046 "body": "<ul><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
2047 "footer": ""
2049 "panel548": {
2050 "header": "2 tests cover line 548",
2051 "body": "<ul><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
2052 "footer": ""
2054 "panel549": {
2055 "header": "2 tests cover line 549",
2056 "body": "<ul><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
2057 "footer": ""
2059 "panel550": {
2060 "header": "2 tests cover line 550",
2061 "body": "<ul><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
2062 "footer": ""
2064 "panel551": {
2065 "header": "2 tests cover line 551",
2066 "body": "<ul><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
2067 "footer": ""
2069 "panel552": {
2070 "header": "2 tests cover line 552",
2071 "body": "<ul><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
2072 "footer": ""
2074 "panel553": {
2075 "header": "2 tests cover line 553",
2076 "body": "<ul><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
2077 "footer": ""
2079 "panel554": {
2080 "header": "2 tests cover line 554",
2081 "body": "<ul><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
2082 "footer": ""
2084 "panel555": {
2085 "header": "2 tests cover line 555",
2086 "body": "<ul><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
2087 "footer": ""
2089 "panel556": {
2090 "header": "2 tests cover line 556",
2091 "body": "<ul><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
2092 "footer": ""
2094 "panel559": {
2095 "header": "6 tests cover line 559",
2096 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateCache</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
2097 "footer": ""
2099 "panel561": {
2100 "header": "6 tests cover line 561",
2101 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateCache</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
2102 "footer": ""
2104 "panel570": {
2105 "header": "6 tests cover line 570",
2106 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateCache</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
2107 "footer": ""
2109 "panel586": {
2110 "header": "5 tests cover line 586",
2111 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
2112 "footer": ""
2114 "panel590": {
2115 "header": "5 tests cover line 590",
2116 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
2117 "footer": ""
2119 "panel591": {
2120 "header": "5 tests cover line 591",
2121 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
2122 "footer": ""
2124 "panel592": {
2125 "header": "5 tests cover line 592",
2126 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
2127 "footer": ""
2129 "panel593": {
2130 "header": "5 tests cover line 593",
2131 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
2132 "footer": ""
2134 "panel596": {
2135 "header": "5 tests cover line 596",
2136 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
2137 "footer": ""
2139 "panel597": {
2140 "header": "5 tests cover line 597",
2141 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
2142 "footer": ""
2144 "panel598": {
2145 "header": "5 tests cover line 598",
2146 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
2147 "footer": ""
2149 "panel599": {
2150 "header": "5 tests cover line 599",
2151 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
2152 "footer": ""
2154 "panel600": {
2155 "header": "5 tests cover line 600",
2156 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
2157 "footer": ""
2159 "panel601": {
2160 "header": "5 tests cover line 601",
2161 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
2162 "footer": ""
2164 "panel602": {
2165 "header": "5 tests cover line 602",
2166 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
2167 "footer": ""
2169 "panel603": {
2170 "header": "5 tests cover line 603",
2171 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
2172 "footer": ""
2174 "panel607": {
2175 "header": "5 tests cover line 607",
2176 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testFetchFromCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
2177 "footer": ""
2179 "panel625": {
2180 "header": "5 tests cover line 625",
2181 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateCache</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
2182 "footer": ""
2184 "panel629": {
2185 "header": "5 tests cover line 629",
2186 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateCache</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
2187 "footer": ""
2189 "panel630": {
2190 "header": "4 tests cover line 630",
2191 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
2192 "footer": ""
2194 "panel633": {
2195 "header": "4 tests cover line 633",
2196 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
2197 "footer": ""
2199 "panel634": {
2200 "header": "4 tests cover line 634",
2201 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
2202 "footer": ""
2204 "panel637": {
2205 "header": "5 tests cover line 637",
2206 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateCache</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
2207 "footer": ""
2209 "panel638": {
2210 "header": "5 tests cover line 638",
2211 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateCache</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
2212 "footer": ""
2214 "panel641": {
2215 "header": "5 tests cover line 641",
2216 "body": "<ul><li class=\"testPassed\">CacheTest::testCacheSimple</li><li class=\"testPassed\">CacheTest::testCacheMultiple</li><li class=\"testPassed\">CacheTest::testUpdateCache</li><li class=\"testPassed\">CacheTest::testUpdateQueryCache</li><li class=\"testPassed\">CacheTest::testDrivers</li></ul>",
2217 "footer": ""
2219 "dummy": ""
2222 YAHOO.phpunit.container.prepare = function (e) {
2223 var elemId = $E.getTarget(e).id;
2224 var line = elemId.substr(4);
2225 var panelId = "panel" + line;
2226 var containerId = "container" + line;
2228 var panelData = YAHOO.phpunit.container.panelsData[panelId];
2230 var panel = new YAHOO.widget.Panel(panelId, { visible:false, draggable:false, close:true } );
2231 panel.setHeader(panelData["header"]);
2232 panel.setBody(panelData["body"]);
2233 panel.setFooter(panelData["footer"]);
2234 panel.render(containerId);
2236 $E.addListener(elemId, "click", panel.show, panel, true);
2237 $E.removeListener(elemId, "mouseover");
2240 function init() {
2241 var ypc = YAHOO.phpunit.container;
2242 for (var panelId in ypc.panelsData) {
2243 var elemId = "line" + panelId.substr(5);
2244 $E.addListener(elemId, "mouseover", ypc.prepare);
2248 $E.addListener(window, "load", init);
2249 //]]>
2250 </script>
2251 </body>
2252 </html>