mirror of
https://github.com/macintoshplus/doc-fr.git
synced 2026-03-26 09:52:17 +01:00
git-svn-id: https://svn.php.net/repository/phpdoc/fr/trunk@345179 c90b9560-bf6c-de11-be94-00142212c4b1
108 lines
2.8 KiB
XML
108 lines
2.8 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: 2c423ff085531b5a614c7b10c2d8cf957cdda808 Maintainer: yannick Status: ready -->
|
|
<!-- Reviewed: no -->
|
|
|
|
<refentry xml:id="mongodb-bson-objectid.construct" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<refnamediv>
|
|
<refname>MongoDB\BSON\ObjectId::__construct</refname>
|
|
<refpurpose>Construit un nouvel ObjectId</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<modifier>final</modifier> <modifier>public</modifier> <methodname>MongoDB\BSON\ObjectId::__construct</methodname>
|
|
<methodparam choice="opt"><type>string</type><parameter>id</parameter></methodparam>
|
|
</methodsynopsis>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>id</parameter> (<type>string</type>)</term>
|
|
<listitem>
|
|
<para>
|
|
Une chaîne héxadécimale de 24 caractères. Si elle n'est pas fournie, le driver
|
|
génèrera un ObjectId.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</refsect1>
|
|
|
|
<refsect1 role="errors">
|
|
&reftitle.errors;
|
|
<simplelist>
|
|
&mongodb.throws.argumentparsing;
|
|
<member>Lance une exception <classname>MongoDB\Driver\Exception\InvalidArgumentException</classname>
|
|
si <parameter>id</parameter> n'est pas une chaîne héxadécimale de 24 caractères.</member>
|
|
</simplelist>
|
|
</refsect1>
|
|
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<example>
|
|
<title>Exemple avec <function>MongoDB\BSON\ObjectId::__construct</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
|
|
var_dump(new MongoDB\BSON\ObjectId());
|
|
|
|
var_dump(new MongoDB\BSON\ObjectId('000000000000000000000001'));
|
|
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs.similar;
|
|
<screen>
|
|
<![CDATA[
|
|
object(MongoDB\BSON\ObjectId)#1 (1) {
|
|
["oid"]=>
|
|
string(24) "56732d3dda14d81214634921"
|
|
}
|
|
object(MongoDB\BSON\ObjectId)#1 (1) {
|
|
["oid"]=>
|
|
string(24) "000000000000000000000001"
|
|
}
|
|
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</refsect1>
|
|
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<simplelist>
|
|
<member><link xlink:href="&url.mongodb.docs.objectid;">La référence ObjectId</link></member>
|
|
<member><link xlink:href="&url.mongodb.docs.bson;#objectid">Le type BSON : ObjectId</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-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
|
|
-->
|