<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->

<refentry xml:id="mongodb-driver-serverapi.construct" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
 <refnamediv>
  <refname>MongoDB\Driver\ServerApi::__construct</refname>
  <refpurpose>Create a new ServerApi instance</refpurpose>
 </refnamediv>

 <refsect1 role="description">
  &reftitle.description;
  <methodsynopsis>
   <modifier>final</modifier> <modifier>public</modifier> <methodname>MongoDB\Driver\ServerApi::__construct</methodname>
   <methodparam><type>string</type><parameter>version</parameter></methodparam>
   <methodparam choice="opt"><type class="union"><type>bool</type><type>null</type></type><parameter>strict</parameter><initializer>&null;</initializer></methodparam>
   <methodparam choice="opt"><type class="union"><type>bool</type><type>null</type></type><parameter>deprecationErrors</parameter><initializer>&null;</initializer></methodparam>
  </methodsynopsis>

  <para>
   Creates a new <classname>MongoDB\Driver\ServerApi</classname> instance used to
   declare an API version when creating a
   <classname>MongoDB\Driver\Manager</classname>.
  </para>
 </refsect1>

 <refsect1 role="parameters">
  &reftitle.parameters;
  <variablelist>
   <varlistentry xml:id="mongodb-driver-serverapi.construct-version">
    <term><parameter>version</parameter></term>
    <listitem>
     <para>
      A server API version.
     </para>
     <para>
      Supported API versions are provided as constants in
      <classname>MongoDB\Driver\ServerApi</classname>. The only supported API
      version is <constant>MongoDB\Driver\ServerApi::V1</constant>.
     </para>
    </listitem>
   </varlistentry>
   <varlistentry xml:id="mongodb-driver-manager.construct-strict">
    <term><parameter>strict</parameter></term>
    <listitem>
     <para>
      If the <parameter>strict</parameter> parameter is set to &true;, the
      server will yield an error for any command that is not part of the
      specified API version. If no value is provided, the server default value
      (&false;) is used.
     </para>
    </listitem>
   </varlistentry>
   <varlistentry xml:id="mongodb-driver-manager.construct-deprecationErrors">
    <term><parameter>deprecationErrors</parameter></term>
    <listitem>
     <para>
      If the <parameter>deprecationErrors</parameter> parameter is set to &true;,
      the server will yield an error when using a command that is deprecated in
      the specified API version. If no value is provided, the server default value
      (&false;) is used.
     </para>
    </listitem>
   </varlistentry>
  </variablelist>
 </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
-->
