Files
php-doc-ru/reference/mongo/mongobindata/construct.xml
sergey b1272ab8f5 new
git-svn-id: https://svn.php.net/repository/phpdoc/ru/trunk@347189 c90b9560-bf6c-de11-be94-00142212c4b1
2019-04-10 16:35:28 +00:00

130 lines
4.0 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: dd07341fae2c414adc1f700be0890ff32e8daab4 Maintainer: sergey Status: ready -->
<!-- Reviewed: no -->
<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>Создает новый двоичный объект данных</refpurpose>
</refnamediv>
<refsynopsisdiv role="soft-deprecation-notice">
<sidebar>
&mongo.alternative.method.note;
<simplelist role="alternatives">
<member><methodname>MongoDB\BSON\Binary::__construct</methodname></member>
</simplelist>
</sidebar>
</refsynopsisdiv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <methodname>MongoBinData::__construct</methodname>
<methodparam><type>string</type><parameter>data</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>type</parameter><initializer>0</initializer></methodparam>
</methodsynopsis>
<para>
Создает новый двоичный объект данных.
</para>
<para>
Существует семь типов двоичных данных,
в настоящее время распознаваемых спецификацией BSON,
которые определены как <link linkend="mongobindata.constants.types">константы класса</link>.
Для обратной совместимости драйвер PHP использует <constant>MongoBinData::BYTE_ARRAY</constant> по умолчанию;
однако, это может быть изменено на <constant>MongoBinData::GENERIC</constant> в будущем.
Рекомендуется указывать тип, а не полагаться на значение по умолчанию.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term>
<parameter>data</parameter>
</term>
<listitem>
<para>
Двоичные данные.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<parameter>type</parameter>
</term>
<listitem>
<para>
Тип данных.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Возвращает новый двоичный объект данных.
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>1.5.0</entry>
<entry>
Значение по умолчанию изменено с <literal>2</literal> (<constant>MongoBinData::BYTE_ARRAY</constant>)
на <literal>0</literal> (<constant>MongoBinData::GENERIC</constant>).
</entry>
</row>
<row>
<entry>1.2.11</entry>
<entry>
Выдает <constant>E_DEPRECATED</constant>, когда второй аргумент не используется.
Значение <parameter>type</parameter> по умолчанию может измениться в ближайшем будущем.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
</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
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
-->