apiargs-MongoDBClient-method-construct-param.yaml 1.95 KB
Newer Older
1 2 3 4
arg_name: param
name: $uri
type: string
description: |
5
  The URI of the standalone, replica set, or sharded cluster to which to
6 7
  connect. Refer to :manual:`Connection String URI Format
  </reference/connection-string>` in the MongoDB manual for more information.
8

9
  Defaults to ``"mongodb://127.0.0.1:27017"`` if unspecified.
10 11 12 13

  Any special characters in the URI components need to be encoded according to
  `RFC 3986 <http://www.faqs.org/rfcs/rfc3986.html>`_. This is particularly
  relevant to the username and password, which can often include special
14 15 16 17
  characters such as ``@``, ``:``, or ``%``. When connecting via a Unix domain
  socket, the socket path may contain special characters such as slashes and
  must be encoded. The :php:`rawurlencode() <rawurlencode>` function may be used
  to encode constituent parts of the URI.
18
interface: phpmethod
19
operation: ~
20 21 22 23 24 25
optional: true
---
arg_name: param
name: $uriOptions
type: array
description: |
26 27
  Specifies additional URI options, such as authentication credentials or query
  string parameters. The options specified in ``$uriOptions`` take precedence
28 29
  over any analogous options present in the ``$uri`` string and do not need to
  be encoded according to `RFC 3986 <http://www.faqs.org/rfcs/rfc3986.html>`_.
30

31
  Refer to the :php:`MongoDB\\Driver\\Manager::__construct()
32
  <mongodb-driver-manager.construct>` extension reference and :manual:`MongoDB
33
  connection string </reference/connection-string>` documentation for accepted
34
  options.
35
interface: phpmethod
36
operation: ~
37 38 39 40 41 42
optional: true
---
arg_name: param
name: $driverOptions
type: array
description: |
43 44 45 46 47
  Specify driver-specific options, such as SSL options. In addition to any
  options supported by the :php:`extension <mongodb-driver-manager>`, the
  |php-library| allows you to specify a default :php:`type map
  <manual/en/mongodb.persistence.deserialization.php#mongodb.persistence.typemaps>`
  to apply to the cursors it creates.
48
interface: phpmethod
49
operation: ~
50
optional: true
51
...