apiargs-MongoDBClient-method-construct-driverOptions.yaml 2.79 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 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114
---
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>`_.
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.
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.
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.
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.
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
115
...