Skip to content

Commit 83eb398

Browse files
committed
Merge pull request #276
2 parents 6be5750 + c63ca8d commit 83eb398

File tree

177 files changed

+3710
-2465
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

177 files changed

+3710
-2465
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
arg_name: option
2+
name: typeMap
3+
type: array
4+
description: |
5+
Default :php:`type map
6+
<manual/en/mongodb.persistence.deserialization.php#mongodb.persistence.typemaps>`
7+
to apply to cursors, which determines how BSON documents are converted to PHP
8+
values. The |php-library| uses the following type map by default:
9+
10+
.. code-block:: php
11+
12+
[
13+
'array' => 'MongoDB\Model\BSONArray',
14+
'document' => 'MongoDB\Model\BSONDocument',
15+
'root' => 'MongoDB\Model\BSONDocument',
16+
]
17+
interface: phpmethod
18+
operation: ~
19+
optional: true
20+
...

docs/includes/apiargs-MongoDBClient-method-construct-param.yaml

Lines changed: 21 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,46 +2,41 @@ arg_name: param
22
name: $uri
33
type: string
44
description: |
5-
The URI of the standalone, replica set, or sharded cluster to which to connect. Refer
6-
to the :manual:`MongoDB connection string reference </reference/connection-string>`
7-
for formatting.
8-
9-
Defaults to ``mongodb://localhost:27017`` if unspecified.
5+
The URI of the standalone, replica set, or sharded cluster to which to
6+
connect. Refer to the :manual:`MongoDB connection string reference
7+
</reference/connection-string>` for formatting.
8+
9+
Defaults to ``"mongodb://127.0.0.1:27017"`` if unspecified.
1010
interface: phpmethod
11-
operation: MongoDB\\Client::__construct
11+
operation: ~
1212
optional: true
13-
position: 1
1413
---
1514
arg_name: param
1615
name: $uriOptions
1716
type: array
1817
description: |
19-
Specifies additional URI options, such as authentication credentials
20-
or query string parameters. The options specified in ``$uriOptions``
21-
take precedence over any analogous options present in the
22-
``$uri`` string.
23-
post: |
18+
Specifies additional URI options, such as authentication credentials or query
19+
string parameters. The options specified in ``$uriOptions`` take precedence
20+
over any analogous options present in the ``$uri`` string.
21+
2422
Refer to the :php:`MongoDB\\Driver\\Manager::__construct()
25-
<mongodb-driver-manager.construct>` extension reference and
26-
:manual:`MongoDB connection string </reference/connection-string>`
27-
documentation for valid options.
23+
<mongodb-driver-manager.construct>` extension reference and :manual:`MongoDB
24+
connection string </reference/connection-string>` documentation for accepted
25+
options.
2826
interface: phpmethod
29-
operation: MongoDB\\Client::__construct
27+
operation: ~
3028
optional: true
31-
position: 2
3229
---
3330
arg_name: param
3431
name: $driverOptions
3532
type: array
3633
description: |
37-
Specify driver-specific options. In addition to any
38-
options supported by the :php:`extension <mongodb-driver-manager>`,
39-
the |php-library| allows you to specify a default ``typeMap`` to
40-
apply to the cursors it creates. Refer to the driver's
41-
:php:`Persistence documentation <mongodb-persistence>` for more
42-
about type maps.
34+
Specify driver-specific options, such as SSL options. In addition to any
35+
options supported by the :php:`extension <mongodb-driver-manager>`, the
36+
|php-library| allows you to specify a default :php:`type map
37+
<manual/en/mongodb.persistence.deserialization.php#mongodb.persistence.typemaps>`
38+
to apply to the cursors it creates.
4339
interface: phpmethod
44-
operation: MongoDB\\Client::__construct
40+
operation: ~
4541
optional: true
46-
position: 3
47-
...
42+
...
Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
1-
arg_name: option
2-
interface: phpmethod
3-
operation: MongoDB\\Client::dropDatabase
41
source:
52
file: apiargs-common-option.yaml
63
ref: typeMap
7-
position: 1
4+
post: |
5+
This will be used for the returned command result document.
6+
---
7+
arg_name: option
8+
name: writeConcern
9+
type: :php:`MongoDB\\Driver\\WriteConcern <class.mongodb-driver-writeconcern>`
10+
description: |
11+
:manual:`Write concern </reference/write-concern>` to use for the operation.
12+
Defaults to the client's write concern.
13+
14+
This is not supported for server versions prior to 3.4 and will result in an
15+
exception at execution time if used.
16+
interface: phpmethod
17+
operation: ~
18+
optional: true
819
...
Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
11
source:
2-
ref: $databaseName
32
file: apiargs-common-param.yaml
4-
arg_name: param
5-
interface: phpmethod
6-
operation: MongoDB\\Client::dropDatabase
3+
ref: $databaseName
4+
replacement:
5+
action: " to drop"
76
---
87
source:
9-
ref: $options
108
file: apiargs-common-param.yaml
11-
arg_name: param
12-
interface: phpmethod
13-
operation: MongoDB\\Client::dropDatabase
14-
position: 2
9+
ref: $options
1510
...
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
source:
2-
ref: $databaseName
32
file: apiargs-common-param.yaml
4-
arg_name: param
5-
interface: phpmethod
6-
operation: MongoDB\\Client::__get
3+
ref: $databaseName
4+
replacement:
5+
action: " to select"
76
...
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
source:
22
file: apiargs-common-option.yaml
33
ref: maxTimeMS
4-
position: 1
54
...
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
source:
2-
ref: $options
32
file: apiargs-common-param.yaml
4-
arg_name: param
5-
interface: phpmethod
6-
operation: MongoDB\\Client::listDatabases
7-
position: 1
3+
ref: $options
84
...
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
source:
2+
file: apiargs-common-option.yaml
3+
ref: readConcern
4+
replacement:
5+
resource: "collection"
6+
parent: "client"
7+
---
8+
source:
9+
file: apiargs-common-option.yaml
10+
ref: readPreference
11+
replacement:
12+
resource: "collection"
13+
parent: "client"
14+
---
15+
source:
16+
file: apiargs-common-option.yaml
17+
ref: typeMap
18+
replacement:
19+
parent: "client"
20+
---
21+
source:
22+
file: apiargs-common-option.yaml
23+
ref: writeConcern
24+
replacement:
25+
resource: "collection"
26+
parent: "client"
27+
...
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
source:
2+
file: apiargs-common-param.yaml
3+
ref: $databaseName
4+
replacement:
5+
action: " containing the collection to select"
6+
---
7+
source:
8+
file: apiargs-common-param.yaml
9+
ref: $collectionName
10+
replacement:
11+
action: " to select"
12+
---
13+
source:
14+
file: apiargs-common-param.yaml
15+
ref: $options
16+
...
Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,27 @@
11
source:
2-
ref: readConcern
32
file: apiargs-common-option.yaml
4-
operation: MongoDB\\Client::selectDatabase
3+
ref: readConcern
54
replacement:
65
resource: "database"
6+
parent: "client"
77
---
88
source:
9-
ref: readPreference
109
file: apiargs-common-option.yaml
11-
operation: MongoDB\\Client::selectDatabase
10+
ref: readPreference
1211
replacement:
1312
resource: "database"
13+
parent: "client"
1414
---
1515
source:
16-
ref: typeMap
1716
file: apiargs-common-option.yaml
18-
operation: MongoDB\\Client::selectDatabase
17+
ref: typeMap
18+
replacement:
19+
parent: "client"
1920
---
2021
source:
21-
ref: writeConcern
2222
file: apiargs-common-option.yaml
23-
operation: MongoDB\\Client::selectDatabase
23+
ref: writeConcern
2424
replacement:
2525
resource: "database"
26-
...
26+
parent: "client"
27+
...
Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
source:
2-
ref: $databaseName
32
file: apiargs-common-param.yaml
4-
operation: MongoDB\\Client::selectDatabase
5-
position: 1
3+
ref: $databaseName
4+
replacement:
5+
action: " to select"
66
---
77
source:
8-
ref: $options
98
file: apiargs-common-param.yaml
10-
operation: MongoDB\\Client::selectDatabase
11-
position: 2
9+
ref: $options
1210
...
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
arg_name: option
2+
name: bypassDocumentValidation
3+
type: boolean
4+
description: |
5+
If ``true``, allows the write operation to circumvent document level
6+
validation. Defaults to ``false``.
7+
interface: phpmethod
8+
operation: ~
9+
optional: true
10+
---
11+
arg_name: option
12+
name: collation
13+
type: array|object
14+
description: |
15+
:manual:`Collation </reference/collation>` allows users to specify
16+
language-specific rules for string comparison, such as rules for lettercase
17+
and accent marks. When specifying collation, the ``locale`` field is
18+
mandatory; all other collation fields are optional. For descriptions of the
19+
fields, see :manual:`Collation Document
20+
<reference/collation/#collation-document>`.
21+
22+
If the collation is unspecified but the collection has a default collation,
23+
the operation uses the collation specified for the collection. If no
24+
collation is specified for the collection or for the operation, MongoDB uses
25+
the simple binary comparison used in prior versions for string comparisons.
26+
27+
This option is available in MongoDB 3.4+ and will result in an exception at
28+
execution time if specified for an older server version.
29+
interface: phpmethod
30+
operation: ~
31+
optional: true
32+
---
33+
arg_name: option
34+
name: readConcern
35+
type: :php:`MongoDB\\Driver\\ReadConcern <class.mongodb-driver-readconcern>`
36+
description: |
37+
:manual:`Read concern </reference/read-concern>` to use for the operation.
38+
Defaults to the collection's read concern.
39+
interface: phpmethod
40+
operation: ~
41+
optional: true
42+
---
43+
arg_name: option
44+
name: readPreference
45+
type: :php:`MongoDB\\Driver\\ReadPreference <class.mongodb-driver-readpreference>`
46+
description: |
47+
:manual:`Read preference </reference/read-preference>` to use for the
48+
operation. Defaults to the collection's read preference.
49+
interface: phpmethod
50+
operation: ~
51+
optional: true
52+
---
53+
source:
54+
file: apiargs-common-option.yaml
55+
ref: typeMap
56+
replacement:
57+
parent: "collection"
58+
---
59+
arg_name: option
60+
name: writeConcern
61+
type: :php:`MongoDB\\Driver\\WriteConcern <class.mongodb-driver-writeconcern>`
62+
description: |
63+
:manual:`Write concern </reference/write-concern>` to use for the operation.
64+
Defaults to the collection's write concern.
65+
interface: phpmethod
66+
operation: ~
67+
optional: true
68+
---
69+
arg_name: option
70+
name: upsert
71+
type: boolean
72+
description: |
73+
If set to ``true``, creates a new document when no document matches the query
74+
criteria. The default value is ``false``, which does not insert a new
75+
document when no match is found.
76+
interface: phpmethod
77+
operation: ~
78+
optional: true
79+
...
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
arg_name: param
2+
name: $filter
3+
type: array|object
4+
description: |
5+
The filter criteria that specifies the documents{{action}}.
6+
interface: phpmethod
7+
operation: ~
8+
optional: false
9+
replacement:
10+
action: ""
11+
---
12+
arg_name: param
13+
name: $replacement
14+
type: array|object
15+
description: |
16+
The replacement document.
17+
interface: phpmethod
18+
operation: ~
19+
optional: false
20+
---
21+
arg_name: param
22+
name: $update
23+
type: array|object
24+
description: |
25+
Specifies the field and value combinations to update and any relevant update
26+
operators. ``$update`` uses MongoDB's :method:`update operators
27+
</reference/operator/update>`.
28+
interface: phpmethod
29+
operation: ~
30+
optional: false
31+
...

0 commit comments

Comments
 (0)