-
Notifications
You must be signed in to change notification settings - Fork 788
/
Copy pathbinary.xml
303 lines (273 loc) · 9.85 KB
/
binary.xml
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
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<reference xml:id="class.mongodb-bson-binary" role="class" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude">
<title>The MongoDB\BSON\Binary class</title>
<titleabbrev>MongoDB\BSON\Binary</titleabbrev>
<partintro>
<!-- {{{ MongoDB\BSON\Binary intro -->
<section xml:id="mongodb-bson-binary.intro">
&reftitle.intro;
<para>
BSON type for binary data (i.e. array of bytes). Binary values also have a
subtype, which is used to indicate what kind of data is in the byte array.
Subtypes from zero to 127 are predefined or reserved. Subtypes from 128-255
are user-defined.
</para>
</section>
<!-- }}} -->
<section xml:id="mongodb-bson-binary.synopsis">
&reftitle.classsynopsis;
<!-- {{{ Synopsis -->
<classsynopsis>
<ooclass><classname>MongoDB\BSON\Binary</classname></ooclass>
<!-- {{{ Class synopsis -->
<classsynopsisinfo>
<modifier>final</modifier>
<ooclass>
<classname>MongoDB\BSON\Binary</classname>
</ooclass>
<oointerface>
<interfacename>MongoDB\BSON\BinaryInterface</interfacename>
</oointerface>
<oointerface>
<interfacename>MongoDB\BSON\Type</interfacename>
</oointerface>
<oointerface>
<interfacename>JsonSerializable</interfacename>
</oointerface>
<oointerface>
<interfacename>Stringable</interfacename>
</oointerface>
</classsynopsisinfo>
<!-- }}} -->
<classsynopsisinfo role="comment">&Constants;</classsynopsisinfo>
<fieldsynopsis>
<modifier>const</modifier>
<type>int</type>
<varname linkend="mongodb-bson-binary.constants.type-generic">MongoDB\BSON\Binary::TYPE_GENERIC</varname>
<initializer>0</initializer>
</fieldsynopsis>
<fieldsynopsis>
<modifier>const</modifier>
<type>int</type>
<varname linkend="mongodb-bson-binary.constants.type-function">MongoDB\BSON\Binary::TYPE_FUNCTION</varname>
<initializer>1</initializer>
</fieldsynopsis>
<fieldsynopsis>
<modifier>const</modifier>
<type>int</type>
<varname linkend="mongodb-bson-binary.constants.type-old-binary">MongoDB\BSON\Binary::TYPE_OLD_BINARY</varname>
<initializer>2</initializer>
</fieldsynopsis>
<fieldsynopsis>
<modifier>const</modifier>
<type>int</type>
<varname linkend="mongodb-bson-binary.constants.type-old-uuid">MongoDB\BSON\Binary::TYPE_OLD_UUID</varname>
<initializer>3</initializer>
</fieldsynopsis>
<fieldsynopsis>
<modifier>const</modifier>
<type>int</type>
<varname linkend="mongodb-bson-binary.constants.type-uuid">MongoDB\BSON\Binary::TYPE_UUID</varname>
<initializer>4</initializer>
</fieldsynopsis>
<fieldsynopsis>
<modifier>const</modifier>
<type>int</type>
<varname linkend="mongodb-bson-binary.constants.type-md5">MongoDB\BSON\Binary::TYPE_MD5</varname>
<initializer>5</initializer>
</fieldsynopsis>
<fieldsynopsis>
<modifier>const</modifier>
<type>int</type>
<varname linkend="mongodb-bson-binary.constants.type-encrypted">MongoDB\BSON\Binary::TYPE_ENCRYPTED</varname>
<initializer>6</initializer>
</fieldsynopsis>
<fieldsynopsis>
<modifier>const</modifier>
<type>int</type>
<varname linkend="mongodb-bson-binary.constants.type-column">MongoDB\BSON\Binary::TYPE_COLUMN</varname>
<initializer>7</initializer>
</fieldsynopsis>
<fieldsynopsis>
<modifier>const</modifier>
<type>int</type>
<varname linkend="mongodb-bson-binary.constants.type-sensitive">MongoDB\BSON\Binary::TYPE_SENSITIVE</varname>
<initializer>8</initializer>
</fieldsynopsis>
<fieldsynopsis>
<modifier>const</modifier>
<type>int</type>
<varname linkend="mongodb-bson-binary.constants.type-user-defined">MongoDB\BSON\Binary::TYPE_USER_DEFINED</varname>
<initializer>128</initializer>
</fieldsynopsis>
<classsynopsisinfo role="comment">&Methods;</classsynopsisinfo>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.mongodb-bson-binary')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[not(@role='procedural')])" />
</classsynopsis>
<!-- }}} -->
</section>
<!-- {{{ MongoDB\BSON\Binary constants -->
<section xml:id="mongodb-bson-binary.constants">
&reftitle.constants;
<variablelist>
<varlistentry xml:id="mongodb-bson-binary.constants.type-generic">
<term><constant>MongoDB\BSON\Binary::TYPE_GENERIC</constant></term>
<listitem>
<para>Generic binary data.</para>
</listitem>
</varlistentry>
<varlistentry xml:id="mongodb-bson-binary.constants.type-function">
<term><constant>MongoDB\BSON\Binary::TYPE_FUNCTION</constant></term>
<listitem>
<para>Function.</para>
</listitem>
</varlistentry>
<varlistentry xml:id="mongodb-bson-binary.constants.type-old-binary">
<term><constant>MongoDB\BSON\Binary::TYPE_OLD_BINARY</constant></term>
<listitem>
<para>Generic binary data (deprecated in favor of <constant>MongoDB\BSON\Binary::TYPE_GENERIC</constant>).</para>
</listitem>
</varlistentry>
<varlistentry xml:id="mongodb-bson-binary.constants.type-old-uuid">
<term><constant>MongoDB\BSON\Binary::TYPE_OLD_UUID</constant></term>
<listitem>
<para>
Universally unique identifier (deprecated in favor of
<constant>MongoDB\BSON\Binary::TYPE_UUID</constant>). When using this
type, the Binary's data should be 16 bytes in length.
</para>
<para>
Historically, other drivers encoded values with this type based on their
language conventions (e.g. varying endianness), which makes it
non-portable. The PHP extension applies no special handling for encoding
or decoding data with this type.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="mongodb-bson-binary.constants.type-uuid">
<term><constant>MongoDB\BSON\Binary::TYPE_UUID</constant></term>
<listitem>
<para>
Universally unique identifier. When using this type, the Binary's
data should be 16 bytes in length and encoded according to
<link xlink:href="&url.rfc;4122">RFC 4122</link>.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="mongodb-bson-binary.constants.type-md5">
<term><constant>MongoDB\BSON\Binary::TYPE_MD5</constant></term>
<listitem>
<para>MD5 hash. When using this type, the Binary's data should be 16 bytes in length.</para>
</listitem>
</varlistentry>
<varlistentry xml:id="mongodb-bson-binary.constants.type-encrypted">
<term><constant>MongoDB\BSON\Binary::TYPE_ENCRYPTED</constant></term>
<listitem>
<para>Encrypted value. This subtype is used for client-side encryption.</para>
</listitem>
</varlistentry>
<varlistentry xml:id="mongodb-bson-binary.constants.type-column">
<term><constant>MongoDB\BSON\Binary::TYPE_COLUMN</constant></term>
<listitem>
<para>Column data. This subtype is used for time-series collections.</para>
</listitem>
</varlistentry>
<varlistentry xml:id="mongodb-bson-binary.constants.type-sensitive">
<term><constant>MongoDB\BSON\Binary::TYPE_SENSITIVE</constant></term>
<listitem>
<para>
Sensitive data. This subtype is used for sensitive data that should be
excluded from server-side logging when possible.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="mongodb-bson-binary.constants.type-user-defined">
<term><constant>MongoDB\BSON\Binary::TYPE_USER_DEFINED</constant></term>
<listitem>
<para>
User-defined type. While types between 0 and 127 are predefined or
reserved, types between 128 and 255 are user-defined and may be used for
anything.
</para>
</listitem>
</varlistentry>
</variablelist>
</section>
<!-- }}} -->
<section role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
&mongodb.changelog.serializable-interface-removed;
<row>
<entry>PECL mongodb 1.17.0</entry>
<entry>
Added <constant>MongoDB\BSON\Binary::TYPE_SENSITIVE</constant>.
</entry>
</row>
<row>
<entry>PECL mongodb 1.12.0</entry>
<entry>
<para>
Implements <interfacename>Stringable</interfacename> for PHP 8.0+.
</para>
<para>
Added <constant>MongoDB\BSON\Binary::TYPE_COLUMN</constant>.
</para>
</entry>
</row>
<row>
<entry>PECL mongodb 1.7.0</entry>
<entry>
Added <constant>MongoDB\BSON\Binary::TYPE_ENCRYPTED</constant>.
</entry>
</row>
<row>
<entry>PECL mongodb 1.3.0</entry>
<entry>
Implements <interfacename>MongoDB\BSON\BinaryInterface</interfacename>.
</entry>
</row>
<row>
<entry>PECL mongodb 1.2.0</entry>
<entry>
Implements <interfacename>Serializable</interfacename> and
<interfacename>JsonSerializable</interfacename>.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</section>
</partintro>
&reference.mongodb.bson.entities.binary;
</reference>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->