2009-03-24 18:46:00 +00:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
2009-07-11 08:06:30 +00:00
|
|
|
<!-- $Revision$ -->
|
2009-03-24 18:46:00 +00:00
|
|
|
|
|
|
|
<refentry xml:id="mongobindata.construct" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
|
|
<refnamediv>
|
|
|
|
<refname>MongoBinData::__construct</refname>
|
|
|
|
<refpurpose>Creates a new binary data object.</refpurpose>
|
|
|
|
</refnamediv>
|
|
|
|
|
|
|
|
<refsect1 role="description">
|
|
|
|
&reftitle.description;
|
|
|
|
<methodsynopsis>
|
2009-05-20 22:31:40 +00:00
|
|
|
<modifier>public</modifier> <methodname>MongoBinData::__construct</methodname>
|
2009-03-24 18:46:00 +00:00
|
|
|
<methodparam><type>string</type><parameter>data</parameter></methodparam>
|
2014-03-10 13:40:50 +00:00
|
|
|
<methodparam choice="opt"><type>int</type><parameter>type</parameter><initializer>0</initializer></methodparam>
|
2009-03-24 18:46:00 +00:00
|
|
|
</methodsynopsis>
|
|
|
|
<para>
|
|
|
|
Creates a new binary data object.
|
|
|
|
</para>
|
2009-11-12 22:45:05 +00:00
|
|
|
<para>
|
2014-01-28 22:08:52 +00:00
|
|
|
There are seven types of binary data currently recognized by the BSON spec,
|
|
|
|
which are defined as
|
|
|
|
<link linkend="mongobindata.constants.types">class constants</link>. For
|
|
|
|
backwards compatibility, the PHP driver uses
|
|
|
|
<constant>MongoBinData::BYTE_ARRAY</constant> as the default; however, this
|
|
|
|
may change to <constant>MongoBinData::GENERIC</constant> in the future.
|
|
|
|
Users are encouraged to specify a type instead of relying on the default.
|
2009-11-12 22:45:05 +00:00
|
|
|
</para>
|
2009-03-24 18:46:00 +00:00
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1 role="parameters">
|
|
|
|
&reftitle.parameters;
|
|
|
|
<para>
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
|
|
<term>
|
|
|
|
<parameter>data</parameter>
|
|
|
|
</term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Binary data.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term>
|
2009-06-05 09:33:58 +00:00
|
|
|
<parameter>type</parameter>
|
2009-03-24 18:46:00 +00:00
|
|
|
</term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Data type.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1 role="returnvalues">
|
|
|
|
&reftitle.returnvalues;
|
|
|
|
<para>
|
|
|
|
Returns a new binary data object.
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
2012-07-19 16:57:19 +00:00
|
|
|
<refsect1 role="changelog">
|
|
|
|
&reftitle.changelog;
|
|
|
|
<para>
|
|
|
|
<informaltable>
|
|
|
|
<tgroup cols="2">
|
|
|
|
<thead>
|
|
|
|
<row>
|
|
|
|
<entry>&Version;</entry>
|
|
|
|
<entry>&Description;</entry>
|
|
|
|
</row>
|
|
|
|
</thead>
|
2014-03-10 13:40:50 +00:00
|
|
|
<tbody>
|
|
|
|
<row>
|
|
|
|
<entry>1.5.0</entry>
|
|
|
|
<entry>
|
|
|
|
The default changed from <literal>2</literal>
|
|
|
|
(<constant>MongoBinData::BYTE_ARRAY</constant>) to
|
|
|
|
<literal>0</literal> (<constant>MongoBinData::GENERIC</constant>).
|
|
|
|
</entry>
|
|
|
|
</row>
|
2012-07-19 16:57:19 +00:00
|
|
|
<row>
|
|
|
|
<entry>1.2.11</entry>
|
|
|
|
<entry>
|
2012-10-05 20:22:15 +00:00
|
|
|
Emits <constant>E_DEPRECATED</constant> when the second argument is not
|
|
|
|
used. The default value for <parameter>type</parameter> may change in
|
|
|
|
the near future.
|
2012-07-19 16:57:19 +00:00
|
|
|
</entry>
|
|
|
|
</row>
|
|
|
|
</tbody>
|
|
|
|
</tgroup>
|
|
|
|
</informaltable>
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
2009-03-24 18:46:00 +00:00
|
|
|
</refentry>
|
|
|
|
|
|
|
|
<!-- 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
|
2009-09-25 07:04:39 +00:00
|
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
2009-03-24 18:46:00 +00:00
|
|
|
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
|
|
|
|
-->
|