forked from notmyname/php-cloudfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCF_Connection.html
More file actions
877 lines (797 loc) · 53.7 KB
/
CF_Connection.html
File metadata and controls
877 lines (797 loc) · 53.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
<html>
<head>
<title>Docs For Class CF_Connection</title>
<link rel="stylesheet" type="text/css" href="../media/style.css">
</head>
<body>
<table border="0" cellspacing="0" cellpadding="0" height="48" width="100%">
<tr>
<td class="header_top">php-cloudfiles</td>
</tr>
<tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt="" /></td></tr>
<tr>
<td class="header_menu">
[ <a href="../classtrees_php-cloudfiles.html" class="menu">class tree: php-cloudfiles</a> ]
[ <a href="../elementindex_php-cloudfiles.html" class="menu">index: php-cloudfiles</a> ]
[ <a href="../elementindex.html" class="menu">all elements</a> ]
</td>
</tr>
<tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt="" /></td></tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="200" class="menu">
<div id="ric">
<p><a href="../ric_README.html">README</a></p>
<p><a href="../ric_Changelog.html">Changelog</a></p>
<p><a href="../ric_AUTHORS.html">AUTHORS</a></p>
<p><a href="../ric_COPYING.html">COPYING</a></p>
</div>
<b>Packages:</b><br />
<a href="../li_php-cloudfiles.html">php-cloudfiles</a><br />
<a href="../li_php-cloudfiles-exceptions.html">php-cloudfiles-exceptions</a><br />
<a href="../li_php-cloudfiles-http.html">php-cloudfiles-http</a><br />
<br /><br />
<b>Files:</b><br />
<div class="package">
<a href="../php-cloudfiles/_cloudfiles.php.html"> cloudfiles.php
</a><br>
</div><br />
<b>Classes:</b><br />
<div class="package">
<a href="../php-cloudfiles/CF_Authentication.html">CF_Authentication</a><br />
<a href="../php-cloudfiles/CF_Connection.html">CF_Connection</a><br />
<a href="../php-cloudfiles/CF_Container.html">CF_Container</a><br />
<a href="../php-cloudfiles/CF_Object.html">CF_Object</a><br />
</div>
</td>
<td>
<table cellpadding="10" cellspacing="0" width="100%" border="0"><tr><td valign="top">
<h1>Class: CF_Connection</h1>
Source Location: /cloudfiles.php<br /><br />
<table width="100%" border="0">
<tr><td valign="top">
<h3><a href="#class_details">Class Overview</a></h3>
<pre></pre><br />
<div class="description">Class for establishing connections to the Cloud Files storage system.</div><br /><br />
</td>
<td valign="top">
<h3><a href="#class_vars">Variables</a></h3>
<ul>
<li><a href="../php-cloudfiles/CF_Connection.html#var$cfs_auth">$cfs_auth</a></li>
<li><a href="../php-cloudfiles/CF_Connection.html#var$cfs_http">$cfs_http</a></li>
<li><a href="../php-cloudfiles/CF_Connection.html#var$dbug">$dbug</a></li>
</ul>
</td>
<td valign="top">
<h3><a href="#class_methods">Methods</a></h3>
<ul>
<li><a href="../php-cloudfiles/CF_Connection.html#method__construct">__construct</a></li>
<li><a href="../php-cloudfiles/CF_Connection.html#methodclose">close</a></li>
<li><a href="../php-cloudfiles/CF_Connection.html#methodcreate_container">create_container</a></li>
<li><a href="../php-cloudfiles/CF_Connection.html#methoddelete_container">delete_container</a></li>
<li><a href="../php-cloudfiles/CF_Connection.html#methodget_container">get_container</a></li>
<li><a href="../php-cloudfiles/CF_Connection.html#methodget_containers">get_containers</a></li>
<li><a href="../php-cloudfiles/CF_Connection.html#methodget_info">get_info</a></li>
<li><a href="../php-cloudfiles/CF_Connection.html#methodlist_containers">list_containers</a></li>
<li><a href="../php-cloudfiles/CF_Connection.html#methodlist_containers_info">list_containers_info</a></li>
<li><a href="../php-cloudfiles/CF_Connection.html#methodlist_public_containers">list_public_containers</a></li>
<li><a href="../php-cloudfiles/CF_Connection.html#methodsetDebug">setDebug</a></li>
<li><a href="../php-cloudfiles/CF_Connection.html#methodset_read_progress_function">set_read_progress_function</a></li>
<li><a href="../php-cloudfiles/CF_Connection.html#methodset_write_progress_function">set_write_progress_function</a></li>
<li><a href="../php-cloudfiles/CF_Connection.html#methodssl_use_cabundle">ssl_use_cabundle</a></li>
</ul>
</td>
</tr></table>
<hr />
<table width="100%" border="0"><tr>
</tr></table>
<hr />
<a name="class_details"></a>
<h3>Class Details</h3>
<div class="tags">
[line 341]<br />
Class for establishing connections to the Cloud Files storage system.<br /><br /><p>Connection instances are used to communicate with the storage system at the account level; listing and deleting Containers and returning Container instances.</p><p>Example: <ol><li><div class="src-line"> <span class="src-comm"># Create the authentication instance</span></div></li>
<li><div class="src-line"> <span class="src-comm">#</span></div></li>
<li><div class="src-line"> <span class="src-var">$auth </span>= <span class="src-key">new </span><span class="src-id"><a href="../php-cloudfiles/CF_Authentication.html">CF_Authentication</a></span><span class="src-sym">(</span><span class="src-str">"username"</span><span class="src-sym">, </span><span class="src-str">"api_key"</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"> </div></li>
<li><div class="src-line"> <span class="src-comm"># Perform authentication request</span></div></li>
<li><div class="src-line"> <span class="src-comm">#</span></div></li>
<li><div class="src-line"> <span class="src-var">$auth</span><span class="src-sym">-></span><span class="src-id">authenticate</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"> </div></li>
<li><div class="src-line"> <span class="src-comm"># Create a connection to the storage/cdn system(s) and pass in the</span></div></li>
<li><div class="src-line"> <span class="src-comm"># validated CF_Authentication instance.</span></div></li>
<li><div class="src-line"> <span class="src-comm">#</span></div></li>
<li><div class="src-line"> <span class="src-var">$conn </span>= <span class="src-key">new </span><span class="src-id"><a href="../php-cloudfiles/CF_Connection.html">CF_Connection</a></span><span class="src-sym">(</span><span class="src-var">$auth</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"> </div></li>
<li><div class="src-line"> <span class="src-comm"># NOTE: Some versions of cURL include an outdated certificate authority (CA)</span></div></li>
<li><div class="src-line"> <span class="src-comm"># file. This API ships with a newer version obtained directly from</span></div></li>
<li><div class="src-line"> <span class="src-comm"># cURL's web site (http://curl.haxx.se). To use the newer CA bundle,</span></div></li>
<li><div class="src-line"> <span class="src-comm"># call the CF_Authentication instance's 'ssl_use_cabundle()' method.</span></div></li>
<li><div class="src-line"> <span class="src-comm">#</span></div></li>
<li><div class="src-line"> <span class="src-comm"># $conn->ssl_use_cabundle(); # bypass cURL's old CA bundle</span></div></li>
</ol></p><br /></div><br /><br />
<div class="top">[ <a href="#top">Top</a> ]</div><br />
<hr />
<a name="class_vars"></a>
<h3>Class Variables</h3>
<div class="tags">
<a name="var$cfs_auth"></a>
<p></p>
<h4>$cfs_auth = <span class="value"></span></h4>
<p>[line 345]</p>
<br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>access:</b> </td><td>public</td>
</tr>
</table>
</div>
<br />
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>Type:</b> </td>
<td>mixed</td>
</tr>
</table>
</div><br /><br />
<div class="top">[ <a href="#top">Top</a> ]</div><br />
<a name="var$cfs_http"></a>
<p></p>
<h4>$cfs_http = <span class="value"></span></h4>
<p>[line 344]</p>
<br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>access:</b> </td><td>public</td>
</tr>
</table>
</div>
<br />
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>Type:</b> </td>
<td>mixed</td>
</tr>
</table>
</div><br /><br />
<div class="top">[ <a href="#top">Top</a> ]</div><br />
<a name="var$dbug"></a>
<p></p>
<h4>$dbug = <span class="value"></span></h4>
<p>[line 343]</p>
<br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>access:</b> </td><td>public</td>
</tr>
</table>
</div>
<br />
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>Type:</b> </td>
<td>mixed</td>
</tr>
</table>
</div><br /><br />
<div class="top">[ <a href="#top">Top</a> ]</div><br />
</div><br />
<hr />
<a name="class_methods"></a>
<h3>Class Methods</h3>
<div class="tags">
<hr />
<a name="method__construct"></a>
<h3>constructor __construct <span class="smalllinenumber">[line 380]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>CF_Connection __construct(
obj
$cfs_auth, [boolean
$servicenet = False])</code>
</td></tr></table>
</td></tr></table><br />
Pass in a previously authenticated CF_Authentication instance.<br /><br /><p>Example: <ol><li><div class="src-line"> <span class="src-comm"># Create the authentication instance</span></div></li>
<li><div class="src-line"> <span class="src-comm">#</span></div></li>
<li><div class="src-line"> <span class="src-var">$auth </span>= <span class="src-key">new </span><span class="src-id"><a href="../php-cloudfiles/CF_Authentication.html">CF_Authentication</a></span><span class="src-sym">(</span><span class="src-str">"username"</span><span class="src-sym">, </span><span class="src-str">"api_key"</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"> </div></li>
<li><div class="src-line"> <span class="src-comm"># Perform authentication request</span></div></li>
<li><div class="src-line"> <span class="src-comm">#</span></div></li>
<li><div class="src-line"> <span class="src-var">$auth</span><span class="src-sym">-></span><span class="src-id">authenticate</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"> </div></li>
<li><div class="src-line"> <span class="src-comm"># Create a connection to the storage/cdn system(s) and pass in the</span></div></li>
<li><div class="src-line"> <span class="src-comm"># validated CF_Authentication instance.</span></div></li>
<li><div class="src-line"> <span class="src-comm">#</span></div></li>
<li><div class="src-line"> <span class="src-var">$conn </span>= <span class="src-key">new </span><span class="src-id"><a href="../php-cloudfiles/CF_Connection.html">CF_Connection</a></span><span class="src-sym">(</span><span class="src-var">$auth</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"> </div></li>
<li><div class="src-line"> <span class="src-comm"># If you are connecting via Rackspace servers and have access</span></div></li>
<li><div class="src-line"> <span class="src-comm"># to the servicenet network you can set the $servicenet to True</span></div></li>
<li><div class="src-line"> <span class="src-comm"># like this.</span></div></li>
<li><div class="src-line"> </div></li>
<li><div class="src-line"> <span class="src-var">$conn </span>= <span class="src-key">new </span><span class="src-id"><a href="../php-cloudfiles/CF_Connection.html">CF_Connection</a></span><span class="src-sym">(</span><span class="src-var">$auth</span><span class="src-sym">, </span><span class="src-var">$servicenet</span>=<span class="src-id">True</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>If the environement variable RACKSPACE_SERVICENET is defined it will force to connect via the servicenet.</p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>throws:</b> </td><td>AuthenticationException not authenticated</td>
</tr>
</table>
</div>
<br /><br />
<h4>Parameters:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type">obj </td>
<td><b>$cfs_auth</b> </td>
<td>previously authenticated CF_Authentication instance</td>
</tr>
<tr>
<td class="type">boolean </td>
<td><b>$servicenet</b> </td>
<td>enable/disable access via Rackspace servicenet.</td>
</tr>
</table>
</div><br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<hr />
<a name="methodclose"></a>
<h3>method close <span class="smalllinenumber">[line 419]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>void close(
)</code>
</td></tr></table>
</td></tr></table><br />
Close a connection<br /><br /><p>Example: <ol><li><div class="src-line"> <span class="src-var">$conn</span><span class="src-sym">-></span><a href="../php-cloudfiles/CF_Connection.html#methodclose">close</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><p>Will close all current cUrl active connections.</p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>access:</b> </td><td>public</td>
</tr>
</table>
</div>
<br /><br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<hr />
<a name="methodcreate_container"></a>
<h3>method create_container <span class="smalllinenumber">[line 478]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code><a href="../php-cloudfiles/CF_Container.html">CF_Container</a> create_container(
[string
$container_name = NULL])</code>
</td></tr></table>
</td></tr></table><br />
Create a Container<br /><br /><p>Given a Container name, return a Container instance, creating a new remote Container if it does not exit.</p><p>Example: <ol><li><div class="src-line"> <span class="src-comm"># ... authentication code excluded (see previous examples) ...</span></div></li>
<li><div class="src-line"> <span class="src-comm">#</span></div></li>
<li><div class="src-line"> <span class="src-var">$conn </span>= <span class="src-key">new </span><span class="src-id"><a href="../php-cloudfiles/CF_Authentication.html">CF_Authentication</a></span><span class="src-sym">(</span><span class="src-var">$auth</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"> </div></li>
<li><div class="src-line"> <span class="src-var">$images </span>= <span class="src-var">$conn</span><span class="src-sym">-></span><a href="../php-cloudfiles/CF_Connection.html#methodcreate_container">create_container</a><span class="src-sym">(</span><span class="src-str">"my photos"</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>throws:</b> </td><td>SyntaxException invalid name</td>
</tr>
<tr>
<td><b>throws:</b> </td><td>InvalidResponseException unexpected response</td>
</tr>
</table>
</div>
<br /><br />
<h4>Parameters:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type">string </td>
<td><b>$container_name</b> </td>
<td>container name</td>
</tr>
</table>
</div><br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<hr />
<a name="methoddelete_container"></a>
<h3>method delete_container <span class="smalllinenumber">[line 535]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>boolean delete_container(
[string|obj
$container = NULL])</code>
</td></tr></table>
</td></tr></table><br />
Delete a Container<br /><br /><p>Given either a Container instance or name, remove the remote Container. The Container must be empty prior to removing it.</p><p>Example: <ol><li><div class="src-line"> <span class="src-comm"># ... authentication code excluded (see previous examples) ...</span></div></li>
<li><div class="src-line"> <span class="src-comm">#</span></div></li>
<li><div class="src-line"> <span class="src-var">$conn </span>= <span class="src-key">new </span><span class="src-id"><a href="../php-cloudfiles/CF_Authentication.html">CF_Authentication</a></span><span class="src-sym">(</span><span class="src-var">$auth</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"> </div></li>
<li><div class="src-line"> <span class="src-var">$conn</span><span class="src-sym">-></span><a href="../php-cloudfiles/CF_Connection.html#methoddelete_container">delete_container</a><span class="src-sym">(</span><span class="src-str">"my photos"</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>return:</b> </td><td><kbd>True</kbd> if successfully deleted</td>
</tr>
<tr>
<td><b>throws:</b> </td><td>SyntaxException missing proper argument</td>
</tr>
<tr>
<td><b>throws:</b> </td><td>InvalidResponseException invalid response</td>
</tr>
<tr>
<td><b>throws:</b> </td><td>NonEmptyContainerException container not empty</td>
</tr>
<tr>
<td><b>throws:</b> </td><td>NoSuchContainerException remote container does not exist</td>
</tr>
</table>
</div>
<br /><br />
<h4>Parameters:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type">string|obj </td>
<td><b>$container</b> </td>
<td>container name or instance</td>
</tr>
</table>
</div><br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<hr />
<a name="methodget_container"></a>
<h3>method get_container <span class="smalllinenumber">[line 597]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>container get_container(
[string
$container_name = NULL])</code>
</td></tr></table>
</td></tr></table><br />
Return a Container instance<br /><br /><p>For the given name, return a Container instance if the remote Container exists, otherwise throw a Not Found exception.</p><p>Example: <ol><li><div class="src-line"> <span class="src-comm"># ... authentication code excluded (see previous examples) ...</span></div></li>
<li><div class="src-line"> <span class="src-comm">#</span></div></li>
<li><div class="src-line"> <span class="src-var">$conn </span>= <span class="src-key">new </span><span class="src-id"><a href="../php-cloudfiles/CF_Authentication.html">CF_Authentication</a></span><span class="src-sym">(</span><span class="src-var">$auth</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"> </div></li>
<li><div class="src-line"> <span class="src-var">$images </span>= <span class="src-var">$conn</span><span class="src-sym">-></span><a href="../php-cloudfiles/CF_Connection.html#methodget_container">get_container</a><span class="src-sym">(</span><span class="src-str">"my photos"</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"> print <span class="src-str">"Number of Objects: " </span>. <span class="src-var">$images</span><span class="src-sym">-></span><a href="http://www.php.net/count">count</a> . <span class="src-str">"\n"</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"> print <span class="src-str">"Bytes stored in container: " </span>. <span class="src-var">$images</span><span class="src-sym">-></span><span class="src-id">bytes </span>. <span class="src-str">"\n"</span><span class="src-sym">;</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>return:</b> </td><td>CF_Container instance</td>
</tr>
<tr>
<td><b>throws:</b> </td><td>NoSuchContainerException thrown if no remote Container</td>
</tr>
<tr>
<td><b>throws:</b> </td><td>InvalidResponseException unexpected response</td>
</tr>
</table>
</div>
<br /><br />
<h4>Parameters:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type">string </td>
<td><b>$container_name</b> </td>
<td>name of the remote Container</td>
</tr>
</table>
</div><br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<hr />
<a name="methodget_containers"></a>
<h3>method get_containers <span class="smalllinenumber">[line 639]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>array get_containers(
[
$limit = 0], [
$marker = NULL])</code>
</td></tr></table>
</td></tr></table><br />
Return array of Container instances<br /><br /><p>Return an array of CF_Container instances on the account. The instances will be fully populated with Container attributes (bytes stored and Object count)</p><p>Example: <ol><li><div class="src-line"> <span class="src-comm"># ... authentication code excluded (see previous examples) ...</span></div></li>
<li><div class="src-line"> <span class="src-comm">#</span></div></li>
<li><div class="src-line"> <span class="src-var">$conn </span>= <span class="src-key">new </span><span class="src-id"><a href="../php-cloudfiles/CF_Authentication.html">CF_Authentication</a></span><span class="src-sym">(</span><span class="src-var">$auth</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"> </div></li>
<li><div class="src-line"> <span class="src-var">$clist </span>= <span class="src-var">$conn</span><span class="src-sym">-></span><a href="../php-cloudfiles/CF_Connection.html#methodget_containers">get_containers</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"> <span class="src-key">foreach </span><span class="src-sym">(</span><span class="src-var">$clist </span><span class="src-key">as </span><span class="src-var">$cont</span><span class="src-sym">) </span><span class="src-sym">{</span></div></li>
<li><div class="src-line"> print <span class="src-str">"Container name: " </span>. <span class="src-var">$cont</span><span class="src-sym">-></span><span class="src-id">name </span>. <span class="src-str">"\n"</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"> print <span class="src-str">"Number of Objects: " </span>. <span class="src-var">$cont</span><span class="src-sym">-></span><a href="http://www.php.net/count">count</a> . <span class="src-str">"\n"</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"> print <span class="src-str">"Bytes stored in container: " </span>. <span class="src-var">$cont</span><span class="src-sym">-></span><span class="src-id">bytes </span>. <span class="src-str">"\n"</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"> <span class="src-sym">}</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>return:</b> </td><td>An array of CF_Container instances</td>
</tr>
<tr>
<td><b>throws:</b> </td><td>InvalidResponseException unexpected response</td>
</tr>
</table>
</div>
<br /><br />
<h4>Parameters:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type"> </td>
<td><b>$limit</b> </td>
<td></td>
</tr>
<tr>
<td class="type"> </td>
<td><b>$marker</b> </td>
<td></td>
</tr>
</table>
</div><br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<hr />
<a name="methodget_info"></a>
<h3>method get_info <span class="smalllinenumber">[line 444]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>array get_info(
)</code>
</td></tr></table>
</td></tr></table><br />
Cloud Files account information<br /><br /><p>Return an array of two floats (since PHP only supports 32-bit integers); number of containers on the account and total bytes used for the account.</p><p>Example: <ol><li><div class="src-line"> <span class="src-comm"># ... authentication code excluded (see previous examples) ...</span></div></li>
<li><div class="src-line"> <span class="src-comm">#</span></div></li>
<li><div class="src-line"> <span class="src-var">$conn </span>= <span class="src-key">new </span><span class="src-id"><a href="../php-cloudfiles/CF_Authentication.html">CF_Authentication</a></span><span class="src-sym">(</span><span class="src-var">$auth</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"> </div></li>
<li><div class="src-line"> list<span class="src-sym">(</span><span class="src-var">$quantity</span><span class="src-sym">, </span><span class="src-var">$bytes</span><span class="src-sym">) </span>= <span class="src-var">$conn</span><span class="src-sym">-></span><a href="../php-cloudfiles/CF_Connection.html#methodget_info">get_info</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"> print <span class="src-str">"Number of containers: " </span>. <span class="src-var">$quantity </span>. <span class="src-str">"\n"</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"> print <span class="src-str">"Bytes stored in container: " </span>. <span class="src-var">$bytes </span>. <span class="src-str">"\n"</span><span class="src-sym">;</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>return:</b> </td><td>(number of containers, total bytes stored)</td>
</tr>
<tr>
<td><b>throws:</b> </td><td>InvalidResponseException unexpected response</td>
</tr>
</table>
</div>
<br /><br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<hr />
<a name="methodlist_containers"></a>
<h3>method list_containers <span class="smalllinenumber">[line 683]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>array list_containers(
[integer
$limit = 0], [string
$marker = NULL])</code>
</td></tr></table>
</td></tr></table><br />
Return list of remote Containers<br /><br /><p>Return an array of strings containing the names of all remote Containers.</p><p>Example: <ol><li><div class="src-line"> <span class="src-comm"># ... authentication code excluded (see previous examples) ...</span></div></li>
<li><div class="src-line"> <span class="src-comm">#</span></div></li>
<li><div class="src-line"> <span class="src-var">$conn </span>= <span class="src-key">new </span><span class="src-id"><a href="../php-cloudfiles/CF_Authentication.html">CF_Authentication</a></span><span class="src-sym">(</span><span class="src-var">$auth</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"> </div></li>
<li><div class="src-line"> <span class="src-var">$container_list </span>= <span class="src-var">$conn</span><span class="src-sym">-></span><a href="../php-cloudfiles/CF_Connection.html#methodlist_containers">list_containers</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"> <a href="http://www.php.net/print_r">print_r</a><span class="src-sym">(</span><span class="src-var">$container_list</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"> <span class="src-key">Array</span></div></li>
<li><div class="src-line"> <span class="src-sym">(</span></div></li>
<li><div class="src-line"> <span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">] </span>=> <span class="src-str">"my photos"</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"> <span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">] </span>=> <span class="src-str">"my docs"</span></div></li>
<li><div class="src-line"> <span class="src-sym">)</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>return:</b> </td><td>list of remote Containers</td>
</tr>
<tr>
<td><b>throws:</b> </td><td>InvalidResponseException unexpected response</td>
</tr>
</table>
</div>
<br /><br />
<h4>Parameters:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type">integer </td>
<td><b>$limit</b> </td>
<td>restrict results to $limit Containers</td>
</tr>
<tr>
<td class="type">string </td>
<td><b>$marker</b> </td>
<td>return results greater than $marker</td>
</tr>
</table>
</div><br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<hr />
<a name="methodlist_containers_info"></a>
<h3>method list_containers_info <span class="smalllinenumber">[line 731]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>array list_containers_info(
[integer
$limit = 0], [string
$marker = NULL])</code>
</td></tr></table>
</td></tr></table><br />
Return array of information about remote Containers<br /><br /><p>Return a nested array structure of Container info.</p><p>Example: <ol><li><div class="src-line"> <span class="src-comm"># ... authentication code excluded (see previous examples) ...</span></div></li>
<li><div class="src-line"> <span class="src-comm">#</span></div></li>
<li><div class="src-line"> </div></li>
<li><div class="src-line"> <span class="src-var">$container_info </span>= <span class="src-var">$conn</span><span class="src-sym">-></span><a href="../php-cloudfiles/CF_Connection.html#methodlist_containers_info">list_containers_info</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"> <a href="http://www.php.net/print_r">print_r</a><span class="src-sym">(</span><span class="src-var">$container_info</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"> <span class="src-key">Array</span></div></li>
<li><div class="src-line"> <span class="src-sym">(</span></div></li>
<li><div class="src-line"> <span class="src-sym">[</span><span class="src-str">"my photos"</span><span class="src-sym">] </span>=></div></li>
<li><div class="src-line"> <span class="src-key">Array</span></div></li>
<li><div class="src-line"> <span class="src-sym">(</span></div></li>
<li><div class="src-line"> <span class="src-sym">[</span><span class="src-str">"bytes"</span><span class="src-sym">] </span>=> <span class="src-num">78</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"> <span class="src-sym">[</span><span class="src-str">"count"</span><span class="src-sym">] </span>=> <span class="src-num">2</span></div></li>
<li><div class="src-line"> <span class="src-sym">)</span></div></li>
<li><div class="src-line"> <span class="src-sym">[</span><span class="src-str">"docs"</span><span class="src-sym">] </span>=></div></li>
<li><div class="src-line"> <span class="src-key">Array</span></div></li>
<li><div class="src-line"> <span class="src-sym">(</span></div></li>
<li><div class="src-line"> <span class="src-sym">[</span><span class="src-str">"bytes"</span><span class="src-sym">] </span>=> <span class="src-num">37323</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"> <span class="src-sym">[</span><span class="src-str">"count"</span><span class="src-sym">] </span>=> <span class="src-num">12</span></div></li>
<li><div class="src-line"> <span class="src-sym">)</span></div></li>
<li><div class="src-line"> <span class="src-sym">)</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>return:</b> </td><td>nested array structure of Container info</td>
</tr>
<tr>
<td><b>throws:</b> </td><td>InvalidResponseException unexpected response</td>
</tr>
</table>
</div>
<br /><br />
<h4>Parameters:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type">integer </td>
<td><b>$limit</b> </td>
<td>restrict results to $limit Containers</td>
</tr>
<tr>
<td class="type">string </td>
<td><b>$marker</b> </td>
<td>return results greater than $marker</td>
</tr>
</table>
</div><br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<hr />
<a name="methodlist_public_containers"></a>
<h3>method list_public_containers <span class="smalllinenumber">[line 773]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>array list_public_containers(
[bool
$enabled_only = False])</code>
</td></tr></table>
</td></tr></table><br />
Return list of Containers that have been published to the CDN.<br /><br /><p>Return an array of strings containing the names of published Containers. Note that this function returns the list of any Container that has ever been CDN-enabled regardless of it's existence in the storage system.</p><p>Example: <ol><li><div class="src-line"> <span class="src-comm"># ... authentication code excluded (see previous examples) ...</span></div></li>
<li><div class="src-line"> <span class="src-comm">#</span></div></li>
<li><div class="src-line"> <span class="src-var">$conn </span>= <span class="src-key">new </span><span class="src-id"><a href="../php-cloudfiles/CF_Authentication.html">CF_Authentication</a></span><span class="src-sym">(</span><span class="src-var">$auth</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"> </div></li>
<li><div class="src-line"> <span class="src-var">$public_containers </span>= <span class="src-var">$conn</span><span class="src-sym">-></span><a href="../php-cloudfiles/CF_Connection.html#methodlist_public_containers">list_public_containers</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"> <a href="http://www.php.net/print_r">print_r</a><span class="src-sym">(</span><span class="src-var">$public_containers</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"> <span class="src-key">Array</span></div></li>
<li><div class="src-line"> <span class="src-sym">(</span></div></li>
<li><div class="src-line"> <span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">] </span>=> <span class="src-str">"images"</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"> <span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">] </span>=> <span class="src-str">"css"</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"> <span class="src-sym">[</span><span class="src-num">2</span><span class="src-sym">] </span>=> <span class="src-str">"javascript"</span></div></li>
<li><div class="src-line"> <span class="src-sym">)</span></div></li>
</ol></p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>return:</b> </td><td>list of published Container names</td>
</tr>
<tr>
<td><b>throws:</b> </td><td>InvalidResponseException unexpected response</td>
</tr>
</table>
</div>
<br /><br />
<h4>Parameters:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type">bool </td>
<td><b>$enabled_only</b> </td>
<td>Will list all containers ever CDN enabled if * set to false or only currently enabled CDN containers if set to true. * Defaults to false.</td>
</tr>
</table>
</div><br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<hr />
<a name="methodsetDebug"></a>
<h3>method setDebug <span class="smalllinenumber">[line 400]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>void setDebug(
boolean
$bool)</code>
</td></tr></table>
</td></tr></table><br />
Toggle debugging of instance and back-end HTTP module<br /><br /><br /><br />
<h4>Parameters:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type">boolean </td>
<td><b>$bool</b> </td>
<td>enable/disable cURL debugging</td>
</tr>
</table>
</div><br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<hr />
<a name="methodset_read_progress_function"></a>
<h3>method set_read_progress_function <span class="smalllinenumber">[line 823]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>void set_read_progress_function(
string
$func_name)</code>
</td></tr></table>
</td></tr></table><br />
Set a user-supplied callback function to report download progress<br /><br /><p>The callback function is used to report incremental progress of a data download functions (e.g. $container->list_objects(), $obj->read(), etc). The specified function will be periodically called with the number of bytes transferred until the entire download is complete. This callback function can be useful for implementing "progress bars" for large downloads.</p><p>The specified callback function should take a single integer parameter.</p><p><ol><li><div class="src-line"> <span class="src-key">function </span><span class="src-id">read_callback</span><span class="src-sym">(</span><span class="src-var">$bytes_transferred</span><span class="src-sym">) </span><span class="src-sym">{</span></div></li>
<li><div class="src-line"> print <span class="src-str">">> downloaded " </span>. <span class="src-var">$bytes_transferred </span>. <span class="src-str">" bytes.\n"</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"> <span class="src-comm"># ... do other things ...</span></div></li>
<li><div class="src-line"> <span class="src-key">return</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"> <span class="src-sym">}</span></div></li>
<li><div class="src-line"> </div></li>
<li><div class="src-line"> <span class="src-var">$conn </span>= <span class="src-key">new </span><span class="src-id"><a href="../php-cloudfiles/CF_Connection.html">CF_Connection</a></span><span class="src-sym">(</span><span class="src-var">$auth_obj</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"> <span class="src-var">$conn</span><span class="src-sym">-></span><a href="../php-cloudfiles/CF_Connection.html#methodset_read_progress_function">set_read_progress_function</a><span class="src-sym">(</span><span class="src-str">"read_callback"</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"> <a href="http://www.php.net/print_r">print_r</a><span class="src-sym">(</span><span class="src-var">$conn</span><span class="src-sym">-></span><a href="../php-cloudfiles/CF_Connection.html#methodlist_containers">list_containers</a><span class="src-sym">(</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"> </div></li>
<li><div class="src-line"> <span class="src-comm"># output would look like this:</span></div></li>
<li><div class="src-line"> <span class="src-comm">#</span></div></li>
<li><div class="src-line"> >> <span class="src-id">downloaded </span><span class="src-num">10 </span><span class="src-id">bytes</span>.</div></li>
<li><div class="src-line"> >> <span class="src-id">downloaded </span><span class="src-num">11 </span><span class="src-id">bytes</span>.</div></li>
<li><div class="src-line"> <span class="src-key">Array</span></div></li>
<li><div class="src-line"> <span class="src-sym">(</span></div></li>
<li><div class="src-line"> <span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">] </span>=> <span class="src-id">fuzzy</span>.<span class="src-id">txt</span></div></li>
<li><div class="src-line"> <span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">] </span>=> <span class="src-id">space name</span></div></li>
<li><div class="src-line"> <span class="src-sym">)</span></div></li>
</ol></p><br /><br /><br />
<h4>Parameters:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type">string </td>
<td><b>$func_name</b> </td>
<td>the name of the user callback function</td>
</tr>
</table>
</div><br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<hr />
<a name="methodset_write_progress_function"></a>
<h3>method set_write_progress_function <span class="smalllinenumber">[line 859]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>void set_write_progress_function(
string
$func_name)</code>
</td></tr></table>
</td></tr></table><br />
Set a user-supplied callback function to report upload progress<br /><br /><p>The callback function is used to report incremental progress of a data upload functions (e.g. $obj->write() call). The specified function will be periodically called with the number of bytes transferred until the entire upload is complete. This callback function can be useful for implementing "progress bars" for large uploads/downloads.</p><p>The specified callback function should take a single integer parameter.</p><p><ol><li><div class="src-line"> <span class="src-key">function </span><span class="src-id">write_callback</span><span class="src-sym">(</span><span class="src-var">$bytes_transferred</span><span class="src-sym">) </span><span class="src-sym">{</span></div></li>
<li><div class="src-line"> print <span class="src-str">">> uploaded " </span>. <span class="src-var">$bytes_transferred </span>. <span class="src-str">" bytes.\n"</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"> <span class="src-comm"># ... do other things ...</span></div></li>
<li><div class="src-line"> <span class="src-key">return</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"> <span class="src-sym">}</span></div></li>
<li><div class="src-line"> </div></li>
<li><div class="src-line"> <span class="src-var">$conn </span>= <span class="src-key">new </span><span class="src-id"><a href="../php-cloudfiles/CF_Connection.html">CF_Connection</a></span><span class="src-sym">(</span><span class="src-var">$auth_obj</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"> <span class="src-var">$conn</span><span class="src-sym">-></span><a href="../php-cloudfiles/CF_Connection.html#methodset_write_progress_function">set_write_progress_function</a><span class="src-sym">(</span><span class="src-str">"write_callback"</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"> <span class="src-var">$container </span>= <span class="src-var">$conn</span><span class="src-sym">-></span><a href="../php-cloudfiles/CF_Connection.html#methodcreate_container">create_container</a><span class="src-sym">(</span><span class="src-str">"stuff"</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"> <span class="src-var">$obj </span>= <span class="src-var">$container</span><span class="src-sym">-></span><span class="src-id">create_object</span><span class="src-sym">(</span><span class="src-str">"foo"</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"> <span class="src-var">$obj</span><span class="src-sym">-></span><span class="src-id">write</span><span class="src-sym">(</span><span class="src-str">"The callback function will be called during upload."</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"> </div></li>
<li><div class="src-line"> <span class="src-comm"># output would look like this:</span></div></li>
<li><div class="src-line"> <span class="src-comm"># >> uploaded 51 bytes.</span></div></li>
<li><div class="src-line"> <span class="src-comm">#</span></div></li>
</ol></p><br /><br /><br />
<h4>Parameters:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type">string </td>
<td><b>$func_name</b> </td>
<td>the name of the user callback function</td>
</tr>
</table>
</div><br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<hr />
<a name="methodssl_use_cabundle"></a>
<h3>method ssl_use_cabundle <span class="smalllinenumber">[line 885]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>void ssl_use_cabundle(
[string
$path = NULL])</code>
</td></tr></table>
</td></tr></table><br />
Use the Certificate Authority bundle included with this API<br /><br /><p>Most versions of PHP with cURL support include an outdated Certificate Authority (CA) bundle (the file that lists all valid certificate signing authorities). The SSL certificates used by the Cloud Files storage system are perfectly valid but have been created/signed by a CA not listed in these outdated cURL distributions.</p><p>As a work-around, we've included an updated CA bundle obtained directly from cURL's web site (http://curl.haxx.se). You can direct the API to use this CA bundle by calling this method prior to making any remote calls. The best place to use this method is right after the CF_Authentication instance has been instantiated.</p><p>You can specify your own CA bundle by passing in the full pathname to the bundle. You can use the included CA bundle by leaving the argument blank.</p><br /><br /><br />
<h4>Parameters:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type">string </td>
<td><b>$path</b> </td>
<td>Specify path to CA bundle (default to included)</td>
</tr>
</table>
</div><br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
</div><br />
<div class="credit">
<hr />
Documentation generated on Wed, 07 Sep 2011 15:19:55 -0500 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
</div>
</td></tr></table>
</td>
</tr>
</table>
</body>
</html>