mirror of
https://github.com/php/doc-en.git
synced 2026-03-24 07:42:10 +01:00
https://jira.mongodb.org/browse/PHPC-2350 * Remove trailing commas from Document toJSON examples * Add returnvalues sections for Document and PackedArray from/to methods * Clarify errors for Document and PackedArray fromJSON() methods --------- Co-authored-by: Gina Peter Banyard <girgias@php.net>
77 lines
2.2 KiB
XML
77 lines
2.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
|
|
<refentry xml:id="mongodb-bson-packedarray.fromphp" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<refnamediv>
|
|
<refname>MongoDB\BSON\PackedArray::fromPHP</refname>
|
|
<refpurpose>Construct a new BSON array instance from PHP data</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<modifier>final</modifier> <modifier>static</modifier> <modifier>public</modifier> <type>MongoDB\BSON\PackedArray</type><methodname>MongoDB\BSON\PackedArray::fromPHP</methodname>
|
|
<methodparam><type>array</type><parameter>value</parameter></methodparam>
|
|
</methodsynopsis>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>value</parameter> (<type>array</type>)</term>
|
|
<listitem>
|
|
<para>
|
|
The PHP array to convert to a BSON array. The array must be a list (i.e.
|
|
have sequential numeric keys starting with <literal>0</literal>).
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Returns a new <classname>MongoDB\BSON\PackedArray</classname> instance.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="errors">
|
|
&reftitle.errors;
|
|
<simplelist>
|
|
&mongodb.throws.argumentparsing;
|
|
<member>Throws <classname>MongoDB\Driver\Exception\InvalidArgumentException</classname> if the given array is not a list (i.e. has sequential numeric keys starting with <literal>0</literal>).</member>
|
|
</simplelist>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<simplelist>
|
|
<member><link xlink:href="&url.mongodb.docs.bson;">BSON Types</link></member>
|
|
</simplelist>
|
|
</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-packedarray: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
|
|
-->
|