apiargs-MongoDBClient-method-construct-driverOptions.yaml 3.94 KB
Newer Older
1 2 3 4 5 6
arg_name: option
name: typeMap
type: array
description: |
  Default :php:`type map
  <manual/en/mongodb.persistence.deserialization.php#mongodb.persistence.typemaps>`
7 8
  to apply to cursors, which determines how BSON documents are converted to PHP
  values. The |php-library| uses the following type map by default:
9 10 11 12 13 14 15 16 17

  .. code-block:: php

     [
         'array' => 'MongoDB\Model\BSONArray',
         'document' => 'MongoDB\Model\BSONDocument',
         'root' => 'MongoDB\Model\BSONDocument',
     ]
interface: phpmethod
18
operation: ~
19
optional: true
20 21 22 23 24 25 26 27 28
---
arg_name: option
name: allow_invalid_hostname
type: boolean
description: |
  Disables hostname validation if ``true``. Defaults to ``false``.

  Allowing invalid hostnames may expose the driver to a `man-in-the-middle
  attack <https://en.wikipedia.org/wiki/Man-in-the-middle_attack>`_.
29 30 31 32

  .. deprecated:: 1.6
     This option has been deprecated. Use the ``tlsAllowInvalidHostnames`` URI
     option instead.
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
interface: phpmethod
operation: ~
optional: true
---
arg_name: option
name: ca_dir
type: string
description: |
  Path to a correctly hashed certificate directory. The system certificate store
  will be used by default.

  Falls back to the deprecated ``capath`` SSL context option if not specified.
interface: phpmethod
operation: ~
optional: true
---
arg_name: option
name: ca_file
type: string
description: |
  Path to a certificate authority file. The system certificate store will be
  used by default.

  Falls back to the deprecated ``cafile`` SSL context option if not specified.
57 58 59

  .. deprecated:: 1.6
     This option has been deprecated. Use the ``tlsCAFile`` URI option instead.
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
interface: phpmethod
operation: ~
optional: true
---
arg_name: option
name: crl_file
type: string
description: |
  Path to a certificate revocation list file.
interface: phpmethod
operation: ~
optional: true
---
arg_name: option
name: pem_file
type: string
description: |
  Path to a PEM encoded certificate to use for client authentication.

  Falls back to the deprecated ``local_cert`` SSL context option if not
  specified.
81 82 83 84

  .. deprecated:: 1.6
     This option has been deprecated. Use the ``tlsCertificateKeyFile`` URI
     option instead.
85 86 87 88 89 90 91 92 93 94 95 96
interface: phpmethod
operation: ~
optional: true
---
arg_name: option
name: pem_pwd
type: string
description: |
  Passphrase for the PEM encoded certificate (if applicable).

  Falls back to the deprecated ``passphrase`` SSL context option if not
  specified.
97 98 99 100

  .. deprecated:: 1.6
     This option has been deprecated. Use the ``tlsCertificateKeyFilePassword``
     URI option instead.
101 102 103 104 105 106 107 108 109 110 111 112
interface: phpmethod
operation: ~
optional: true
---
arg_name: option
name: weak_cert_validation
type: boolean
description: |
  Disables certificate validation ``true``. Defaults to ``false``.

  Falls back to the deprecated ``allow_self_signed`` SSL context option if not
  specified.
113 114 115 116

  .. deprecated:: 1.6
     This option has been deprecated. Use the ``tlsAllowInvalidCertificates``
     URI option instead.
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133
interface: phpmethod
operation: ~
optional: true
---
arg_name: option
name: context
type: resource
description: |
  :php:`SSL context options <manual/en/context.ssl.php>` to be used as fallbacks
  for other driver options (as specified). Note that the driver does not consult
  the default stream context.

  This option is supported for backwards compatibility, but should be considered
  deprecated.
interface: phpmethod
operation: ~
optional: true
134 135 136 137 138 139 140 141 142 143 144 145 146 147
---
arg_name: option
name: autoEncryption
type: array
description: |
  Options to configure client-side field-level encryption in the driver. The
  encryption options are documented in the :php:`extension documentation
  <manual/en/mongodb-driver-manager.construct.php#mongodb-driver-manager.construct-driveroptions>`.
  For the ``keyVaultClient`` option, you may pass a :phpclass:`MongoDB\\Client`
  instance, which will be unwrapped to provide a :php:`MongoDB\\Driver\\Manager <class.mongodb-driver-manager>`
  to the extension.
interface: phpmethod
operation: ~
optional: true
148
...