Subversion Repositories Applications.framework

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
464 jpm 1
<!DOCTYPE html>
2
<html>
3
<head>
4
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5
	<meta name="generator" content="ApiGen 2.8.0">
6
 
7
	<title>Class CacheFichier | TBFramework - v0.4</title>
8
 
9
	<script type="text/javascript" src="resources/combined.js?4205936287"></script>
10
	<script type="text/javascript" src="elementlist.js?1964084359"></script>
11
	<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360">
12
 
13
</head>
14
 
15
<body>
16
<div id="left">
17
	<div id="menu">
18
		<a href="index.html" title="Overview"><span>Overview</span></a>
19
 
20
 
21
		<div id="groups">
22
			<h3>Packages</h3>
23
			<ul>
24
				<li><a href="package-Framework.html">Framework</a>
25
						</li>
26
				<li class="active"><a href="package-None.html">None</a>
27
						</li>
28
				<li><a href="package-PHP.html">PHP</a>
29
						</li>
30
				<li><a href="package-Utilitaire.html">Utilitaire</a>
31
						</li>
32
			</ul>
33
		</div>
34
 
35
		<hr>
36
 
37
 
38
		<div id="elements">
39
			<h3>Classes</h3>
40
			<ul>
41
				<li class="active"><a href="class-CacheFichier.html">CacheFichier</a></li>
42
				<li><a href="class-CacheSqlite.html">CacheSqlite</a></li>
43
				<li><a href="class-MonScript.html">MonScript</a></li>
44
			</ul>
45
 
46
 
47
 
48
 
49
 
50
		</div>
51
	</div>
52
</div>
53
 
54
<div id="splitter"></div>
55
 
56
<div id="right">
57
<div id="rightInner">
58
	<form id="search">
59
		<input type="hidden" name="cx" value="">
60
		<input type="hidden" name="ie" value="UTF-8">
61
		<input type="text" name="q" class="text">
62
		<input type="submit" value="Search">
63
	</form>
64
 
65
	<div id="navigation">
66
		<ul>
67
			<li>
68
				<a href="index.html" title="Overview"><span>Overview</span></a>
69
			</li>
70
			<li>
71
				<a href="package-None.html" title="Summary of None"><span>Package</span></a>
72
			</li>
73
			<li class="active">
74
<span>Class</span>			</li>
75
		</ul>
76
		<ul>
77
			<li>
78
				<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
79
			</li>
80
			<li>
81
				<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a>
82
			</li>
83
			<li>
84
				<a href="todo.html" title="Todo list"><span>Todo</span></a>
85
			</li>
86
		</ul>
87
		<ul>
88
		</ul>
89
	</div>
90
 
91
<div id="content" class="class">
92
	<h1>Class CacheFichier</h1>
93
 
94
 
95
 
96
 
97
 
98
 
99
 
100
 
101
 
102
 
103
 
104
	<div class="info">
105
 
106
 
107
 
108
 
109
 
110
		<b>Located at</b> <a href="source-class-CacheFichier.html#2-870" title="Go to source code">framework/CacheFichier.php</a><br>
111
	</div>
112
 
113
 
114
 
115
	<table class="summary" id="methods">
116
	<caption>Methods summary</caption>
117
	<tr data-order="__construct" id="___construct">
118
 
119
		<td class="attributes"><code>
120
			 public
121
 
122
 
123
			</code>
124
		</td>
125
 
126
		<td class="name"><div>
127
		<a class="anchor" href="#___construct">#</a>
128
		<code><a href="source-class-CacheFichier.html#73-101" title="Go to source code">__construct</a>( <span>array <var>$options</var> = <span class="php-keyword1">array</span>()</span>, <span><code><a href="class-Cache.html">Cache</a></code> <var>$cache</var></span> )</code>
129
 
130
		<div class="description short">
131
 
132
<p>Constructor</p>
133
 
134
		</div>
135
 
136
		<div class="description detailed hidden">
137
 
138
<p>Constructor</p>
139
 
140
 
141
 
142
				<h4>Parameters</h4>
143
				<div class="list"><dl>
144
					<dt><var>$options</var></dt>
145
					<dd><code>array</code><br>$options associative array of options</dd>
146
					<dt><var>$cache</var></dt>
147
					<dd></dd>
148
				</dl></div>
149
 
150
 
151
				<h4>Throws</h4>
152
				<div class="list">
153
					<code>Zend_Cache_Exception</code><br>
154
				</div>
155
 
156
 
157
 
158
		</div>
159
		</div></td>
160
	</tr>
161
	<tr data-order="setEmplacement" id="_setEmplacement">
162
 
163
		<td class="attributes"><code>
164
			 public
165
 
166
 
167
			</code>
168
		</td>
169
 
170
		<td class="name"><div>
171
		<a class="anchor" href="#_setEmplacement">#</a>
172
		<code><a href="source-class-CacheFichier.html#123-132" title="Go to source code">setEmplacement</a>( <span>mixed <var>$emplacement</var></span> )</code>
173
 
174
		<div class="description short">
175
 
176
		</div>
177
 
178
		<div class="description detailed hidden">
179
 
180
 
181
 
182
 
183
 
184
 
185
 
186
 
187
		</div>
188
		</div></td>
189
	</tr>
190
	<tr data-order="charger" id="_charger">
191
 
192
		<td class="attributes"><code>
193
			 public
194
			string|false
195
 
196
			</code>
197
		</td>
198
 
199
		<td class="name"><div>
200
		<a class="anchor" href="#_charger">#</a>
201
		<code><a href="source-class-CacheFichier.html#134-159" title="Go to source code">charger</a>( <span>string <var>$id</var></span>, <span>boolean <var>$ne_pas_tester_validiter_du_cache</var> = <span class="php-keyword1">false</span></span> )</code>
202
 
203
		<div class="description short">
204
 
205
<p>Test if a cache is available for the given id and (if yes) return it (false
206
else)</p>
207
 
208
		</div>
209
 
210
		<div class="description detailed hidden">
211
 
212
<p>Test if a cache is available for the given id and (if yes) return it (false
213
else)</p>
214
 
215
 
216
 
217
				<h4>Parameters</h4>
218
				<div class="list"><dl>
219
					<dt><var>$id</var></dt>
220
					<dd><code>string</code><br>$id cache id</dd>
221
					<dt><var>$ne_pas_tester_validiter_du_cache</var></dt>
222
					<dd><code>boolean</code><br>$doNotTestCacheValidity if set to true, the cache validity won't be tested</dd>
223
				</dl></div>
224
 
225
				<h4>Returns</h4>
226
				<div class="list">
227
					<code>string|false</code><br>cached datas<br>
228
				</div>
229
 
230
 
231
 
232
 
233
		</div>
234
		</div></td>
235
	</tr>
236
	<tr data-order="tester" id="_tester">
237
 
238
		<td class="attributes"><code>
239
			 public
240
			mixed
241
 
242
			</code>
243
		</td>
244
 
245
		<td class="name"><div>
246
		<a class="anchor" href="#_tester">#</a>
247
		<code><a href="source-class-CacheFichier.html#161-170" title="Go to source code">tester</a>( <span>string <var>$id</var></span> )</code>
248
 
249
		<div class="description short">
250
 
251
<p>Teste si un enregistrement en cache est disponible ou pas (pour l'id passé
252
en paramètre).</p>
253
 
254
		</div>
255
 
256
		<div class="description detailed hidden">
257
 
258
<p>Teste si un enregistrement en cache est disponible ou pas (pour l'id passé
259
en paramètre).</p>
260
 
261
 
262
 
263
				<h4>Parameters</h4>
264
				<div class="list"><dl>
265
					<dt><var>$id</var></dt>
266
					<dd><code>string</code><br>$id identifiant de cache.</dd>
267
				</dl></div>
268
 
269
				<h4>Returns</h4>
270
				<div class="list">
271
					<code>mixed</code><br>false (le cache n'est pas disponible) ou timestamp (int) "de dernière
272
modification" de l'enregistrement en cache<br>
273
				</div>
274
 
275
 
276
 
277
 
278
		</div>
279
		</div></td>
280
	</tr>
281
	<tr data-order="sauver" id="_sauver">
282
 
283
		<td class="attributes"><code>
284
			 public
285
			boolean
286
 
287
			</code>
288
		</td>
289
 
290
		<td class="name"><div>
291
		<a class="anchor" href="#_sauver">#</a>
292
		<code><a href="source-class-CacheFichier.html#172-221" title="Go to source code">sauver</a>( <span>string <var>$donnees</var></span>, <span>string <var>$id</var></span>, <span>array <var>$tags</var> = <span class="php-keyword1">array</span>()</span>, <span>integer <var>$duree_vie_specifique</var> = <span class="php-keyword1">false</span></span> )</code>
293
 
294
		<div class="description short">
295
 
296
<p>Save some string datas into a cache record</p>
297
 
298
		</div>
299
 
300
		<div class="description detailed hidden">
301
 
302
<p>Save some string datas into a cache record</p>
303
 
304
<p>Note : $data is always "string" (serialization is done by the core not by the
305
backend)</p>
306
 
307
 
308
 
309
				<h4>Parameters</h4>
310
				<div class="list"><dl>
311
					<dt><var>$donnees</var></dt>
312
					<dd><code>string</code><br>$data Datas to cache</dd>
313
					<dt><var>$id</var></dt>
314
					<dd><code>string</code><br>$id Cache id</dd>
315
					<dt><var>$tags</var></dt>
316
					<dd><code>array</code><br>$tags Array of strings, the cache record will be tagged by each string entry</dd>
317
					<dt><var>$duree_vie_specifique</var></dt>
318
					<dd><code>integer</code><br>$specificLifetime If != false, set a specific lifetime for this cache record
319
(null =&gt; infinite lifetime)</dd>
320
				</dl></div>
321
 
322
				<h4>Returns</h4>
323
				<div class="list">
324
					<code>boolean</code><br>true if no problem<br>
325
				</div>
326
 
327
 
328
 
329
 
330
		</div>
331
		</div></td>
332
	</tr>
333
	<tr data-order="supprimer" id="_supprimer">
334
 
335
		<td class="attributes"><code>
336
			 public
337
			boolean
338
 
339
			</code>
340
		</td>
341
 
342
		<td class="name"><div>
343
		<a class="anchor" href="#_supprimer">#</a>
344
		<code><a href="source-class-CacheFichier.html#223-234" title="Go to source code">supprimer</a>( <span>string <var>$id</var></span> )</code>
345
 
346
		<div class="description short">
347
 
348
<p>Remove a cache record</p>
349
 
350
		</div>
351
 
352
		<div class="description detailed hidden">
353
 
354
<p>Remove a cache record</p>
355
 
356
 
357
 
358
				<h4>Parameters</h4>
359
				<div class="list"><dl>
360
					<dt><var>$id</var></dt>
361
					<dd><code>string</code><br>$id cache id</dd>
362
				</dl></div>
363
 
364
				<h4>Returns</h4>
365
				<div class="list">
366
					<code>boolean</code><br>true if no problem<br>
367
				</div>
368
 
369
 
370
 
371
 
372
		</div>
373
		</div></td>
374
	</tr>
375
	<tr data-order="nettoyer" id="_nettoyer">
376
 
377
		<td class="attributes"><code>
378
			 public
379
			boolean
380
 
381
			</code>
382
		</td>
383
 
384
		<td class="name"><div>
385
		<a class="anchor" href="#_nettoyer">#</a>
386
		<code><a href="source-class-CacheFichier.html#236-257" title="Go to source code">nettoyer</a>( <span>string <var>$mode</var> = <code><a href="class-Cache.html#NETTOYAGE_MODE_TOUS">Cache::<b>NETTOYAGE_MODE_TOUS</b></a></code></span>, <span>tags <var>$tags</var> = <span class="php-keyword1">array</span>()</span> )</code>
387
 
388
		<div class="description short">
389
 
390
<p>Clean some cache records</p>
391
 
392
		</div>
393
 
394
		<div class="description detailed hidden">
395
 
396
<p>Clean some cache records</p>
397
 
398
<p>Available modes are : 'all' (default) =&gt; remove all cache entries ($tags
399
is not used) 'old' =&gt; remove too old cache entries ($tags is not used)
400
'matchingTag' =&gt; remove cache entries matching all given tags ($tags can be
401
an array of strings or a single string) 'notMatchingTag' =&gt; remove cache
402
entries not matching one of the given tags ($tags can be an array of strings or
403
a single string) 'matchingAnyTag' =&gt; remove cache entries matching any given
404
tags ($tags can be an array of strings or a single string)</p>
405
 
406
 
407
 
408
				<h4>Parameters</h4>
409
				<div class="list"><dl>
410
					<dt><var>$mode</var></dt>
411
					<dd><code>string</code><br>$mode clean mode</dd>
412
					<dt><var>$tags</var></dt>
413
					<dd><code>tags</code><br>array $tags array of tags</dd>
414
				</dl></div>
415
 
416
				<h4>Returns</h4>
417
				<div class="list">
418
					<code>boolean</code><br>true if no problem<br>
419
				</div>
420
 
421
 
422
 
423
 
424
		</div>
425
		</div></td>
426
	</tr>
427
	<tr data-order="getIds" id="_getIds">
428
 
429
		<td class="attributes"><code>
430
			 public
431
			array
432
 
433
			</code>
434
		</td>
435
 
436
		<td class="name"><div>
437
		<a class="anchor" href="#_getIds">#</a>
438
		<code><a href="source-class-CacheFichier.html#259-266" title="Go to source code">getIds</a>( )</code>
439
 
440
		<div class="description short">
441
 
442
<p>Return an array of stored cache ids</p>
443
 
444
		</div>
445
 
446
		<div class="description detailed hidden">
447
 
448
<p>Return an array of stored cache ids</p>
449
 
450
 
451
 
452
 
453
				<h4>Returns</h4>
454
				<div class="list">
455
					<code>array</code><br>array of stored cache ids (string)<br>
456
				</div>
457
 
458
 
459
 
460
 
461
		</div>
462
		</div></td>
463
	</tr>
464
	<tr data-order="getTags" id="_getTags">
465
 
466
		<td class="attributes"><code>
467
			 public
468
			array
469
 
470
			</code>
471
		</td>
472
 
473
		<td class="name"><div>
474
		<a class="anchor" href="#_getTags">#</a>
475
		<code><a href="source-class-CacheFichier.html#268-275" title="Go to source code">getTags</a>( )</code>
476
 
477
		<div class="description short">
478
 
479
<p>Return an array of stored tags</p>
480
 
481
		</div>
482
 
483
		<div class="description detailed hidden">
484
 
485
<p>Return an array of stored tags</p>
486
 
487
 
488
 
489
 
490
				<h4>Returns</h4>
491
				<div class="list">
492
					<code>array</code><br>array of stored tags (string)<br>
493
				</div>
494
 
495
 
496
 
497
 
498
		</div>
499
		</div></td>
500
	</tr>
501
	<tr data-order="getIdsAvecLesTags" id="_getIdsAvecLesTags">
502
 
503
		<td class="attributes"><code>
504
			 public
505
			array
506
 
507
			</code>
508
		</td>
509
 
510
		<td class="name"><div>
511
		<a class="anchor" href="#_getIdsAvecLesTags">#</a>
512
		<code><a href="source-class-CacheFichier.html#277-287" title="Go to source code">getIdsAvecLesTags</a>( <span>array <var>$tags</var> = <span class="php-keyword1">array</span>()</span> )</code>
513
 
514
		<div class="description short">
515
 
516
<p>Return an array of stored cache ids which match given tags</p>
517
 
518
		</div>
519
 
520
		<div class="description detailed hidden">
521
 
522
<p>Return an array of stored cache ids which match given tags</p>
523
 
524
<p>In case of multiple tags, a logical AND is made between tags</p>
525
 
526
 
527
 
528
				<h4>Parameters</h4>
529
				<div class="list"><dl>
530
					<dt><var>$tags</var></dt>
531
					<dd><code>array</code><br>$tags array of tags</dd>
532
				</dl></div>
533
 
534
				<h4>Returns</h4>
535
				<div class="list">
536
					<code>array</code><br>array of matching cache ids (string)<br>
537
				</div>
538
 
539
 
540
 
541
 
542
		</div>
543
		</div></td>
544
	</tr>
545
	<tr data-order="getIdsSansLesTags" id="_getIdsSansLesTags">
546
 
547
		<td class="attributes"><code>
548
			 public
549
			array
550
 
551
			</code>
552
		</td>
553
 
554
		<td class="name"><div>
555
		<a class="anchor" href="#_getIdsSansLesTags">#</a>
556
		<code><a href="source-class-CacheFichier.html#289-299" title="Go to source code">getIdsSansLesTags</a>( <span>array <var>$tags</var> = <span class="php-keyword1">array</span>()</span> )</code>
557
 
558
		<div class="description short">
559
 
560
<p>Return an array of stored cache ids which don't match given tags</p>
561
 
562
		</div>
563
 
564
		<div class="description detailed hidden">
565
 
566
<p>Return an array of stored cache ids which don't match given tags</p>
567
 
568
<p>In case of multiple tags, a logical OR is made between tags</p>
569
 
570
 
571
 
572
				<h4>Parameters</h4>
573
				<div class="list"><dl>
574
					<dt><var>$tags</var></dt>
575
					<dd><code>array</code><br>$tags array of tags</dd>
576
				</dl></div>
577
 
578
				<h4>Returns</h4>
579
				<div class="list">
580
					<code>array</code><br>array of not matching cache ids (string)<br>
581
				</div>
582
 
583
 
584
 
585
 
586
		</div>
587
		</div></td>
588
	</tr>
589
	<tr data-order="getIdsAvecUnTag" id="_getIdsAvecUnTag">
590
 
591
		<td class="attributes"><code>
592
			 public
593
			array
594
 
595
			</code>
596
		</td>
597
 
598
		<td class="name"><div>
599
		<a class="anchor" href="#_getIdsAvecUnTag">#</a>
600
		<code><a href="source-class-CacheFichier.html#301-311" title="Go to source code">getIdsAvecUnTag</a>( <span>array <var>$tags</var> = <span class="php-keyword1">array</span>()</span> )</code>
601
 
602
		<div class="description short">
603
 
604
<p>Return an array of stored cache ids which match any given tags</p>
605
 
606
		</div>
607
 
608
		<div class="description detailed hidden">
609
 
610
<p>Return an array of stored cache ids which match any given tags</p>
611
 
612
<p>In case of multiple tags, a logical AND is made between tags</p>
613
 
614
 
615
 
616
				<h4>Parameters</h4>
617
				<div class="list"><dl>
618
					<dt><var>$tags</var></dt>
619
					<dd><code>array</code><br>$tags array of tags</dd>
620
				</dl></div>
621
 
622
				<h4>Returns</h4>
623
				<div class="list">
624
					<code>array</code><br>array of any matching cache ids (string)<br>
625
				</div>
626
 
627
 
628
 
629
 
630
		</div>
631
		</div></td>
632
	</tr>
633
	<tr data-order="getPourcentageRemplissage" id="_getPourcentageRemplissage">
634
 
635
		<td class="attributes"><code>
636
			 public
637
			integer
638
 
639
			</code>
640
		</td>
641
 
642
		<td class="name"><div>
643
		<a class="anchor" href="#_getPourcentageRemplissage">#</a>
644
		<code><a href="source-class-CacheFichier.html#313-330" title="Go to source code">getPourcentageRemplissage</a>( )</code>
645
 
646
		<div class="description short">
647
 
648
<p>Return the filling percentage of the backend storage</p>
649
 
650
		</div>
651
 
652
		<div class="description detailed hidden">
653
 
654
<p>Return the filling percentage of the backend storage</p>
655
 
656
 
657
 
658
 
659
				<h4>Returns</h4>
660
				<div class="list">
661
					<code>integer</code><br>integer between 0 and 100<br>
662
				</div>
663
 
664
				<h4>Throws</h4>
665
				<div class="list">
666
					<code>Zend_Cache_Exception</code><br>
667
				</div>
668
 
669
 
670
 
671
		</div>
672
		</div></td>
673
	</tr>
674
	<tr data-order="getMetadonnees" id="_getMetadonnees">
675
 
676
		<td class="attributes"><code>
677
			 public
678
			array
679
 
680
			</code>
681
		</td>
682
 
683
		<td class="name"><div>
684
		<a class="anchor" href="#_getMetadonnees">#</a>
685
		<code><a href="source-class-CacheFichier.html#332-357" title="Go to source code">getMetadonnees</a>( <span>string <var>$id</var></span> )</code>
686
 
687
		<div class="description short">
688
 
689
<p>Return an array of metadatas for the given cache id</p>
690
 
691
		</div>
692
 
693
		<div class="description detailed hidden">
694
 
695
<p>Return an array of metadatas for the given cache id</p>
696
 
697
<p>The array must include these keys :</p>
698
 
699
<ul>
700
	<li>expire : the expire timestamp</li>
701
 
702
	<li>tags : a string array of tags</li>
703
 
704
	<li>mtime : timestamp of last modification time</li>
705
</ul>
706
 
707
 
708
 
709
				<h4>Parameters</h4>
710
				<div class="list"><dl>
711
					<dt><var>$id</var></dt>
712
					<dd><code>string</code><br>$id cache id</dd>
713
				</dl></div>
714
 
715
				<h4>Returns</h4>
716
				<div class="list">
717
					<code>array</code><br>array of metadatas (false if the cache id is not found)<br>
718
				</div>
719
 
720
 
721
 
722
 
723
		</div>
724
		</div></td>
725
	</tr>
726
	<tr data-order="ajouterSupplementDureeDeVie" id="_ajouterSupplementDureeDeVie">
727
 
728
		<td class="attributes"><code>
729
			 public
730
			boolean
731
 
732
			</code>
733
		</td>
734
 
735
		<td class="name"><div>
736
		<a class="anchor" href="#_ajouterSupplementDureeDeVie">#</a>
737
		<code><a href="source-class-CacheFichier.html#359-382" title="Go to source code">ajouterSupplementDureeDeVie</a>( <span>string <var>$id</var></span>, <span>integer <var>$supplement_duree_de_vie</var></span> )</code>
738
 
739
		<div class="description short">
740
 
741
<p>Give (if possible) an extra lifetime to the given cache id</p>
742
 
743
		</div>
744
 
745
		<div class="description detailed hidden">
746
 
747
<p>Give (if possible) an extra lifetime to the given cache id</p>
748
 
749
 
750
 
751
				<h4>Parameters</h4>
752
				<div class="list"><dl>
753
					<dt><var>$id</var></dt>
754
					<dd><code>string</code><br>$id cache id</dd>
755
					<dt><var>$supplement_duree_de_vie</var></dt>
756
					<dd><code>integer</code><br>$extraLifetime</dd>
757
				</dl></div>
758
 
759
				<h4>Returns</h4>
760
				<div class="list">
761
					<code>boolean</code><br>true if ok<br>
762
				</div>
763
 
764
 
765
 
766
 
767
		</div>
768
		</div></td>
769
	</tr>
770
	<tr data-order="getMetadonneesFichier" id="_getMetadonneesFichier">
771
 
772
		<td class="attributes"><code>
773
			 protected
774
			array|false
775
 
776
			</code>
777
		</td>
778
 
779
		<td class="name"><div>
780
		<a class="anchor" href="#_getMetadonneesFichier">#</a>
781
		<code><a href="source-class-CacheFichier.html#384-400" title="Go to source code">getMetadonneesFichier</a>( <span>string <var>$id</var></span> )</code>
782
 
783
		<div class="description short">
784
 
785
<p>Get a metadatas record</p>
786
 
787
		</div>
788
 
789
		<div class="description detailed hidden">
790
 
791
<p>Get a metadatas record</p>
792
 
793
 
794
 
795
				<h4>Parameters</h4>
796
				<div class="list"><dl>
797
					<dt><var>$id</var></dt>
798
					<dd><code>string</code><br>$id Cache id</dd>
799
				</dl></div>
800
 
801
				<h4>Returns</h4>
802
				<div class="list">
803
					<code>array|false</code><br>Associative array of metadatas<br>
804
				</div>
805
 
806
 
807
 
808
 
809
		</div>
810
		</div></td>
811
	</tr>
812
	<tr data-order="setMetadonnees" id="_setMetadonnees">
813
 
814
		<td class="attributes"><code>
815
			 protected
816
			boolean
817
 
818
			</code>
819
		</td>
820
 
821
		<td class="name"><div>
822
		<a class="anchor" href="#_setMetadonnees">#</a>
823
		<code><a href="source-class-CacheFichier.html#402-424" title="Go to source code">setMetadonnees</a>( <span>string <var>$id</var></span>, <span>array <var>$metadonnees</var></span>, <span>boolean <var>$sauvegarde</var> = <span class="php-keyword1">true</span></span> )</code>
824
 
825
		<div class="description short">
826
 
827
<p>Set a metadatas record</p>
828
 
829
		</div>
830
 
831
		<div class="description detailed hidden">
832
 
833
<p>Set a metadatas record</p>
834
 
835
 
836
 
837
				<h4>Parameters</h4>
838
				<div class="list"><dl>
839
					<dt><var>$id</var></dt>
840
					<dd><code>string</code><br>$id Cache id</dd>
841
					<dt><var>$metadonnees</var></dt>
842
					<dd><code>array</code><br>$metadatas Associative array of metadatas</dd>
843
					<dt><var>$sauvegarde</var></dt>
844
					<dd><code>boolean</code><br>$save optional pass false to disable saving to file</dd>
845
				</dl></div>
846
 
847
				<h4>Returns</h4>
848
				<div class="list">
849
					<code>boolean</code><br>True if no problem<br>
850
				</div>
851
 
852
 
853
 
854
 
855
		</div>
856
		</div></td>
857
	</tr>
858
	<tr data-order="supprimerMetadonnees" id="_supprimerMetadonnees">
859
 
860
		<td class="attributes"><code>
861
			 protected
862
			boolean
863
 
864
			</code>
865
		</td>
866
 
867
		<td class="name"><div>
868
		<a class="anchor" href="#_supprimerMetadonnees">#</a>
869
		<code><a href="source-class-CacheFichier.html#426-438" title="Go to source code">supprimerMetadonnees</a>( <span>string <var>$id</var></span> )</code>
870
 
871
		<div class="description short">
872
 
873
<p>Drop a metadata record</p>
874
 
875
		</div>
876
 
877
		<div class="description detailed hidden">
878
 
879
<p>Drop a metadata record</p>
880
 
881
 
882
 
883
				<h4>Parameters</h4>
884
				<div class="list"><dl>
885
					<dt><var>$id</var></dt>
886
					<dd><code>string</code><br>$id Cache id</dd>
887
				</dl></div>
888
 
889
				<h4>Returns</h4>
890
				<div class="list">
891
					<code>boolean</code><br>True if no problem<br>
892
				</div>
893
 
894
 
895
 
896
 
897
		</div>
898
		</div></td>
899
	</tr>
900
	<tr data-order="nettoyerMetadonnees" id="_nettoyerMetadonnees">
901
 
902
		<td class="attributes"><code>
903
			 protected
904
 
905
 
906
			</code>
907
		</td>
908
 
909
		<td class="name"><div>
910
		<a class="anchor" href="#_nettoyerMetadonnees">#</a>
911
		<code><a href="source-class-CacheFichier.html#440-447" title="Go to source code">nettoyerMetadonnees</a>( )</code>
912
 
913
		<div class="description short">
914
 
915
<p>Clear the metadatas array</p>
916
 
917
		</div>
918
 
919
		<div class="description detailed hidden">
920
 
921
<p>Clear the metadatas array</p>
922
 
923
 
924
 
925
 
926
 
927
 
928
 
929
 
930
		</div>
931
		</div></td>
932
	</tr>
933
	<tr data-order="chargerMetadonnees" id="_chargerMetadonnees">
934
 
935
		<td class="attributes"><code>
936
			 protected
937
			array|false
938
 
939
			</code>
940
		</td>
941
 
942
		<td class="name"><div>
943
		<a class="anchor" href="#_chargerMetadonnees">#</a>
944
		<code><a href="source-class-CacheFichier.html#449-461" title="Go to source code">chargerMetadonnees</a>( <span>string <var>$id</var></span> )</code>
945
 
946
		<div class="description short">
947
 
948
<p>Load metadatas from disk</p>
949
 
950
		</div>
951
 
952
		<div class="description detailed hidden">
953
 
954
<p>Load metadatas from disk</p>
955
 
956
 
957
 
958
				<h4>Parameters</h4>
959
				<div class="list"><dl>
960
					<dt><var>$id</var></dt>
961
					<dd><code>string</code><br>$id Cache id</dd>
962
				</dl></div>
963
 
964
				<h4>Returns</h4>
965
				<div class="list">
966
					<code>array|false</code><br>Metadatas associative array<br>
967
				</div>
968
 
969
 
970
 
971
 
972
		</div>
973
		</div></td>
974
	</tr>
975
	<tr data-order="sauverMetadonnees" id="_sauverMetadonnees">
976
 
977
		<td class="attributes"><code>
978
			 protected
979
			boolean
980
 
981
			</code>
982
		</td>
983
 
984
		<td class="name"><div>
985
		<a class="anchor" href="#_sauverMetadonnees">#</a>
986
		<code><a href="source-class-CacheFichier.html#463-474" title="Go to source code">sauverMetadonnees</a>( <span>string <var>$id</var></span>, <span>array <var>$metadonnees</var></span> )</code>
987
 
988
		<div class="description short">
989
 
990
<p>Save metadatas to disk</p>
991
 
992
		</div>
993
 
994
		<div class="description detailed hidden">
995
 
996
<p>Save metadatas to disk</p>
997
 
998
 
999
 
1000
				<h4>Parameters</h4>
1001
				<div class="list"><dl>
1002
					<dt><var>$id</var></dt>
1003
					<dd><code>string</code><br>$id Cache id</dd>
1004
					<dt><var>$metadonnees</var></dt>
1005
					<dd><code>array</code><br>$metadatas Associative array</dd>
1006
				</dl></div>
1007
 
1008
				<h4>Returns</h4>
1009
				<div class="list">
1010
					<code>boolean</code><br>True if no problem<br>
1011
				</div>
1012
 
1013
 
1014
 
1015
 
1016
		</div>
1017
		</div></td>
1018
	</tr>
1019
	<tr data-order="getNomFichierMeta" id="_getNomFichierMeta">
1020
 
1021
		<td class="attributes"><code>
1022
			 protected
1023
			string
1024
 
1025
			</code>
1026
		</td>
1027
 
1028
		<td class="name"><div>
1029
		<a class="anchor" href="#_getNomFichierMeta">#</a>
1030
		<code><a href="source-class-CacheFichier.html#476-486" title="Go to source code">getNomFichierMeta</a>( <span>string <var>$id</var></span> )</code>
1031
 
1032
		<div class="description short">
1033
 
1034
<p>Make and return a file name (with path) for metadatas</p>
1035
 
1036
		</div>
1037
 
1038
		<div class="description detailed hidden">
1039
 
1040
<p>Make and return a file name (with path) for metadatas</p>
1041
 
1042
 
1043
 
1044
				<h4>Parameters</h4>
1045
				<div class="list"><dl>
1046
					<dt><var>$id</var></dt>
1047
					<dd><code>string</code><br>$id Cache id</dd>
1048
				</dl></div>
1049
 
1050
				<h4>Returns</h4>
1051
				<div class="list">
1052
					<code>string</code><br>Metadatas file name (with path)<br>
1053
				</div>
1054
 
1055
 
1056
 
1057
 
1058
		</div>
1059
		</div></td>
1060
	</tr>
1061
	<tr data-order="etreFichierMeta" id="_etreFichierMeta">
1062
 
1063
		<td class="attributes"><code>
1064
			 protected
1065
			boolean
1066
 
1067
			</code>
1068
		</td>
1069
 
1070
		<td class="name"><div>
1071
		<a class="anchor" href="#_etreFichierMeta">#</a>
1072
		<code><a href="source-class-CacheFichier.html#488-497" title="Go to source code">etreFichierMeta</a>( <span>string <var>$fichier_nom</var></span> )</code>
1073
 
1074
		<div class="description short">
1075
 
1076
<p>Check if the given filename is a metadatas one</p>
1077
 
1078
		</div>
1079
 
1080
		<div class="description detailed hidden">
1081
 
1082
<p>Check if the given filename is a metadatas one</p>
1083
 
1084
 
1085
 
1086
				<h4>Parameters</h4>
1087
				<div class="list"><dl>
1088
					<dt><var>$fichier_nom</var></dt>
1089
					<dd><code>string</code><br>$fileName File name</dd>
1090
				</dl></div>
1091
 
1092
				<h4>Returns</h4>
1093
				<div class="list">
1094
					<code>boolean</code><br>True if it's a metadatas one<br>
1095
				</div>
1096
 
1097
 
1098
 
1099
 
1100
		</div>
1101
		</div></td>
1102
	</tr>
1103
	<tr data-order="supprimerFichier" id="_supprimerFichier">
1104
 
1105
		<td class="attributes"><code>
1106
			 protected
1107
			boolean
1108
 
1109
			</code>
1110
		</td>
1111
 
1112
		<td class="name"><div>
1113
		<a class="anchor" href="#_supprimerFichier">#</a>
1114
		<code><a href="source-class-CacheFichier.html#499-516" title="Go to source code">supprimerFichier</a>( <span>string <var>$fichier</var></span> )</code>
1115
 
1116
		<div class="description short">
1117
 
1118
<p>Remove a file</p>
1119
 
1120
		</div>
1121
 
1122
		<div class="description detailed hidden">
1123
 
1124
<p>Remove a file</p>
1125
 
1126
<p>If we can't remove the file (because of locks or any problem), we will touch
1127
the file to invalidate it</p>
1128
 
1129
 
1130
 
1131
				<h4>Parameters</h4>
1132
				<div class="list"><dl>
1133
					<dt><var>$fichier</var></dt>
1134
					<dd><code>string</code><br>$file Complete file path</dd>
1135
				</dl></div>
1136
 
1137
				<h4>Returns</h4>
1138
				<div class="list">
1139
					<code>boolean</code><br>True if ok<br>
1140
				</div>
1141
 
1142
 
1143
 
1144
 
1145
		</div>
1146
		</div></td>
1147
	</tr>
1148
	<tr data-order="nettoyerFichiers" id="_nettoyerFichiers">
1149
 
1150
		<td class="attributes"><code>
1151
			 protected
1152
			boolean
1153
 
1154
			</code>
1155
		</td>
1156
 
1157
		<td class="name"><div>
1158
		<a class="anchor" href="#_nettoyerFichiers">#</a>
1159
		<code><a href="source-class-CacheFichier.html#518-626" title="Go to source code">nettoyerFichiers</a>( <span>string <var>$dossier</var></span>, <span>string <var>$mode</var> = <code><a href="class-Cache.html#NETTOYAGE_MODE_TOUS">Cache::<b>NETTOYAGE_MODE_TOUS</b></a></code></span>, <span>array <var>$tags</var> = <span class="php-keyword1">array</span>()</span> )</code>
1160
 
1161
		<div class="description short">
1162
 
1163
<p>Clean some cache records (protected method used for recursive stuff)</p>
1164
 
1165
		</div>
1166
 
1167
		<div class="description detailed hidden">
1168
 
1169
<p>Clean some cache records (protected method used for recursive stuff)</p>
1170
 
1171
<p>Available modes are : Zend_Cache::CLEANING_MODE_ALL (default) =&gt; remove
1172
all cache entries ($tags is not used) Zend_Cache::CLEANING_MODE_OLD =&gt; remove
1173
too old cache entries ($tags is not used) Zend_Cache::CLEANING_MODE_MATCHING_TAG
1174
=&gt; remove cache entries matching all given tags ($tags can be an array of
1175
strings or a single string) Zend_Cache::CLEANING_MODE_NOT_MATCHING_TAG =&gt;
1176
remove cache entries not {matching one of the given tags} ($tags can be an array
1177
of strings or a single string) Zend_Cache::CLEANING_MODE_MATCHING_ANY_TAG =&gt;
1178
remove cache entries matching any given tags ($tags can be an array of strings
1179
or a single string)</p>
1180
 
1181
 
1182
 
1183
				<h4>Parameters</h4>
1184
				<div class="list"><dl>
1185
					<dt><var>$dossier</var></dt>
1186
					<dd><code>string</code><br>$dir Directory to clean</dd>
1187
					<dt><var>$mode</var></dt>
1188
					<dd><code>string</code><br>$mode Clean mode</dd>
1189
					<dt><var>$tags</var></dt>
1190
					<dd><code>array</code><br>$tags Array of tags</dd>
1191
				</dl></div>
1192
 
1193
				<h4>Returns</h4>
1194
				<div class="list">
1195
					<code>boolean</code><br>True if no problem<br>
1196
				</div>
1197
 
1198
				<h4>Throws</h4>
1199
				<div class="list">
1200
					<code>Zend_Cache_Exception</code><br>
1201
				</div>
1202
 
1203
 
1204
 
1205
		</div>
1206
		</div></td>
1207
	</tr>
1208
	<tr data-order="analyserCache" id="_analyserCache">
1209
 
1210
		<td class="attributes"><code>
1211
			 protected
1212
 
1213
 
1214
			</code>
1215
		</td>
1216
 
1217
		<td class="name"><div>
1218
		<a class="anchor" href="#_analyserCache">#</a>
1219
		<code><a href="source-class-CacheFichier.html#628-709" title="Go to source code">analyserCache</a>( <span>mixed <var>$dossier</var></span>, <span>mixed <var>$mode</var></span>, <span>mixed <var>$tags</var> = <span class="php-keyword1">array</span>()</span> )</code>
1220
 
1221
		<div class="description short">
1222
 
1223
		</div>
1224
 
1225
		<div class="description detailed hidden">
1226
 
1227
 
1228
 
1229
 
1230
 
1231
 
1232
 
1233
 
1234
		</div>
1235
		</div></td>
1236
	</tr>
1237
	<tr data-order="genererCleSecu" id="_genererCleSecu">
1238
 
1239
		<td class="attributes"><code>
1240
			 protected
1241
			string
1242
 
1243
			</code>
1244
		</td>
1245
 
1246
		<td class="name"><div>
1247
		<a class="anchor" href="#_genererCleSecu">#</a>
1248
		<code><a href="source-class-CacheFichier.html#711-732" title="Go to source code">genererCleSecu</a>( <span>string <var>$donnees</var></span>, <span>string <var>$type_de_controle</var></span> )</code>
1249
 
1250
		<div class="description short">
1251
 
1252
<p>Make a control key with the string containing datas</p>
1253
 
1254
		</div>
1255
 
1256
		<div class="description detailed hidden">
1257
 
1258
<p>Make a control key with the string containing datas</p>
1259
 
1260
 
1261
 
1262
				<h4>Parameters</h4>
1263
				<div class="list"><dl>
1264
					<dt><var>$donnees</var></dt>
1265
					<dd><code>string</code><br>$data Data</dd>
1266
					<dt><var>$type_de_controle</var></dt>
1267
					<dd><code>string</code><br>$controlType Type of control 'md5', 'crc32' or 'strlen'</dd>
1268
				</dl></div>
1269
 
1270
				<h4>Returns</h4>
1271
				<div class="list">
1272
					<code>string</code><br>Control key<br>
1273
				</div>
1274
 
1275
				<h4>Throws</h4>
1276
				<div class="list">
1277
					<code>Zend_Cache_Exception</code><br>
1278
				</div>
1279
 
1280
 
1281
 
1282
		</div>
1283
		</div></td>
1284
	</tr>
1285
	<tr data-order="transformaterIdEnNomFichier" id="_transformaterIdEnNomFichier">
1286
 
1287
		<td class="attributes"><code>
1288
			 protected
1289
			string
1290
 
1291
			</code>
1292
		</td>
1293
 
1294
		<td class="name"><div>
1295
		<a class="anchor" href="#_transformaterIdEnNomFichier">#</a>
1296
		<code><a href="source-class-CacheFichier.html#734-744" title="Go to source code">transformaterIdEnNomFichier</a>( <span>string <var>$id</var></span> )</code>
1297
 
1298
		<div class="description short">
1299
 
1300
<p>Transform a cache id into a file name and return it</p>
1301
 
1302
		</div>
1303
 
1304
		<div class="description detailed hidden">
1305
 
1306
<p>Transform a cache id into a file name and return it</p>
1307
 
1308
 
1309
 
1310
				<h4>Parameters</h4>
1311
				<div class="list"><dl>
1312
					<dt><var>$id</var></dt>
1313
					<dd><code>string</code><br>$id Cache id</dd>
1314
				</dl></div>
1315
 
1316
				<h4>Returns</h4>
1317
				<div class="list">
1318
					<code>string</code><br>File name<br>
1319
				</div>
1320
 
1321
 
1322
 
1323
 
1324
		</div>
1325
		</div></td>
1326
	</tr>
1327
	<tr data-order="getFichierNom" id="_getFichierNom">
1328
 
1329
		<td class="attributes"><code>
1330
			 protected
1331
			string
1332
 
1333
			</code>
1334
		</td>
1335
 
1336
		<td class="name"><div>
1337
		<a class="anchor" href="#_getFichierNom">#</a>
1338
		<code><a href="source-class-CacheFichier.html#746-756" title="Go to source code">getFichierNom</a>( <span>string <var>$id</var></span> )</code>
1339
 
1340
		<div class="description short">
1341
 
1342
<p>Make and return a file name (with path)</p>
1343
 
1344
		</div>
1345
 
1346
		<div class="description detailed hidden">
1347
 
1348
<p>Make and return a file name (with path)</p>
1349
 
1350
 
1351
 
1352
				<h4>Parameters</h4>
1353
				<div class="list"><dl>
1354
					<dt><var>$id</var></dt>
1355
					<dd><code>string</code><br>$id Cache id</dd>
1356
				</dl></div>
1357
 
1358
				<h4>Returns</h4>
1359
				<div class="list">
1360
					<code>string</code><br>File name (with path)<br>
1361
				</div>
1362
 
1363
 
1364
 
1365
 
1366
		</div>
1367
		</div></td>
1368
	</tr>
1369
	<tr data-order="getChemin" id="_getChemin">
1370
 
1371
		<td class="attributes"><code>
1372
			 protected
1373
			string
1374
 
1375
			</code>
1376
		</td>
1377
 
1378
		<td class="name"><div>
1379
		<a class="anchor" href="#_getChemin">#</a>
1380
		<code><a href="source-class-CacheFichier.html#758-777" title="Go to source code">getChemin</a>( <span>string <var>$id</var></span>, <span>boolean <var>$decoupage</var> = <span class="php-keyword1">false</span></span> )</code>
1381
 
1382
		<div class="description short">
1383
 
1384
<p>Return the complete directory path of a filename (including
1385
hashedDirectoryStructure)</p>
1386
 
1387
		</div>
1388
 
1389
		<div class="description detailed hidden">
1390
 
1391
<p>Return the complete directory path of a filename (including
1392
hashedDirectoryStructure)</p>
1393
 
1394
 
1395
 
1396
				<h4>Parameters</h4>
1397
				<div class="list"><dl>
1398
					<dt><var>$id</var></dt>
1399
					<dd><code>string</code><br>$id Cache id</dd>
1400
					<dt><var>$decoupage</var></dt>
1401
					<dd><code>boolean</code><br>$decoupage if true, returns array of directory parts instead of single string</dd>
1402
				</dl></div>
1403
 
1404
				<h4>Returns</h4>
1405
				<div class="list">
1406
					<code>string</code><br>Complete directory path<br>
1407
				</div>
1408
 
1409
 
1410
 
1411
 
1412
		</div>
1413
		</div></td>
1414
	</tr>
1415
	<tr data-order="lancerMkdirEtChmodRecursif" id="_lancerMkdirEtChmodRecursif">
1416
 
1417
		<td class="attributes"><code>
1418
			 protected
1419
			boolean
1420
 
1421
			</code>
1422
		</td>
1423
 
1424
		<td class="name"><div>
1425
		<a class="anchor" href="#_lancerMkdirEtChmodRecursif">#</a>
1426
		<code><a href="source-class-CacheFichier.html#779-797" title="Go to source code">lancerMkdirEtChmodRecursif</a>( <span>string <var>$id</var></span> )</code>
1427
 
1428
		<div class="description short">
1429
 
1430
<p>Make the directory strucuture for the given id</p>
1431
 
1432
		</div>
1433
 
1434
		<div class="description detailed hidden">
1435
 
1436
<p>Make the directory strucuture for the given id</p>
1437
 
1438
 
1439
 
1440
				<h4>Parameters</h4>
1441
				<div class="list"><dl>
1442
					<dt><var>$id</var></dt>
1443
					<dd><code>string</code><br>$id cache id</dd>
1444
				</dl></div>
1445
 
1446
				<h4>Returns</h4>
1447
				<div class="list">
1448
					<code>boolean</code><br>true<br>
1449
				</div>
1450
 
1451
 
1452
 
1453
 
1454
		</div>
1455
		</div></td>
1456
	</tr>
1457
	<tr data-order="testerExistenceCache" id="_testerExistenceCache">
1458
 
1459
		<td class="attributes"><code>
1460
			 protected
1461
			boolean|mixed
1462
 
1463
			</code>
1464
		</td>
1465
 
1466
		<td class="name"><div>
1467
		<a class="anchor" href="#_testerExistenceCache">#</a>
1468
		<code><a href="source-class-CacheFichier.html#799-814" title="Go to source code">testerExistenceCache</a>( <span>string <var>$id</var></span>, <span>boolean <var>$ne_pas_tester_validiter_du_cache</var></span> )</code>
1469
 
1470
		<div class="description short">
1471
 
1472
<p>Test if the given cache id is available (and still valid as a cache
1473
record)</p>
1474
 
1475
		</div>
1476
 
1477
		<div class="description detailed hidden">
1478
 
1479
<p>Test if the given cache id is available (and still valid as a cache
1480
record)</p>
1481
 
1482
 
1483
 
1484
				<h4>Parameters</h4>
1485
				<div class="list"><dl>
1486
					<dt><var>$id</var></dt>
1487
					<dd><code>string</code><br>$id Cache id</dd>
1488
					<dt><var>$ne_pas_tester_validiter_du_cache</var></dt>
1489
					<dd><code>boolean</code><br>$doNotTestCacheValidity If set to true, the cache validity won't be tested</dd>
1490
				</dl></div>
1491
 
1492
				<h4>Returns</h4>
1493
				<div class="list">
1494
					<code>boolean|mixed</code><br>false (a cache is not available) or "last modified" timestamp (int) of the
1495
available cache record<br>
1496
				</div>
1497
 
1498
 
1499
 
1500
 
1501
		</div>
1502
		</div></td>
1503
	</tr>
1504
	<tr data-order="getContenuFichier" id="_getContenuFichier">
1505
 
1506
		<td class="attributes"><code>
1507
			 protected
1508
			string
1509
 
1510
			</code>
1511
		</td>
1512
 
1513
		<td class="name"><div>
1514
		<a class="anchor" href="#_getContenuFichier">#</a>
1515
		<code><a href="source-class-CacheFichier.html#816-834" title="Go to source code">getContenuFichier</a>( <span>string <var>$fichier</var></span> )</code>
1516
 
1517
		<div class="description short">
1518
 
1519
<p>Return the file content of the given file</p>
1520
 
1521
		</div>
1522
 
1523
		<div class="description detailed hidden">
1524
 
1525
<p>Return the file content of the given file</p>
1526
 
1527
 
1528
 
1529
				<h4>Parameters</h4>
1530
				<div class="list"><dl>
1531
					<dt><var>$fichier</var></dt>
1532
					<dd><code>string</code><br>$file File complete path</dd>
1533
				</dl></div>
1534
 
1535
				<h4>Returns</h4>
1536
				<div class="list">
1537
					<code>string</code><br>File content (or false if problem)<br>
1538
				</div>
1539
 
1540
 
1541
 
1542
 
1543
		</div>
1544
		</div></td>
1545
	</tr>
1546
	<tr data-order="setContenuFichier" id="_setContenuFichier">
1547
 
1548
		<td class="attributes"><code>
1549
			 protected
1550
			boolean
1551
 
1552
			</code>
1553
		</td>
1554
 
1555
		<td class="name"><div>
1556
		<a class="anchor" href="#_setContenuFichier">#</a>
1557
		<code><a href="source-class-CacheFichier.html#836-858" title="Go to source code">setContenuFichier</a>( <span>string <var>$fichier</var></span>, <span>string <var>$chaine</var></span> )</code>
1558
 
1559
		<div class="description short">
1560
 
1561
<p>Put the given string into the given file</p>
1562
 
1563
		</div>
1564
 
1565
		<div class="description detailed hidden">
1566
 
1567
<p>Put the given string into the given file</p>
1568
 
1569
 
1570
 
1571
				<h4>Parameters</h4>
1572
				<div class="list"><dl>
1573
					<dt><var>$fichier</var></dt>
1574
					<dd><code>string</code><br>$file File complete path</dd>
1575
					<dt><var>$chaine</var></dt>
1576
					<dd><code>string</code><br>$string String to put in file</dd>
1577
				</dl></div>
1578
 
1579
				<h4>Returns</h4>
1580
				<div class="list">
1581
					<code>boolean</code><br>true if no problem<br>
1582
				</div>
1583
 
1584
 
1585
 
1586
 
1587
		</div>
1588
		</div></td>
1589
	</tr>
1590
	<tr data-order="transformerNomFichierEnId" id="_transformerNomFichierEnId">
1591
 
1592
		<td class="attributes"><code>
1593
			 protected
1594
			string
1595
 
1596
			</code>
1597
		</td>
1598
 
1599
		<td class="name"><div>
1600
		<a class="anchor" href="#_transformerNomFichierEnId">#</a>
1601
		<code><a href="source-class-CacheFichier.html#860-869" title="Go to source code">transformerNomFichierEnId</a>( <span>string <var>$nom_de_fichier</var></span> )</code>
1602
 
1603
		<div class="description short">
1604
 
1605
<p>Transform a file name into cache id and return it</p>
1606
 
1607
		</div>
1608
 
1609
		<div class="description detailed hidden">
1610
 
1611
<p>Transform a file name into cache id and return it</p>
1612
 
1613
 
1614
 
1615
				<h4>Parameters</h4>
1616
				<div class="list"><dl>
1617
					<dt><var>$nom_de_fichier</var></dt>
1618
					<dd><code>string</code><br>$fileName File name</dd>
1619
				</dl></div>
1620
 
1621
				<h4>Returns</h4>
1622
				<div class="list">
1623
					<code>string</code><br>Cache id<br>
1624
				</div>
1625
 
1626
 
1627
 
1628
 
1629
		</div>
1630
		</div></td>
1631
	</tr>
1632
	</table>
1633
 
1634
 
1635
 
1636
 
1637
 
1638
 
1639
 
1640
 
1641
 
1642
 
1643
 
1644
 
1645
	<table class="summary" id="properties">
1646
	<caption>Properties summary</caption>
1647
	<tr data-order="options" id="$options">
1648
		<td class="attributes"><code>
1649
			protected
1650
			array
1651
		</code></td>
1652
 
1653
		<td class="name">
1654
				<a href="source-class-CacheFichier.html#3-62" title="Go to source code"><var>$options</var></a>
1655
		</td>
1656
		<td class="value"><code><span class="php-keyword1">array</span>(
1657
	<span class="php-quote">'stockage_chemin'</span> =&gt; <span class="php-keyword1">null</span>,
1658
	<span class="php-quote">'fichier_verrou'</span> =&gt; <span class="php-keyword1">true</span>,
1659
	<span class="php-quote">'controle_lecture'</span> =&gt; <span class="php-keyword1">true</span>,
1660
	<span class="php-quote">'controle_lecture_type'</span> =&gt; <span class="php-quote">'crc32'</span>,
1661
	<span class="php-quote">'dossier_niveau'</span> =&gt; <span class="php-num">0</span>,
1662
	<span class="php-quote">'dossier_umask'</span> =&gt; <span class="php-num">0700</span>,
1663
	<span class="php-quote">'fichier_prefixe'</span> =&gt; <span class="php-quote">'tbf'</span>,
1664
	<span class="php-quote">'fichier_umask'</span> =&gt; <span class="php-num">0600</span>,
1665
	<span class="php-quote">'metadonnees_max_taille'</span> =&gt; <span class="php-num">100</span>
1666
)</code></td>
1667
		<td class="description"><div>
1668
			<a href="#$options" class="anchor">#</a>
1669
 
1670
			<div class="description short">
1671
 
1672
<p>Options disponibles</p>
1673
 
1674
			</div>
1675
 
1676
			<div class="description detailed hidden">
1677
 
1678
<p>Options disponibles</p>
1679
 
1680
<h2>&gt; (string) stockage_chemin :</h2>
1681
 
1682
<p>Chemin vers le dossier devant contenir l'arborescence du cache.</p>
1683
 
1684
<h1>&gt; (boolean) fichier_verrou :</h1>
1685
 
1686
<ul>
1687
	<li>Active / Désactive le verrouillage des fichiers</li>
1688
 
1689
	<li>Peut éviter la corruption du cache dans de mauvaises circonstances, mais
1690
	cela ne fonctionne pas sur des serveur</li>
1691
</ul>
1692
 
1693
<p>multithread et sur les systèmes de fichiers NFS par exemple.</p>
1694
 
1695
<h1>&gt; (boolean) controle_lecture :</h1>
1696
 
1697
<ul>
1698
	<li>Activer / désactiver le contrôle de lecture</li>
1699
 
1700
	<li>S'il est activé, une clé de contrôle est ajoutée dans le fichier de
1701
	cache et cette clé est comparée avec celle calculée</li>
1702
</ul>
1703
 
1704
<p>après la lecture.</p>
1705
 
1706
<h1>&gt; (string) controle_lecture_type :</h1>
1707
 
1708
<p>Type de contrôle de lecture (seulement si le contrôle de lecture est
1709
activé). Les valeurs disponibles sont:</p>
1710
 
1711
<ul>
1712
	<li>«md5» pour un contrôle md5 (le meilleur mais le plus lent)</li>
1713
 
1714
	<li>«crc32» pour un contrôle de hachage crc32 (un peu moins sécurisé, mais
1715
	plus rapide, un meilleur choix)</li>
1716
 
1717
	<li>«adler32» pour un contrôle de hachage adler32 (excellent choix aussi,
1718
	plus rapide que crc32)</li>
1719
 
1720
	<li>«strlen» pour un test de longueur uniquement (le plus rapide)</li>
1721
</ul>
1722
 
1723
<h1>&gt; (int) dossier_niveau :</h1>
1724
 
1725
<ul>
1726
	<li>Permet de réglez le nombre de niveau de sous-dossier que contiendra
1727
	l'arborescence des dossiers du cache.</li>
1728
</ul>
1729
 
1730
<p>0 signifie "pas de sous-dossier pour le cache", 1 signifie "un niveau de
1731
sous-dossier", 2 signifie "deux niveaux" ... Cette option peut accélérer le
1732
cache seulement lorsque vous avez plusieurs centaines de fichiers de cache.
1733
Seuls des tests spécifiques peuvent vous aider à choisir la meilleure valeur
1734
possible pour vous. 1 ou 2 peut être est un bon début.</p>
1735
 
1736
<h1>&gt; (int) dossier_umask :</h1>
1737
 
1738
<ul>
1739
	<li>Umask pour les sous-dossiers de l'arborescence du cache.</li>
1740
</ul>
1741
 
1742
<h1>&gt; (string) fichier_prefixe :</h1>
1743
 
1744
<ul>
1745
	<li>préfixe pour les fichiers du cache</li>
1746
 
1747
	<li>ATTENTION : faite vraiment attention avec cette option, car une valeur trop
1748
	générique dans le dossier cache du système</li>
1749
</ul>
1750
 
1751
<p>(comme /tmp) peut provoquer des catastrophes lors du nettoyage du cache.</p>
1752
 
1753
<h1>&gt; (int) fichier_umask :</h1>
1754
 
1755
<ul>
1756
	<li>Umask pour les fichiers de cache</li>
1757
</ul>
1758
 
1759
<h1>&gt; (int) metadonnees_max_taille :</h1>
1760
 
1761
<ul>
1762
	<li>taille maximum pour le tableau de métadonnées du cache (ne changer pas
1763
	cette valeur sauf si vous savez ce que vous faite)</li>
1764
</ul>
1765
 
1766
 
1767
			</div>
1768
		</div></td>
1769
	</tr>
1770
	<tr data-order="metadonnees" id="$metadonnees">
1771
		<td class="attributes"><code>
1772
			protected
1773
			array
1774
		</code></td>
1775
 
1776
		<td class="name">
1777
				<a href="source-class-CacheFichier.html#64-69" title="Go to source code"><var>$metadonnees</var></a>
1778
		</td>
1779
		<td class="value"><code><span class="php-keyword1">array</span>()</code></td>
1780
		<td class="description"><div>
1781
			<a href="#$metadonnees" class="anchor">#</a>
1782
 
1783
			<div class="description short">
1784
 
1785
<p>Array of metadatas (each item is an associative array)</p>
1786
 
1787
			</div>
1788
 
1789
			<div class="description detailed hidden">
1790
 
1791
<p>Array of metadatas (each item is an associative array)</p>
1792
 
1793
 
1794
			</div>
1795
		</div></td>
1796
	</tr>
1797
	</table>
1798
 
1799
 
1800
 
1801
 
1802
 
1803
 
1804
</div>
1805
 
1806
	<div id="footer">
1807
		TBFramework - v0.4 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
1808
	</div>
1809
</div>
1810
</div>
1811
</body>
1812
</html>