Source

riak-0.9.2 / client_lib / php / docs / riakbucket / riakbucket.html

Full commit
  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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<html lang="en">
<head>

<meta name="generator" content="PHPDoctor 2RC4 (http://phpdoctor.sourceforge.net/)">
<meta name="when" content="Wed, 10 Mar 2010 17:01:22 -0500">

<link rel="stylesheet" type="text/css" href="../stylesheet.css">
<link rel="start" href="../overview-summary.html">

<title>RiakBucket (Riak PHP Client API)</title>

</head>
<body id="definition" onload="parent.document.title=document.title;">

<div class="header">
<h1>RiakAPI</h1>
<ul>
<li><a href="../overview-summary.html">Overview</a></li>
<li><a href="../riakbucket/package-summary.html">Package</a></li>
<li class="active">Class</li>
<li><a href="../riakbucket/package-tree.html">Tree</a></li>
<li><a href="../deprecated-list.html">Deprecated</a></li>
<li><a href="../index-all.html">Index</a></li>
</ul>
</div>

<div class="small_links">
<a href="../index.html" target="_top">Frames</a>
<a href="../riakbucket/riakbucket.html" target="_top">No frames</a>
</div>
<div class="small_links">
Summary: <a href="#summary_field">Field</a> | <a href="#summary_method">Method</a> | <a href="#summary_constr">Constr</a>
Detail: <a href="#detail_field">Field</a> | <a href="#detail_method">Method</a> | <a href="#summary_constr">Constr</a>
</div>
<hr>

<div class="qualifiedName">RiakBucket.RiakBucket</div>
<div class="location">/riak.php at line 577</div>

<h1>Class RiakBucket</h1>

<pre class="tree"><strong>RiakBucket</strong><br /></pre>

<hr>

<p class="signature">public  class <strong>RiakBucket</strong></p>

<div class="comment" id="overview_description"><p>The RiakBucket object allows you to access and change information
about a Riak bucket, and provides methods to create or retrieve
objects within the bucket.</p></div>

<hr>

<table id="summary_constr">
<tr><th colspan="2">Constructor Summary</th></tr>
<tr>
<td class="description"><p class="name"><a href="#RiakBucket()">RiakBucket</a>(mixed client, mixed name)</p></td>
</tr>
</table>

<table id="summary_method">
<tr><th colspan="2">Method Summary</th></tr>
<tr>
<td class="type"> <a href="../riakobject/riakobject.html">RiakObject</a></td>
<td class="description"><p class="name"><a href="#get()">get</a>(string key, int r)</p><p class="description">Retrieve a JSON-encoded object from Riak.</p></td>
</tr>
<tr>
<td class="type"> Boolean</td>
<td class="description"><p class="name"><a href="#getAllowMultiples()">getAllowMultiples</a>()</p><p class="description">Retrieve the 'allow multiples' setting.</p></td>
</tr>
<tr>
<td class="type"> <a href="../riakobject/riakobject.html">RiakObject</a></td>
<td class="description"><p class="name"><a href="#getBinary()">getBinary</a>(string key, int r)</p><p class="description">Retrieve a binary/string object from Riak.</p></td>
</tr>
<tr>
<td class="type"> integer</td>
<td class="description"><p class="name"><a href="#getDW()">getDW</a>(mixed dw)</p><p class="description">Get the DW-value for this bucket, if it is set, otherwise return
the DW-value for the client.</p></td>
</tr>
<tr>
<td class="type"> integer</td>
<td class="description"><p class="name"><a href="#getNVal()">getNVal</a>()</p><p class="description">Retrieve the N-value for this bucket.</p></td>
</tr>
<tr>
<td class="type"> void</td>
<td class="description"><p class="name"><a href="#getName()">getName</a>()</p><p class="description">Get the bucket name.</p></td>
</tr>
<tr>
<td class="type"> Array</td>
<td class="description"><p class="name"><a href="#getProperties()">getProperties</a>()</p><p class="description">Retrieve an associative array of all bucket properties.</p></td>
</tr>
<tr>
<td class="type"> mixed</td>
<td class="description"><p class="name"><a href="#getProperty()">getProperty</a>(string key)</p><p class="description">Retrieve a bucket property.</p></td>
</tr>
<tr>
<td class="type"> integer</td>
<td class="description"><p class="name"><a href="#getR()">getR</a>(mixed r)</p><p class="description">Get the R-value for this bucket, if it is set, otherwise return
the R-value for the client.</p></td>
</tr>
<tr>
<td class="type"> integer</td>
<td class="description"><p class="name"><a href="#getW()">getW</a>(mixed w)</p><p class="description">Get the W-value for this bucket, if it is set, otherwise return
the W-value for the client.</p></td>
</tr>
<tr>
<td class="type"> <a href="../riakobject/riakobject.html">RiakObject</a></td>
<td class="description"><p class="name"><a href="#newBinary()">newBinary</a>(string key, object data, string content_type)</p><p class="description">Create a new Riak object that will be stored as plain text/binary.</p></td>
</tr>
<tr>
<td class="type"> <a href="../riakobject/riakobject.html">RiakObject</a></td>
<td class="description"><p class="name"><a href="#newObject()">newObject</a>(string key, object data)</p><p class="description">Create a new Riak object that will be stored as JSON.</p></td>
</tr>
<tr>
<td class="type"> void</td>
<td class="description"><p class="name"><a href="#setAllowMultiples()">setAllowMultiples</a>(boolean bool)</p><p class="description">If set to true, then writes with conflicting data will be stored
and returned to the client. </p></td>
</tr>
<tr>
<td class="type"> $this</td>
<td class="description"><p class="name"><a href="#setDW()">setDW</a>(integer dw)</p><p class="description">Set the DW-value for this bucket. </p></td>
</tr>
<tr>
<td class="type"> void</td>
<td class="description"><p class="name"><a href="#setNVal()">setNVal</a>(integer nval)</p><p class="description">Set the N-value for this bucket, which is the number of replicas
that will be written of each object in the bucket. </p></td>
</tr>
<tr>
<td class="type"> void</td>
<td class="description"><p class="name"><a href="#setProperties()">setProperties</a>(array props)</p><p class="description">Set multiple bucket properties in one call. </p></td>
</tr>
<tr>
<td class="type"> void</td>
<td class="description"><p class="name"><a href="#setProperty()">setProperty</a>(string key, mixed value)</p><p class="description">Set a bucket property. </p></td>
</tr>
<tr>
<td class="type"> $this</td>
<td class="description"><p class="name"><a href="#setR()">setR</a>(integer r)</p><p class="description">Set the R-value for this bucket. </p></td>
</tr>
<tr>
<td class="type"> $this</td>
<td class="description"><p class="name"><a href="#setW()">setW</a>(integer w)</p><p class="description">Set the W-value for this bucket. </p></td>
</tr>
</table>

<h2 id="detail_constr">Constructor Detail</h2>
<div class="location">/riak.php at line 578</div>
<h3 id="RiakBucket()">RiakBucket</h3>
<code class="signature">public <strong>RiakBucket</strong>(mixed client, mixed name)</code>
<div class="details">
</div>

<hr>

<h2 id="detail_method">Method Detail</h2>
<div class="location">/riak.php at line 692</div>
<h3 id="get()">get</h3>
<code class="signature">public  <a href="../riakobject/riakobject.html">RiakObject</a> <strong>get</strong>(string key, int r)</code>
<div class="details">
<p>Retrieve a JSON-encoded object from Riak.</p><dl>
<dt>Parameters:</dt>
<dd>key - - Name of the key.</dd>
<dd>r - - R-Value of the request (defaults to bucket's R)</dd>
</dl>
</div>

<hr>

<div class="location">/riak.php at line 747</div>
<h3 id="getAllowMultiples()">getAllowMultiples</h3>
<code class="signature">public  Boolean <strong>getAllowMultiples</strong>()</code>
<div class="details">
<p>Retrieve the 'allow multiples' setting.</p></div>

<hr>

<div class="location">/riak.php at line 705</div>
<h3 id="getBinary()">getBinary</h3>
<code class="signature">public  <a href="../riakobject/riakobject.html">RiakObject</a> <strong>getBinary</strong>(string key, int r)</code>
<div class="details">
<p>Retrieve a binary/string object from Riak.</p><dl>
<dt>Parameters:</dt>
<dd>key - - Name of the key.</dd>
<dd>r - - R-Value of the request (defaults to bucket's R)</dd>
</dl>
</div>

<hr>

<div class="location">/riak.php at line 641</div>
<h3 id="getDW()">getDW</h3>
<code class="signature">public  integer <strong>getDW</strong>(mixed dw)</code>
<div class="details">
<p>Get the DW-value for this bucket, if it is set, otherwise return
the DW-value for the client.</p></div>

<hr>

<div class="location">/riak.php at line 728</div>
<h3 id="getNVal()">getNVal</h3>
<code class="signature">public  integer <strong>getNVal</strong>()</code>
<div class="details">
<p>Retrieve the N-value for this bucket.</p></div>

<hr>

<div class="location">/riak.php at line 589</div>
<h3 id="getName()">getName</h3>
<code class="signature">public  void <strong>getName</strong>()</code>
<div class="details">
<p>Get the bucket name.</p></div>

<hr>

<div class="location">/riak.php at line 805</div>
<h3 id="getProperties()">getProperties</h3>
<code class="signature">public  Array <strong>getProperties</strong>()</code>
<div class="details">
<p>Retrieve an associative array of all bucket properties.</p></div>

<hr>

<div class="location">/riak.php at line 766</div>
<h3 id="getProperty()">getProperty</h3>
<code class="signature">public  mixed <strong>getProperty</strong>(string key)</code>
<div class="details">
<p>Retrieve a bucket property.</p><dl>
<dt>Parameters:</dt>
<dd>key - - The property to retrieve.</dd>
</dl>
</div>

<hr>

<div class="location">/riak.php at line 598</div>
<h3 id="getR()">getR</h3>
<code class="signature">public  integer <strong>getR</strong>(mixed r)</code>
<div class="details">
<p>Get the R-value for this bucket, if it is set, otherwise return
the R-value for the client.</p></div>

<hr>

<div class="location">/riak.php at line 620</div>
<h3 id="getW()">getW</h3>
<code class="signature">public  integer <strong>getW</strong>(mixed w)</code>
<div class="details">
<p>Get the W-value for this bucket, if it is set, otherwise return
the W-value for the client.</p></div>

<hr>

<div class="location">/riak.php at line 678</div>
<h3 id="newBinary()">newBinary</h3>
<code class="signature">public  <a href="../riakobject/riakobject.html">RiakObject</a> <strong>newBinary</strong>(string key, object data, string content_type)</code>
<div class="details">
<p>Create a new Riak object that will be stored as plain text/binary.</p><dl>
<dt>Parameters:</dt>
<dd>key - - Name of the key.</dd>
<dd>data - - The data to store.</dd>
<dd>content_type - - The content type of the object. (default 'text/json')</dd>
</dl>
</div>

<hr>

<div class="location">/riak.php at line 663</div>
<h3 id="newObject()">newObject</h3>
<code class="signature">public  <a href="../riakobject/riakobject.html">RiakObject</a> <strong>newObject</strong>(string key, object data)</code>
<div class="details">
<p>Create a new Riak object that will be stored as JSON.</p><dl>
<dt>Parameters:</dt>
<dd>key - - Name of the key.</dd>
<dd>data - - The data to store. (default NULL)</dd>
</dl>
</div>

<hr>

<div class="location">/riak.php at line 739</div>
<h3 id="setAllowMultiples()">setAllowMultiples</h3>
<code class="signature">public  void <strong>setAllowMultiples</strong>(boolean bool)</code>
<div class="details">
<p>If set to true, then writes with conflicting data will be stored
and returned to the client. This situation can be detected by
calling hasSiblings() and getSiblings(). This should only be used
if you know what you are doing.</p><dl>
<dt>Parameters:</dt>
<dd>bool - - True to store and return conflicting writes.</dd>
</dl>
</div>

<hr>

<div class="location">/riak.php at line 652</div>
<h3 id="setDW()">setDW</h3>
<code class="signature">public  $this <strong>setDW</strong>(integer dw)</code>
<div class="details">
<p>Set the DW-value for this bucket. See setR(...) for more information.</p><dl>
<dt>Parameters:</dt>
<dd>dw - - The new DW-value</dd>
</dl>
</div>

<hr>

<div class="location">/riak.php at line 720</div>
<h3 id="setNVal()">setNVal</h3>
<code class="signature">public  void <strong>setNVal</strong>(integer nval)</code>
<div class="details">
<p>Set the N-value for this bucket, which is the number of replicas
that will be written of each object in the bucket. Set this once
before you write any data to the bucket, and never change it
again, otherwise unpredictable things could happen. This should
only be used if you know what you are doing.</p><dl>
<dt>Parameters:</dt>
<dd>nval - - The new N-Val.</dd>
</dl>
</div>

<hr>

<div class="location">/riak.php at line 780</div>
<h3 id="setProperties()">setProperties</h3>
<code class="signature">public  void <strong>setProperties</strong>(array props)</code>
<div class="details">
<p>Set multiple bucket properties in one call. This should only be
used if you know what you are doing.</p><dl>
<dt>Parameters:</dt>
<dd>props - - An associative array of $key=>$value.</dd>
</dl>
</div>

<hr>

<div class="location">/riak.php at line 757</div>
<h3 id="setProperty()">setProperty</h3>
<code class="signature">public  void <strong>setProperty</strong>(string key, mixed value)</code>
<div class="details">
<p>Set a bucket property. This should only be used if you know what
you are doing.</p><dl>
<dt>Parameters:</dt>
<dd>key - - Property to set.</dd>
<dd>value - - Property value.</dd>
</dl>
</div>

<hr>

<div class="location">/riak.php at line 610</div>
<h3 id="setR()">setR</h3>
<code class="signature">public  $this <strong>setR</strong>(integer r)</code>
<div class="details">
<p>Set the R-value for this bucket. get(...) and getBinary(...)
operations that do not specify an R-value will use this value.</p><dl>
<dt>Parameters:</dt>
<dd>r - - The new R-value.</dd>
</dl>
</div>

<hr>

<div class="location">/riak.php at line 631</div>
<h3 id="setW()">setW</h3>
<code class="signature">public  $this <strong>setW</strong>(integer w)</code>
<div class="details">
<p>Set the W-value for this bucket. See setR(...) for more information.</p><dl>
<dt>Parameters:</dt>
<dd>w - - The new W-value.</dd>
</dl>
</div>

<hr>

<div class="header">
<h1>RiakAPI</h1>
<ul>
<li><a href="../overview-summary.html">Overview</a></li>
<li><a href="../riakbucket/package-summary.html">Package</a></li>
<li class="active">Class</li>
<li><a href="../riakbucket/package-tree.html">Tree</a></li>
<li><a href="../deprecated-list.html">Deprecated</a></li>
<li><a href="../index-all.html">Index</a></li>
</ul>
</div>

<div class="small_links">
<a href="../index.html" target="_top">Frames</a>
<a href="../riakbucket/riakbucket.html" target="_top">No frames</a>
</div>
<div class="small_links">
Summary: <a href="#summary_field">Field</a> | <a href="#summary_method">Method</a> | <a href="#summary_constr">Constr</a>
Detail: <a href="#detail_field">Field</a> | <a href="#detail_method">Method</a> | <a href="#summary_constr">Constr</a>
</div>
<hr>

<p id="footer">This document was generated by <a href="http://peej.github.com/phpdoctor/">PHPDoctor: The PHP Documentation Creator</a></p>

</body>

</html>