mirror of
https://github.com/php/doc-en.git
synced 2026-03-24 07:42:10 +01:00
* Documentation for MongoDB\BSON classes implementing ArrayAccess since 1.17.0 https://jira.mongodb.org/browse/PHPORM-182
86 lines
2.4 KiB
XML
86 lines
2.4 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<refentry xml:id="mongodb-bson-packedarray.offsetget" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>MongoDB\BSON\PackedArray::offsetGet</refname>
|
|
<refpurpose>Returns the value of an index in the array</refpurpose>
|
|
</refnamediv>
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis role="MongoDB\BSON\PackedArray">
|
|
<modifier>final</modifier> <modifier>public</modifier> <type>mixed</type><methodname>MongoDB\BSON\PackedArray::offsetGet</methodname>
|
|
<methodparam><type>mixed</type><parameter>key</parameter></methodparam>
|
|
</methodsynopsis>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>key</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
The index to retrieve from the array. Only <type>int</type> is supported.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Returns the value associated with the given index. If the index is not
|
|
present in the array, an exception is thrown.
|
|
</para>
|
|
<note>
|
|
<simpara>
|
|
When encountering a value encoded as 64-bit integer in the BSON array,
|
|
the return value of this method will be a
|
|
<classname>MongoDB\BSON\Int64</classname> instance.
|
|
</simpara>
|
|
</note>
|
|
</refsect1>
|
|
|
|
<refsect1 role="errors">
|
|
&reftitle.errors;
|
|
<simplelist>
|
|
&mongodb.throws.argumentparsing;
|
|
<member>Throws <classname>MongoDB\Driver\Exception\RuntimeException</classname> if the index is not present in the array.</member>
|
|
</simplelist>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><methodname>ArrayAccess::offsetGet</methodname></member>
|
|
<member><methodname>MongoDB\BSON\PackedArray::get</methodname></member>
|
|
</simplelist>
|
|
</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
|
|
-->
|