php-doc-en/reference/mongodb/mongodb/driver/readconcern/construct.xml
2018-01-26 18:49:00 +00:00

98 lines
2.7 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="mongodb-driver-readconcern.construct" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>MongoDB\Driver\ReadConcern::__construct</refname>
<refpurpose>Create a new ReadConcern</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>final</modifier> <modifier>public</modifier> <methodname>MongoDB\Driver\ReadConcern::__construct</methodname>
<methodparam choice="opt"><type>string</type><parameter>level</parameter></methodparam>
</methodsynopsis>
<para>
Constructs a new <classname>MongoDB\Driver\ReadConcern</classname>, which is
an immutable value object.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<variablelist>
<varlistentry>
<term><parameter>level</parameter></term>
<listitem>
<para>
The <link xlink:href="&url.mongodb.docs.readconcern;#read-concern-levels">read concern level</link>.
You may use, but are not limited to, one of the
<link linkend="mongodb-driver-readconcern.constants">class constants</link>.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="errors">
&reftitle.errors;
<simplelist>
&mongodb.throws.argumentparsing;
</simplelist>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<example>
<title><function>MongoDB\Driver\ReadConcern::__construct</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
/* Unspecified read isolation level (uses the server's default behavior) */
$rc = new MongoDB\Driver\ReadConcern();
/* Request read isolation from a single replica set node */
$rc = new MongoDB\Driver\ReadConcern(MongoDB\Driver\ReadConcern::LOCAL);
/* Request read isolation from a majority of the replica set nodes */
$rc = new MongoDB\Driver\ReadConcern(MongoDB\Driver\ReadConcern::MAJORITY);
?>
]]>
</programlisting>
</example>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<simplelist>
<member><link xlink:href="&url.mongodb.docs.readconcern;">Read Concern reference</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
-->