first commit -> move some files from one-api

This commit is contained in:
2026-05-06 13:37:10 +07:00
parent a3144382c5
commit 55c6ed9779
7940 changed files with 628870 additions and 0 deletions

8
vendor/mongodb/mongodb/.gitignore vendored Normal file
View File

@@ -0,0 +1,8 @@
# Composer
composer.phar
composer.lock
vendor/
# PHPUnit
phpunit.phar
phpunit.xml

74
vendor/mongodb/mongodb/.travis.yml vendored Normal file
View File

@@ -0,0 +1,74 @@
language: php
dist: trusty
sudo: false
services:
- mongodb
addons:
apt:
packages: &common_packages
- gdb
matrix:
fast_finish: true
include:
- php: 5.5
env: &common_env DRIVER_VERSION=1.3.0RC1 SERVER_VERSION=3.4
addons: &common_addons
apt:
sources: [ mongodb-3.4-precise ]
packages: [ mongodb-org, *common_packages ]
- php: 5.6
env: *common_env
addons: *common_addons
- php: 7.0
env: *common_env
addons: *common_addons
- php: 7.1
env: *common_env
addons: *common_addons
- php: 7.2
env: *common_env
addons: *common_addons
- php: 7.0
env: DRIVER_VERSION=1.3.0RC1 SERVER_VERSION=2.4
addons:
apt:
sources: [ mongodb-upstart ]
packages: [ mongodb-10gen, *common_packages ]
- php: 7.0
env: DRIVER_VERSION=1.3.0RC1 SERVER_VERSION=2.6
addons:
apt:
sources: [ mongodb-upstart ]
packages: [ mongodb-org, *common_packages ]
- php: 7.0
env: DRIVER_VERSION=1.3.0RC1 SERVER_VERSION=3.0
addons:
apt:
sources: [ mongodb-3.0-precise ]
packages: [ mongodb-org, *common_packages ]
- php: 7.0
env: DRIVER_VERSION=1.3.0RC1 SERVER_VERSION=3.2
addons:
apt:
sources: [ mongodb-3.2-precise ]
packages: [ mongodb-org, *common_packages ]
- php: 7.0
env: DRIVER_VERSION=devel SERVER_VERSION=3.4
addons: *common_addons
before_script:
- mongod --version
- mongo --eval 'var v = db.runCommand({buildInfo:1}).versionArray; if ((v[0] == 3 && v[1] >= 4) || v[0] >= 4) db.adminCommand({setFeatureCompatibilityVersion:"3.4"});'
- pecl install -f mongodb-${DRIVER_VERSION}
- php --ri mongodb
- composer install --dev --no-interaction --prefer-source
- ulimit -c
- ulimit -c unlimited -S
script:
- ./vendor/bin/phpunit --debug || RESULT=$?
- for i in $(find ./ -maxdepth 1 -name 'core*' -print); do gdb `php -r 'echo PHP_BINARY;'` core* -ex "thread apply all bt" -ex "set pagination 0" -batch; done;
- if [[ ${RESULT} != 0 ]]; then exit $RESULT ; fi;

185
vendor/mongodb/mongodb/CONTRIBUTING.md vendored Normal file
View File

@@ -0,0 +1,185 @@
# Contributing to the PHP Library for MongoDB
## Initializing the Repository
Developers who would like to contribute to the library will need to clone it and
initialize the project dependencies with [Composer](https://getcomposer.org/):
```
$ git clone https://github.com/mongodb/mongo-php-library.git
$ cd mongo-php-library
$ composer update
```
In addition to installing project dependencies, Composer will check that the
required extension version is installed. Directions for installing the extension
may be found [here](http://php.net/manual/en/mongodb.installation.php).
Installation directions for Composer may be found in its
[Getting Started](https://getcomposer.org/doc/00-intro.md) guide.
## Testing
The library's test suite uses [PHPUnit](https://phpunit.de/), which should be
installed as a development dependency by Composer.
The test suite may be executed with:
```
$ vendor/bin/phpunit
```
The `phpunit.xml.dist` file is used as the default configuration file for the
test suite. In addition to various PHPUnit options, it defines required
`MONGODB_URI` and `MONGODB_DATABASE` environment variables. You may customize
this configuration by creating your own `phpunit.xml` file based on the
`phpunit.xml.dist` file we provide.
### Testing on HHVM
By default, the PHPUnit script relies on the `php` interpreter for your shell
(i.e. `#!/usr/bin/env php`). You can run the test suite with HHVM like so:
```
$ hhvm vendor/bin/phpunit
```
## Documentation
Documentation for the library lives in the `docs/` directory and is built with
tools in the related
[mongodb/docs-php-library](https://github.com/mongodb/docs-php-library)
repository. The tools repository is already configured to reference our sources.
That said, any changes to the documentation should be tested locally before
committing. Follow the following steps to build the docs locally with the tools
repository:
* Clone the
[mongodb/docs-php-library](https://github.com/mongodb/docs-php-library) tools
repository.
* Install [giza](https://pypi.python.org/pypi/giza/), as noted in the tools
README.
* Sync your working copy of the documentation to the `source/` directory with
`rsync -a --delete /path/to/mongo-php-library/docs/ source/`.
* Build the documentation with `giza make publish`. You can suppress
informational log messages with the `--level warning` option.
* Generated documentation may be found in the `build/master/html` directory.
## Releasing
The follow steps outline the release process for a maintenance branch (e.g.
releasing the `vX.Y` branch as X.Y.Z).
### Ensure PHP version compatibility
Ensure that the library test suite completes on supported versions of PHP and
HHVM.
### Transition JIRA issues and version
All issues associated with the release version should be in the "Closed" state
and have a resolution of "Fixed". Issues with other resolutions (e.g.
"Duplicate", "Works as Designed") should be removed from the release version so
that they do not appear in the release notes.
Check the corresponding ".x" fix version to see if it contains any issues that
are resolved as "Fixed" and should be included in this release version.
Update the version's release date and status from the
[Manage Versions](https://jira.mongodb.org/plugins/servlet/project-config/PHPLIB/versions)
page.
### Update version info
The PHP library uses [semantic versioning](http://semver.org/). Do not break
backwards compatibility in a non-major release or your users will kill you.
Before proceeding, ensure that the `master` branch is up-to-date with all code
changes in this maintenance branch. This is important because we will later
merge the ensuing release commits up to master with `--strategy=ours`, which
will ignore changes from the merged commits.
A version constant may be added at a later date (see:
[PHPLIB-131](https://jira.mongodb.org/browse/PHPLIB-131)). For now, there is
nothing to update.
### Tag release
The maintenance branch's HEAD will be the target for our release tag:
```
$ git tag -a -m "Release X.Y.Z" X.Y.Z
```
### Push tags
```
$ git push --tags
```
### Merge the maintenance branch up to master
```
$ git checkout master
$ git merge vX.Y --strategy=ours
$ git push
```
The `--strategy=ours` option ensures that all changes from the merged commits
will be ignored.
### Publish release notes
The following template should be used for creating GitHub release notes via
[this form](https://github.com/mongodb/mongo-php-library/releases/new).
```
The PHP team is happy to announce that version X.Y.Z of our MongoDB PHP library is now available. This library is a high-level abstraction for the PHP 5, PHP 7, and HHVM drivers (i.e. [`mongodb`](http://php.net/mongodb) extension).
**Release Highlights**
<one or more paragraphs describing important changes in this release>
A complete list of resolved issues in this release may be found at:
$JIRA_URL
**Documentation**
Documentation for this library may be found at:
https://docs.mongodb.com/php-library/
**Feedback**
If you encounter any bugs or issues with this library, please report them via this form:
https://jira.mongodb.org/secure/CreateIssue.jspa?pid=12483&issuetype=1
**Installation**
This library may be installed or upgraded with:
composer require mongodb/mongodb
Installation instructions for the PHP and HHVM driver may be found in the [PHP.net documentation](http://php.net/manual/en/mongodb.installation.php).
```
The URL for the list of resolved JIRA issues will need to be updated with each
release. You may obtain the list from
[this form](https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=12483).
If commits from community contributors were included in this release, append the
following section:
```
**Thanks**
Thanks for our community contributors for this release:
* [$CONTRIBUTOR_NAME](https://github.com/$GITHUB_USERNAME)
```
Release announcements should also be sent to the `mongodb-user@googlegroups.com`
and `mongodb-announce@googlegroups.com` mailing lists.
Consider announcing each release on Twitter. Significant releases should also be
announced via [@MongoDB](http://twitter.com/mongodb) as well.

202
vendor/mongodb/mongodb/LICENSE vendored Normal file
View File

@@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

17
vendor/mongodb/mongodb/Makefile vendored Normal file
View File

@@ -0,0 +1,17 @@
.PHONY: composer test
COMPOSER_ARGS=update --no-interaction --prefer-source
composer:
@command -v composer >/dev/null 2>&1; \
if test $$? -eq 0; then \
composer $(COMPOSER_ARGS); \
elif test -r composer.phar; then \
php composer.phar $(COMPOSER_ARGS); \
else \
echo >&2 "Cannot find composer; aborting."; \
false; \
fi
test: composer
vendor/bin/phpunit

45
vendor/mongodb/mongodb/README.md vendored Normal file
View File

@@ -0,0 +1,45 @@
MongoDB library for PHP
=======================
This library provides a high-level abstraction around the lower-level drivers for
[PHP](https://github.com/mongodb/mongo-php-driver) and
[HHVM](https://github.com/mongodb/mongo-hhvm-driver) (i.e. the `mongodb`
extension).
While the extension provides a limited API for executing commands, queries, and
write operations, this library implements an API similar to that of the
[legacy PHP driver](http://php.net/manual/en/book.mongo.php). It contains
abstractions for client, database, and collection objects, and provides methods
for CRUD operations and common commands (e.g. index and collection management).
If you are developing an application with MongoDB, you should consider using
this library, or another high-level abstraction, instead of the extension alone.
For further information about the architecture of this library and the `mongodb`
extension, see:
- http://www.mongodb.com/blog/post/call-feedback-new-php-and-hhvm-drivers
## Documentation
- https://docs.mongodb.com/php-library/
# Installation
As a high-level abstraction for the driver, this library naturally requires that
the [`mongodb` extension be installed](http://php.net/manual/en/mongodb.installation.php):
$ pecl install mongodb
$ echo "extension=mongodb.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
The preferred method of installing this library is with
[Composer](https://getcomposer.org/) by running the following from your project
root:
$ composer require mongodb/mongodb
## Reporting Issues
Please use the following form to report any issues:
- https://jira.mongodb.org/secure/CreateIssue.jspa?pid=12483&issuetype=1

28
vendor/mongodb/mongodb/composer.json vendored Normal file
View File

@@ -0,0 +1,28 @@
{
"name": "mongodb/mongodb",
"description": "MongoDB driver library",
"keywords": ["database", "driver", "mongodb", "persistence"],
"homepage": "https://jira.mongodb.org/browse/PHPLIB",
"license": "Apache-2.0",
"authors": [
{ "name": "Hannes Magnusson", "email": "bjori@mongodb.com" },
{ "name": "Jeremy Mikola", "email": "jmikola@gmail.com" },
{ "name": "Derick Rethans", "email": "github@derickrethans.nl" }
],
"require": {
"php": ">=5.5",
"ext-hash": "*",
"ext-json": "*",
"ext-mongodb": "^1.3.0"
},
"require-dev": {
"phpunit/phpunit": "^4.8"
},
"autoload": {
"psr-4": { "MongoDB\\": "src/" },
"files": [ "src/functions.php" ]
},
"autoload-dev": {
"psr-4": { "MongoDB\\Tests\\": "tests/" }
}
}

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

View File

@@ -0,0 +1,115 @@
arg_name: option
name: typeMap
type: array
description: |
Default :php:`type map
<manual/en/mongodb.persistence.deserialization.php#mongodb.persistence.typemaps>`
to apply to cursors, which determines how BSON documents are converted to PHP
values. The |php-library| uses the following type map by default:
.. code-block:: php
[
'array' => 'MongoDB\Model\BSONArray',
'document' => 'MongoDB\Model\BSONDocument',
'root' => 'MongoDB\Model\BSONDocument',
]
interface: phpmethod
operation: ~
optional: true
---
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
...

View File

@@ -0,0 +1,51 @@
arg_name: param
name: $uri
type: string
description: |
The URI of the standalone, replica set, or sharded cluster to which to
connect. Refer to :manual:`Connection String URI Format
</reference/connection-string>` in the MongoDB manual for more information.
Defaults to ``"mongodb://127.0.0.1:27017"`` if unspecified.
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
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.
interface: phpmethod
operation: ~
optional: true
---
arg_name: param
name: $uriOptions
type: array
description: |
Specifies additional URI options, such as authentication credentials or query
string parameters. The options specified in ``$uriOptions`` take precedence
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>`_.
Refer to the :php:`MongoDB\\Driver\\Manager::__construct()
<mongodb-driver-manager.construct>` extension reference and :manual:`MongoDB
connection string </reference/connection-string>` documentation for accepted
options.
interface: phpmethod
operation: ~
optional: true
---
arg_name: param
name: $driverOptions
type: array
description: |
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.
interface: phpmethod
operation: ~
optional: true
...

View File

@@ -0,0 +1,19 @@
source:
file: apiargs-common-option.yaml
ref: typeMap
post: |
This will be used for the returned command result document.
---
arg_name: option
name: writeConcern
type: :php:`MongoDB\\Driver\\WriteConcern <class.mongodb-driver-writeconcern>`
description: |
:manual:`Write concern </reference/write-concern>` to use for the operation.
Defaults to the client's write concern.
This is not supported for server versions prior to 3.4 and will result in an
exception at execution time if used.
interface: phpmethod
operation: ~
optional: true
...

View File

@@ -0,0 +1,10 @@
source:
file: apiargs-common-param.yaml
ref: $databaseName
replacement:
action: " to drop"
---
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,6 @@
source:
file: apiargs-common-param.yaml
ref: $databaseName
replacement:
action: " to select"
...

View File

@@ -0,0 +1,4 @@
source:
file: apiargs-common-option.yaml
ref: maxTimeMS
...

View File

@@ -0,0 +1,4 @@
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,27 @@
source:
file: apiargs-common-option.yaml
ref: readConcern
replacement:
resource: "collection"
parent: "client"
---
source:
file: apiargs-common-option.yaml
ref: readPreference
replacement:
resource: "collection"
parent: "client"
---
source:
file: apiargs-common-option.yaml
ref: typeMap
replacement:
parent: "client"
---
source:
file: apiargs-common-option.yaml
ref: writeConcern
replacement:
resource: "collection"
parent: "client"
...

View File

@@ -0,0 +1,16 @@
source:
file: apiargs-common-param.yaml
ref: $databaseName
replacement:
action: " containing the collection to select"
---
source:
file: apiargs-common-param.yaml
ref: $collectionName
replacement:
action: " to select"
---
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,27 @@
source:
file: apiargs-common-option.yaml
ref: readConcern
replacement:
resource: "database"
parent: "client"
---
source:
file: apiargs-common-option.yaml
ref: readPreference
replacement:
resource: "database"
parent: "client"
---
source:
file: apiargs-common-option.yaml
ref: typeMap
replacement:
parent: "client"
---
source:
file: apiargs-common-option.yaml
ref: writeConcern
replacement:
resource: "database"
parent: "client"
...

View File

@@ -0,0 +1,10 @@
source:
file: apiargs-common-param.yaml
ref: $databaseName
replacement:
action: " to select"
---
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,85 @@
arg_name: option
name: bypassDocumentValidation
type: boolean
description: |
If ``true``, allows the write operation to circumvent document level
validation. Defaults to ``false``.
This option is available in MongoDB 3.2+ and is ignored for older server
versions, which do not support document level validation.
interface: phpmethod
operation: ~
optional: true
---
arg_name: option
name: collation
type: array|object
description: |
:manual:`Collation </reference/collation>` allows users to specify
language-specific rules for string comparison, such as rules for lettercase
and accent marks. When specifying collation, the ``locale`` field is
mandatory; all other collation fields are optional. For descriptions of the
fields, see :manual:`Collation Document
</reference/collation/#collation-document>`.
If the collation is unspecified but the collection has a default collation,
the operation uses the collation specified for the collection. If no
collation is specified for the collection or for the operation, MongoDB uses
the simple binary comparison used in prior versions for string comparisons.
This option is available in MongoDB 3.4+ and will result in an exception at
execution time if specified for an older server version.
interface: phpmethod
operation: ~
optional: true
---
arg_name: option
name: readConcern
type: :php:`MongoDB\\Driver\\ReadConcern <class.mongodb-driver-readconcern>`
description: |
:manual:`Read concern </reference/read-concern>` to use for the operation.
Defaults to the collection's read concern.
This is not supported for server versions prior to 3.2 and will result in an
exception at execution time if used.
interface: phpmethod
operation: ~
optional: true
---
arg_name: option
name: readPreference
type: :php:`MongoDB\\Driver\\ReadPreference <class.mongodb-driver-readpreference>`
description: |
:manual:`Read preference </reference/read-preference>` to use for the
operation. Defaults to the collection's read preference.
interface: phpmethod
operation: ~
optional: true
---
source:
file: apiargs-common-option.yaml
ref: typeMap
replacement:
parent: "collection"
---
arg_name: option
name: writeConcern
type: :php:`MongoDB\\Driver\\WriteConcern <class.mongodb-driver-writeconcern>`
description: |
:manual:`Write concern </reference/write-concern>` to use for the operation.
Defaults to the collection's write concern.
interface: phpmethod
operation: ~
optional: true
---
arg_name: option
name: upsert
type: boolean
description: |
If set to ``true``, creates a new document when no document matches the query
criteria. The default value is ``false``, which does not insert a new
document when no match is found.
interface: phpmethod
operation: ~
optional: true
...

View File

@@ -0,0 +1,31 @@
arg_name: param
name: $filter
type: array|object
description: |
The filter criteria that specifies the documents{{action}}.
interface: phpmethod
operation: ~
optional: false
replacement:
action: ""
---
arg_name: param
name: $replacement
type: array|object
description: |
The replacement document.
interface: phpmethod
operation: ~
optional: false
---
arg_name: param
name: $update
type: array|object
description: |
Specifies the field and value combinations to update and any relevant update
operators. ``$update`` uses MongoDB's :method:`update operators
</reference/operator/update>`.
interface: phpmethod
operation: ~
optional: false
...

View File

@@ -0,0 +1,77 @@
arg_name: option
name: allowDiskUse
type: boolean
description: |
Enables writing to temporary files. When set to ``true``, aggregation stages
can write data to the ``_tmp`` sub-directory in the ``dbPath`` directory. The
default is ``false``.
interface: phpmethod
operation: ~
optional: true
---
arg_name: option
name: batchSize
type: integer
description: |
Specifies the initial batch size for the cursor. A batchSize of ``0`` means an
empty first batch and is useful for quickly returning a cursor or failure
message without doing significant server-side work.
.. note::
This is not supported for inline aggregation results (i.e. ``useCursor``
option is ``false`` or the server version is < 2.6).
interface: phpmethod
operation: ~
optional: true
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: bypassDocumentValidation
post: |
This only applies when using the :ref:`$out <agg-out>` stage.
Document validation requires MongoDB 3.2 or later: if you are using an earlier
version of MongoDB, this option will be ignored.
---
source:
file: apiargs-common-option.yaml
ref: maxTimeMS
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: readConcern
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: readPreference
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: typeMap
---
arg_name: option
name: useCursor
type: boolean
description: |
Indicates whether the command will request that the server provide results
using a cursor. The default is ``true``.
For MongoDB version 2.6 or later, ``useCursor`` allows users to turn off
cursors if necessary to aid in replica set or shard cluster upgrades.
``useCursor`` is ignored for MongoDB versions prior to 2.6 as aggregation
cursors are not available.
interface: phpmethod
operation: ~
optional: true
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: writeConcern
post: |
This only applies when the :ref:`$out <agg-out>` stage is specified.
This is not supported for server versions prior to 3.4 and will result in an
exception at execution time if used.
...

View File

@@ -0,0 +1,14 @@
arg_name: param
name: $pipeline
type: array
description: |
Specifies an :manual:`aggregation pipeline </core/aggregation-pipeline>`
operation.
interface: phpmethod
operation: ~
optional: false
---
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,23 @@
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: bypassDocumentValidation
---
arg_name: option
name: ordered
type: boolean
description: |
If ``true``: when a single write fails, the operation will stop without
performing the remaining writes and throw an exception.
If ``false``: when a single write fails, the operation will continue with the
remaining writes, if any, and throw an exception.
The default is ``true``.
interface: phpmethod
operation: ~
optional: true
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: writeConcern
...

View File

@@ -0,0 +1,37 @@
arg_name: param
name: $operations
type: array
description: |
An array containing the write operations to perform.
:phpmethod:`MongoDB\\Collection::bulkWrite()` supports
:phpmethod:`deleteMany() <MongoDB\\Collection::deleteMany>`,
:phpmethod:`deleteOne() <MongoDB\\Collection::deleteOne>`,
:phpmethod:`insertOne() <MongoDB\\Collection::insertOne>`,
:phpmethod:`replaceOne() <MongoDB\\Collection::replaceOne>`,
:phpmethod:`updateMany() <MongoDB\\Collection::updateMany>`, and
:phpmethod:`updateOne() <MongoDB\\Collection::updateOne>` operations in the
following array structure:
.. code-block:: php
[
[ 'deleteMany' => [ $filter ] ],
[ 'deleteOne' => [ $filter ] ],
[ 'insertOne' => [ $document ] ],
[ 'replaceOne' => [ $filter, $replacement, $options ] ],
[ 'updateMany' => [ $filter, $update, $options ] ],
[ 'updateOne' => [ $filter, $update, $options ] ],
]
Arguments correspond to the respective operation methods. However, the
``writeConcern`` option is specified as a top-level option to
:phpmethod:`MongoDB\\Collection::bulkWrite()` instead of each individual
operation.
interface: phpmethod
operation: ~
optional: true
---
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,25 @@
source:
file: apiargs-common-option.yaml
ref: readConcern
replacement:
resource: "collection"
parent: "manager"
---
source:
file: apiargs-common-option.yaml
ref: readPreference
replacement:
resource: "collection"
parent: "manager"
---
source:
file: apiargs-MongoDBClient-method-construct-driverOptions.yaml
ref: typeMap
---
source:
file: apiargs-common-option.yaml
ref: writeConcern
replacement:
resource: "collection"
parent: "manager"
...

View File

@@ -0,0 +1,16 @@
source:
file: apiargs-common-param.yaml
ref: $manager
---
source:
file: apiargs-common-param.yaml
ref: $databaseName
---
source:
file: apiargs-common-param.yaml
ref: $collectionName
---
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,49 @@
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: collation
---
arg_name: option
name: hint
type: string|array|object
description: |
The index to use. Specify either the index name as a string or the index key
pattern as a document. If specified, then the query system will only consider
plans using the hinted index.
.. versionchanged:: 1.2
If a document is provided, it is passed to the command as-is. Previously,
the library would convert the key pattern to an index name.
interface: phpmethod
operation: ~
optional: true
---
arg_name: option
name: limit
type: integer
description: |
The maximum number of matching documents to return.
interface: phpmethod
operation: ~
optional: true
---
source:
file: apiargs-common-option.yaml
ref: maxTimeMS
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: readConcern
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: readPreference
---
arg_name: option
name: skip
type: integer
description: |
The number of matching documents to skip before returning results.
interface: phpmethod
operation: ~
optional: true
...

View File

@@ -0,0 +1,11 @@
source:
file: apiargs-MongoDBCollection-common-param.yaml
ref: $filter
optional: true
replacement:
action: " to count"
---
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,84 @@
arg_name: option
name: unique
type: boolean
description: |
Creates a :manual:`unique </core/index-unique>` index.
interface: phpmethod
operation: ~
optional: true
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: collation
pre: |
Specifies the :manual:`collation
</reference/bson-type-comparison-order/#collation>` for the index.
---
arg_name: option
name: partialFilterExpression
type: array|object
description: |
Creates a :manual:`partial </core/index-partial>` index.
interface: phpmethod
operation: ~
optional: true
---
arg_name: option
name: sparse
type: boolean
description: |
Creates a :manual:`sparse </core/index-sparse>` index.
interface: phpmethod
operation: ~
optional: true
---
arg_name: option
name: expireAfterSeconds
type: integer
description: |
Creates a :manual:`TTL </core/index-ttl>` index.
interface: phpmethod
operation: ~
optional: true
---
arg_name: option
name: name
type: string
description: |
A name that uniquely identifies the index. By default, MongoDB creates index
names based on the key.
interface: phpmethod
operation: ~
optional: true
---
arg_name: option
name: background
type: string
description: |
Instructs MongoDB to build the index :manual:`as a background
</core/index-creation>` process.
interface: phpmethod
operation: ~
optional: true
---
arg_name: option
name: 2dsphereIndexVersion
type: integer
description: |
Specifies the :manual:`version of a 2dsphere </core/2dsphere>` index to
create.
MongoDB 2.6 introduced version 2 of 2dsphere indexes. Version 2 is the default
version of 2dsphere indexes created in MongoDB 2.6 and later versions.
``2dsphereIndexVersion`` enables you to override the default version 2.
interface: phpmethod
operation: ~
optional: true
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: writeConcern
post: |
This is not supported for server versions prior to 3.4 and will result in an
exception at execution time if used.
...

View File

@@ -0,0 +1,20 @@
arg_name: param
name: $key
type: array|object
description: |
Specifies the field or fields to index and the index order.
For example, the following specifies a descending index on the ``username``
field:
.. code-block:: php
[ 'username' => -1 ]
interface: phpmethod
operation: ~
optional: false
---
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,7 @@
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: writeConcern
post: |
This is not supported for server versions prior to 3.4 and will result in an
exception at execution time if used.
...

View File

@@ -0,0 +1,23 @@
arg_name: param
name: $indexes
type: array
description: |
The indexes to create on the collection.
For example, the following specifies a unique index on the ``username`` field
and a compound index on the ``email`` and ``createdAt`` fields:
.. code-block:: php
[
[ 'key' => [ 'username' => -1 ], 'unique' => true ],
[ 'key' => [ 'email' => 1, 'createdAt' => 1 ] ],
]
interface: phpmethod
operation: ~
optional: false
---
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,8 @@
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: collation
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: writeConcern
...

View File

@@ -0,0 +1,11 @@
source:
file: apiargs-MongoDBCollection-common-param.yaml
ref: $filter
optional: false
replacement:
action: " to delete"
---
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,8 @@
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: collation
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: writeConcern
...

View File

@@ -0,0 +1,11 @@
source:
file: apiargs-MongoDBCollection-common-param.yaml
ref: $filter
optional: false
replacement:
action: " to delete"
---
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,16 @@
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: collation
---
source:
file: apiargs-common-option.yaml
ref: maxTimeMS
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: readConcern
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: readPreference
...

View File

@@ -0,0 +1,20 @@
arg_name: param
name: $fieldName
type: string
description: |
The field for which to return distinct values.
interface: phpmethod
operation: ~
optional: false
---
source:
file: apiargs-MongoDBCollection-common-param.yaml
ref: $filter
optional: true
replacement:
action: " from which to retrieve the distinct values"
---
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,13 @@
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: typeMap
post: |
This will be used for the returned command result document.
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: writeConcern
post: |
This is not supported for server versions prior to 3.4 and will result in an
exception at execution time if used.
...

View File

@@ -0,0 +1,4 @@
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,13 @@
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: typeMap
post: |
This will be used for the returned command result document.
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: writeConcern
post: |
This is not supported for server versions prior to 3.4 and will result in an
exception at execution time if used.
...

View File

@@ -0,0 +1,15 @@
arg_name: param
name: $indexName
type: string
description: |
The name of the index to drop. View the existing indexes on the collection
using the :phpmethod:`listIndexes() <MongoDB\\Collection::listIndexes>`
method.
interface: phpmethod
operation: ~
optional: false
---
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,13 @@
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: typeMap
post: |
This will be used for the returned command result document.
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: writeConcern
post: |
This is not supported for server versions prior to 3.4 and will result in an
exception at execution time if used.
...

View File

@@ -0,0 +1,4 @@
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,247 @@
arg_name: option
name: projection
type: array|object
description: |
The :ref:`projection specification <projections>` to determine which fields to
include in the returned documents. See :manual:`Project Fields to Return from
Query </tutorial/project-fields-from-query-results>` and
:manual:`Projection Operators </reference/operator/projection>` in the MongoDB
manual.
interface: phpmethod
operation: ~
optional: true
---
arg_name: option
name: sort
type: array|object
description: |
The sort specification for the ordering of the results.
interface: phpmethod
operation: ~
optional: true
---
arg_name: option
name: skip
type: integer
description: |
Number of documents to skip. Defaults to ``0``.
interface: phpmethod
operation: ~
optional: true
---
arg_name: option
name: limit
type: integer
description: |
The maximum number of documents to return. If unspecified, then defaults to no
limit. A limit of ``0`` is equivalent to setting no limit.
A negative limit is similar to a positive limit but closes the cursor after
returning a single batch of results. As such, with a negative limit, if the
limited result set does not fit into a single batch, the number of documents
received will be less than the specified limit. By passing a negative limit, the
client indicates to the server that it will not ask for a subsequent batch via
getMore.
interface: phpmethod
operation: ~
optional: true
---
arg_name: option
name: batchSize
type: integer
description: |
The number of documents to return in the first batch. Defaults to ``101``. A
batchSize of ``0`` means that the cursor will be established, but no documents
will be returned in the first batch.
Unlike the previous wire protocol version, a batchSize of ``1`` for the
:dbcommand:`find` command does not close the cursor.
interface: phpmethod
operation: ~
optional: true
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: collation
---
arg_name: option
name: comment
type: string
description: |
A comment to attach to the query to help interpret and trace query
:dbcommand:`profile` data.
interface: phpmethod
operation: ~
optional: true
---
arg_name: option
name: cursorType
type: integer
description: |
Indicates the type of cursor to use. ``cursorType`` supports the following
values:
- ``MongoDB\Operation\Find::NON_TAILABLE`` (*default*)
- ``MongoDB\Operation\Find::TAILABLE``
interface: phpmethod
operation: ~
optional: true
---
arg_name: option
name: hint
type: string|array|object
description: |
The index to use. Specify either the index name as a string or the index key
pattern as a document. If specified, then the query system will only consider
plans using the hinted index.
.. versionadded:: 1.2
interface: phpmethod
operation: ~
optional: true
---
arg_name: option
name: maxAwaitTimeMS
type: integer
description: |
Positive integer denoting the time limit in milliseconds for the server to
block a getMore operation if no data is available. This option should only be
used if cursorType is TAILABLE_AWAIT.
.. versionadded:: 1.2
interface: phpmethod
operation: ~
optional: true
---
source:
file: apiargs-common-option.yaml
ref: maxTimeMS
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: readConcern
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: readPreference
---
arg_name: option
name: max
type: array|object
description: |
The exclusive upper bound for a specific index.
.. versionadded:: 1.2
interface: phpmethod
operation: ~
optional: true
---
arg_name: option
name: maxScan
type: integer
description: |
Maximum number of documents or index keys to scan when executing the query.
.. versionadded:: 1.2
interface: phpmethod
operation: ~
optional: true
---
arg_name: option
name: min
type: array|object
description: |
The inclusive lower bound for a specific index.
.. versionadded:: 1.2
interface: phpmethod
operation: ~
optional: true
---
arg_name: option
name: oplogReplay
type: boolean
description: |
Internal use for replica sets. To use ``oplogReplay``, you must include the
following condition in the filter:
.. code-block:: javascript
{ ts: { $gte: <timestamp> } }
The :php:`MongoDB\\BSON\\Timestamp <class.mongodb-bson-timestamp>` class
reference describes how to represent MongoDB's BSON timestamp type with PHP.
interface: phpmethod
operation: ~
optional: true
---
arg_name: option
name: noCursorTimeout
type: boolean
description: |
Prevents the server from timing out idle cursors after an inactivity period
(10 minutes).
interface: phpmethod
operation: ~
optional: true
---
arg_name: option
name: returnKey
type: boolean
description: |
If true, returns only the index keys in the resulting documents.
.. versionadded:: 1.2
interface: phpmethod
operation: ~
optional: true
---
arg_name: option
name: showRecordId
type: boolean
description: |
Determines whether to return the record identifier for each document. If true,
adds a field $recordId to the returned documents.
.. versionadded:: 1.2
interface: phpmethod
operation: ~
optional: true
---
arg_name: option
name: snapshot
type: boolean
description: |
Prevents the cursor from returning a document more than once because of an
intervening write operation.
.. versionadded:: 1.2
interface: phpmethod
operation: ~
optional: true
---
arg_name: option
name: allowPartialResults
type: boolean
description: |
For queries against a sharded collection, returns partial results from the
:program:`mongos` if some shards are unavailable instead of throwing an error.
interface: phpmethod
operation: ~
optional: true
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: typeMap
---
arg_name: option
name: modifiers
type: array|object
description: |
:manual:`Meta operators </reference/operator/query-modifier>` that modify the
output or behavior of a query. Use of these operators is deprecated in favor
of named options.
interface: phpmethod
operation: ~
optional: true
...

View File

@@ -0,0 +1,11 @@
source:
file: apiargs-MongoDBCollection-common-param.yaml
ref: $filter
optional: true
replacement:
action: " to query"
---
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,66 @@
source:
file: apiargs-MongoDBCollection-method-find-option.yaml
ref: projection
---
source:
file: apiargs-MongoDBCollection-method-find-option.yaml
ref: sort
---
source:
file: apiargs-MongoDBCollection-method-find-option.yaml
ref: skip
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: collation
---
source:
file: apiargs-MongoDBCollection-method-find-option.yaml
ref: comment
---
source:
file: apiargs-MongoDBCollection-method-find-option.yaml
ref: hint
---
source:
file: apiargs-common-option.yaml
ref: maxTimeMS
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: readConcern
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: readPreference
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: typeMap
post: |
This will be used for the returned result document.
---
source:
file: apiargs-MongoDBCollection-method-find-option.yaml
ref: max
---
source:
file: apiargs-MongoDBCollection-method-find-option.yaml
ref: maxScan
---
source:
file: apiargs-MongoDBCollection-method-find-option.yaml
ref: min
---
source:
file: apiargs-MongoDBCollection-method-find-option.yaml
ref: returnKey
---
source:
file: apiargs-MongoDBCollection-method-find-option.yaml
ref: showRecordId
---
source:
file: apiargs-MongoDBCollection-method-find-option.yaml
ref: modifiers
...

View File

@@ -0,0 +1,11 @@
source:
file: apiargs-MongoDBCollection-common-param.yaml
ref: $filter
optional: true
replacement:
action: " to query"
---
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,29 @@
source:
file: apiargs-MongoDBCollection-method-find-option.yaml
ref: projection
---
source:
file: apiargs-MongoDBCollection-method-find-option.yaml
ref: sort
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: collation
---
source:
file: apiargs-common-option.yaml
ref: maxTimeMS
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: typeMap
post: |
This will be used for the returned result document.
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: writeConcern
post: |
This is not supported for server versions prior to 3.2 and will result in an
exception at execution time if used.
...

View File

@@ -0,0 +1,11 @@
source:
file: apiargs-MongoDBCollection-common-param.yaml
ref: $filter
optional: false
replacement:
action: " to delete"
---
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,50 @@
source:
file: apiargs-MongoDBCollection-method-find-option.yaml
ref: projection
---
source:
file: apiargs-MongoDBCollection-method-find-option.yaml
ref: sort
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: collation
---
source:
file: apiargs-common-option.yaml
ref: maxTimeMS
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: bypassDocumentValidation
---
arg_name: option
name: returnDocument
type: integer
description: |
Specifies whether to return the document before the replacement is applied, or
after. ``returnDocument`` supports the following values:
- ``MongoDB\Operation\FindOneAndReplace::RETURN_DOCUMENT_BEFORE`` (*default*)
- ``MongoDB\Operation\FindOneAndReplace::RETURN_DOCUMENT_AFTER``
interface: phpmethod
operation: ~
optional: true
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: typeMap
post: |
This will be used for the returned result document.
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: upsert
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: writeConcern
post: |
This is not supported for server versions prior to 3.2 and will result in an
exception at execution time if used.
...

View File

@@ -0,0 +1,15 @@
source:
file: apiargs-MongoDBCollection-common-param.yaml
ref: $filter
optional: false
replacement:
action: " to replace"
---
source:
file: apiargs-MongoDBCollection-common-param.yaml
ref: $replacement
---
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,50 @@
source:
file: apiargs-MongoDBCollection-method-find-option.yaml
ref: projection
---
source:
file: apiargs-MongoDBCollection-method-find-option.yaml
ref: sort
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: collation
---
source:
file: apiargs-common-option.yaml
ref: maxTimeMS
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: bypassDocumentValidation
---
arg_name: option
name: returnDocument
type: integer
description: |
Specifies whether to return the document before the update is applied, or
after. ``returnDocument`` supports the following values:
- ``MongoDB\Operation\FindOneAndUpdate::RETURN_DOCUMENT_BEFORE`` (*default*)
- ``MongoDB\Operation\FindOneAndUpdate::RETURN_DOCUMENT_AFTER``
interface: phpmethod
operation: ~
optional: true
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: typeMap
post: |
This will be used for the returned result document.
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: upsert
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: writeConcern
post: |
This is not supported for server versions prior to 3.2 and will result in an
exception at execution time if used.
...

View File

@@ -0,0 +1,15 @@
source:
file: apiargs-MongoDBCollection-common-param.yaml
ref: $filter
optional: false
replacement:
action: " to update"
---
source:
file: apiargs-MongoDBCollection-common-param.yaml
ref: $update
---
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,12 @@
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: bypassDocumentValidation
---
source:
file: apiargs-MongoDBCollection-method-bulkWrite-option.yaml
ref: ordered
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: writeConcern
...

View File

@@ -0,0 +1,13 @@
arg_name: param
name: $documents
type: array
description: |
The documents to insert into the collection.
interface: phpmethod
operation: ~
optional: false
---
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,8 @@
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: bypassDocumentValidation
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: writeConcern
...

View File

@@ -0,0 +1,13 @@
arg_name: param
name: $document
type: array|object
description: |
The document to insert into the collection.
interface: phpmethod
operation: ~
optional: false
---
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,4 @@
source:
file: apiargs-common-option.yaml
ref: maxTimeMS
...

View File

@@ -0,0 +1,4 @@
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,90 @@
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: bypassDocumentValidation
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: collation
---
arg_name: option
name: finalize
type: :php:`MongoDB\\BSON\\Javascript <class.mongodb-bson-javascript>`
description: |
Follows the reduce method and modifies the output.
interface: phpmethod
operation: ~
optional: true
---
arg_name: option
name: jsMode
type: boolean
description: |
Specifies whether to convert intermediate data into BSON format between the
execution of the map and reduce functions. The default is ``false``.
interface: phpmethod
operation: ~
optional: true
---
arg_name: option
name: limit
type: integer
description: |
Specifies a maximum number of documents for the input into the map function.
interface: phpmethod
operation: ~
optional: true
---
source:
file: apiargs-common-option.yaml
ref: maxTimeMS
---
arg_name: option
name: query
type: document
description: |
Specifies the selection criteria using query operators for determining the
documents input to the map function.
interface: phpmethod
operation: ~
optional: true
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: readConcern
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: readPreference
---
arg_name: option
name: scope
type: document
description: |
Specifies global variables that are accessible in the map, reduce, and finalize
functions.
interface: phpmethod
operation: ~
optional: true
---
source:
file: apiargs-MongoDBCollection-method-find-option.yaml
ref: sort
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: typeMap
---
arg_name: option
name: verbose
type: boolean
description: |
Specifies whether to include the timing information in the result information.
The default is ``true``.
interface: phpmethod
operation: ~
optional: true
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: writeConcern
...

View File

@@ -0,0 +1,36 @@
arg_name: param
name: $map
type: :php:`MongoDB\\BSON\\Javascript <mongodb-bson-javascript>`
description: |
A JavaScript function that associates or "maps" a value with a key and emits
the key and value pair.
interface: phpmethod
operation: ~
optional: false
---
arg_name: param
name: $reduce
type: :php:`MongoDB\\BSON\\Javascript <class.mongodb-bson-javascript>`
description: |
A JavaScript function that "reduces" to a single object all the values
associated with a particular key.
interface: phpmethod
operation: ~
optional: false
---
arg_name: param
name: $out
type: string|document
description: |
Specifies where to output the result of the map-reduce operation. You can
either output to a collection or return the result inline. On a primary member
of a replica set you can output either to a collection or inline, but on a
secondary, only inline output is possible.
interface: phpmethod
operation: ~
optional: false
---
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,16 @@
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: upsert
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: bypassDocumentValidation
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: collation
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: writeConcern
...

View File

@@ -0,0 +1,15 @@
source:
file: apiargs-MongoDBCollection-common-param.yaml
ref: $filter
optional: false
replacement:
action: " to replace"
---
source:
file: apiargs-MongoDBCollection-common-param.yaml
ref: $replacement
---
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,16 @@
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: upsert
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: bypassDocumentValidation
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: collation
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: writeConcern
...

View File

@@ -0,0 +1,15 @@
source:
file: apiargs-MongoDBCollection-common-param.yaml
ref: $filter
optional: false
replacement:
action: " to update"
---
source:
file: apiargs-MongoDBCollection-common-param.yaml
ref: $update
---
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,16 @@
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: upsert
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: bypassDocumentValidation
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: collation
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: writeConcern
...

View File

@@ -0,0 +1,15 @@
source:
file: apiargs-MongoDBCollection-common-param.yaml
ref: $filter
optional: false
replacement:
action: " to update"
---
source:
file: apiargs-MongoDBCollection-common-param.yaml
ref: $update
---
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,27 @@
source:
file: apiargs-common-option.yaml
ref: readConcern
replacement:
resource: "collection"
parent: "original collection"
---
source:
file: apiargs-common-option.yaml
ref: readPreference
replacement:
resource: "collection"
parent: "original collection"
---
source:
file: apiargs-common-option.yaml
ref: typeMap
replacement:
parent: "original collection"
---
source:
file: apiargs-common-option.yaml
ref: writeConcern
replacement:
resource: "collection"
parent: "original collection"
...

View File

@@ -0,0 +1,4 @@
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,16 @@
source:
file: apiargs-common-option.yaml
ref: typeMap
replacement:
parent: "database"
---
arg_name: option
name: writeConcern
type: :php:`MongoDB\\Driver\\WriteConcern <class.mongodb-driver-writeconcern>`
description: |
:manual:`Write concern </reference/write-concern>` to use for the operation.
Defaults to the database's write concern.
interface: phpmethod
operation: ~
optional: true
...

View File

@@ -0,0 +1,11 @@
source:
file: apiargs-common-option.yaml
ref: readPreference
description: |
:manual:`Read preference </reference/read-preference>` to use for the
operation. Defaults to the database's read preference.
---
source:
file: apiargs-MongoDBDatabase-common-option.yaml
ref: typeMap
...

View File

@@ -0,0 +1,13 @@
arg_name: param
name: $command
type: array|object
description: |
The :manual:`database command </reference/command>` document.
interface: phpmethod
operation: ~
optional: false
---
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,25 @@
source:
file: apiargs-common-option.yaml
ref: readConcern
replacement:
resource: "database"
parent: "manager"
---
source:
file: apiargs-common-option.yaml
ref: readPreference
replacement:
resource: "database"
parent: "manager"
---
source:
file: apiargs-MongoDBClient-method-construct-driverOptions.yaml
ref: typeMap
---
source:
file: apiargs-common-option.yaml
ref: writeConcern
replacement:
resource: "database"
parent: "manager"
...

View File

@@ -0,0 +1,12 @@
source:
file: apiargs-common-param.yaml
ref: $manager
---
source:
file: apiargs-common-param.yaml
ref: $databaseName
---
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,230 @@
arg_name: option
name: autoIndexId
type: boolean
description: |
Specify ``false`` to disable the automatic creation of an index on the ``_id``
field.
.. important::
For replica sets, do not set ``autoIndexId`` to ``false``.
.. deprecated:: 3.2. The ``autoIndexId`` option will be removed in MongoDB 3.4.
interface: phpmethod
operation: ~
optional: true
---
arg_name: option
name: capped
type: boolean
description: |
To create a capped collection, specify ``true``. If you specify ``true``, you
must also set a maximum size in the ``size`` option.
interface: phpmethod
operation: ~
optional: true
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: collation
pre: |
Specifies the :manual:`collation
</reference/bson-type-comparison-order/#collation>` for the collection.
---
arg_name: option
name: flags
type: integer
description: |
Available for the MMAPv1 storage engine only to set the ``usePowerOf2Sizes``
and ``noPadding`` flags.
The |php-library| provides constants that you can combine with a :php:`bitwise
OR operator <language.operators.bitwise>` to set the flag values:
- ``MongoDB\Operation\CreateCollection::USE_POWER_OF_2_SIZES``: ``1``
- ``MongoDB\Operation\CreateCollection::NO_PADDING``: ``2``
Defaults to ``1``.
.. note::
MongoDB 3.0 and later ignores the ``usePowerOf2Sizes`` flag. See
:manual:`collMod </reference/command/collMod>` and
:manual:`db.createCollection()
</reference/method/db.createCollection>` for more information.
interface: phpmethod
operation: ~
optional: true
---
arg_name: option
name: indexOptionDefaults
type: array|object
description: |
Allows users to specify a default configuration for indexes when creating a
collection.
The ``indexOptionDefaults`` option accepts a ``storageEngine`` document,
which should take the following form::
{ <storage-engine-name>: <options> }
Storage engine configurations specified when creating indexes are validated
and logged to the :term:`oplog` during replication to support replica sets
with members that use different storage engines.
interface: phpmethod
operation: ~
optional: true
---
arg_name: option
name: max
type: integer
description: |
The maximum number of documents allowed in the capped collection. The ``size``
option takes precedence over this limit. If a capped collection reaches the
``size`` limit before it reaches the maximum number of documents, MongoDB
removes old documents. If you prefer to use the ``max`` limit, ensure that the
``size`` limit, which is required for a capped collection, is sufficient to
contain the maximum number of documents.
interface: phpmethod
operation: ~
optional: true
---
source:
file: apiargs-common-option.yaml
ref: maxTimeMS
---
arg_name: option
name: size
type: integer
description: |
Specify a maximum size in bytes for a capped collection. Once a capped
collection reaches its maximum size, MongoDB removes the older documents to
make space for the new documents. The ``size`` option is required for capped
collections and ignored for other collections.
interface: phpmethod
operation: ~
optional: true
---
arg_name: option
name: storageEngine
type: array|object
description: |
Available for the WiredTiger storage engine only.
Allows users to specify configuration to the storage engine on a
per-collection basis when creating a collection. The value of the
``storageEngine`` option should take the following form::
{ <storage-engine-name>: <options> }
Storage engine configurations specified when creating collections are
validated and logged to the :term:`oplog` during replication to support
replica sets with members that use different storage engines.
interface: phpmethod
operation: ~
optional: true
---
source:
file: apiargs-MongoDBDatabase-common-option.yaml
ref: typeMap
post: |
This will be used for the returned command result document.
---
arg_name: option
name: validator
type: array
description: |
Allows users to specify :manual:`validation rules or expressions
</core/document-validation>` for the collection. For more information, see
:manual:`Document Validation </core/document-validation>` in the MongoDB
manual.
The ``validator`` option takes an array that specifies the validation rules or
expressions. You can specify the expressions using the same operators as
MongoDB's :manual:`query operators </reference/operator/query>` with the
exception of :query:`$geoNear`, :query:`$near`, :query:`$nearSphere`,
:query:`$text`, and :query:`$where`.
.. note::
- Validation occurs during updates and inserts. Existing documents do not
undergo validation checks until modification.
- You cannot specify a validator for collections in the ``admin``,
``local``, and ``config`` databases.
- You cannot specify a validator for ``system.*`` collections.
operation: ~
interface: phpmethod
optional: true
---
arg_name: option
name: validationAction
type: string
description: |
Determines whether to ``error`` on invalid documents or just ``warn`` about
the violations but allow invalid documents to be inserted.
.. important::
Validation of documents only applies to those documents as determined by
the ``validationLevel``.
.. list-table::
:header-rows: 1
* - ``validationAction``
- Description
* - ``"error"``
- **Default**. Documents must pass validation before the write occurs.
Otherwise, the write operation fails.
* - ``"warn"``
- Documents do not have to pass validation. If the document fails
validation, the write operation logs the validation failure.
interface: phpmethod
operation: ~
optional: true
---
arg_name: option
name: validationLevel
type: string
description: |
Determines how strictly MongoDB applies the validation rules to existing
documents during an update.
.. list-table::
:header-rows: 1
* - ``validationLevel``
- Description
* - ``"off"``
- No validation for inserts or updates.
* - ``"strict"``
- **Default**. Apply validation rules to all inserts and all updates.
* - ``"moderate"``
- Apply validation rules to inserts and to updates on existing *valid*
documents. Do not apply rules to updates on existing *invalid*
documents.
interface: phpmethod
operation: ~
optional: true
---
source:
file: apiargs-MongoDBDatabase-common-option.yaml
ref: writeConcern
post: |
This is not supported for server versions prior to 3.4 and will result in an
exception at execution time if used.
...

View File

@@ -0,0 +1,10 @@
source:
file: apiargs-common-param.yaml
ref: $collectionName
replacement:
action: " to create"
---
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,13 @@
source:
file: apiargs-MongoDBDatabase-common-option.yaml
ref: typeMap
post: |
This will be used for the returned command result document.
---
source:
file: apiargs-MongoDBDatabase-common-option.yaml
ref: writeConcern
post: |
This is not supported for server versions prior to 3.4 and will result in an
exception at execution time if used.
...

View File

@@ -0,0 +1,4 @@
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,13 @@
source:
file: apiargs-MongoDBDatabase-common-option.yaml
ref: typeMap
post: |
This will be used for the returned command result document.
---
source:
file: apiargs-MongoDBDatabase-common-option.yaml
ref: writeConcern
post: |
This is not supported for server versions prior to 3.4 and will result in an
exception at execution time if used.
...

View File

@@ -0,0 +1,10 @@
source:
file: apiargs-common-param.yaml
ref: $collectionName
replacement:
action: " to drop"
---
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,6 @@
source:
file: apiargs-common-param.yaml
ref: $collectionName
replacement:
action: " to select"
...

View File

@@ -0,0 +1,15 @@
arg_name: option
name: filter
type: array|object
description: |
A query expression to filter the list of collections.
You can specify a query expression on the collection ``name`` and ``options``.
interface: phpmethod
operation: ~
optional: true
---
source:
file: apiargs-common-option.yaml
ref: maxTimeMS
...

View File

@@ -0,0 +1,4 @@
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,27 @@
source:
file: apiargs-common-option.yaml
ref: readConcern
replacement:
resource: "collection"
parent: "database"
---
source:
file: apiargs-common-option.yaml
ref: readPreference
replacement:
resource: "collection"
parent: "database"
---
source:
file: apiargs-common-option.yaml
ref: typeMap
replacement:
parent: "database"
---
source:
file: apiargs-common-option.yaml
ref: writeConcern
replacement:
resource: "collection"
parent: "database"
...

View File

@@ -0,0 +1,10 @@
source:
file: apiargs-common-param.yaml
ref: $collectionName
replacement:
action: " to select"
---
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,46 @@
arg_name: option
name: bucketName
type: string
description: |
The bucket name, which will be used as a prefix for the files and chunks
collections. Defaults to ``"fs"``.
interface: phpmethod
operation: ~
optional: true
---
arg_name: option
name: chunkSizeBytes
type: integer
description: |
The chunk size in bytes. Defaults to ``261120`` (i.e. 255 KiB).
interface: phpmethod
operation: ~
optional: true
---
source:
file: apiargs-common-option.yaml
ref: readConcern
replacement:
resource: "bucket"
parent: "database"
---
source:
file: apiargs-common-option.yaml
ref: readPreference
replacement:
resource: "bucket"
parent: "database"
---
source:
file: apiargs-common-option.yaml
ref: typeMap
replacement:
parent: "database"
---
source:
file: apiargs-common-option.yaml
ref: writeConcern
replacement:
resource: "bucket"
parent: "database"
...

View File

@@ -0,0 +1,4 @@
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,27 @@
source:
file: apiargs-common-option.yaml
ref: readConcern
replacement:
resource: "database"
parent: "original database"
---
source:
file: apiargs-common-option.yaml
ref: readPreference
replacement:
resource: "database"
parent: "original database"
---
source:
file: apiargs-common-option.yaml
ref: typeMap
replacement:
parent: "original database"
---
source:
file: apiargs-common-option.yaml
ref: writeConcern
replacement:
resource: "database"
parent: "original database"
...

View File

@@ -0,0 +1,4 @@
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,50 @@
arg_name: option
name: _id
type: mixed
description: |
Value to use as the file document identifier. Defaults to a new
:php:`MongoDB\\BSON\\ObjectId <class.mongodb-bson-objectid>` object.
interface: phpmethod
operation: ~
optional: true
---
arg_name: option
name: chunkSizeBytes
type: integer
description: |
The chunk size in bytes. Defaults to the bucket's ``chunkSizeBytes`` option.
interface: phpmethod
operation: ~
optional: true
---
arg_name: option
name: metadata
type: array|object
description: |
User data for the ``metadata`` field of the file document. If not specified,
the ``metadata`` field will not be set on the file document.
interface: phpmethod
operation: ~
optional: true
---
arg_name: option
name: revision
type: integer
description: |
The revision of the file to retrieve. Files with the name ``filename`` will be
differentiated by their ``uploadDate`` field.
Revision numbers are defined as follows:
- 0 = the original stored file
- 1 = the first revision
- 2 = the second revision
- etc...
- -2 = the second most recent revision
- -1 = the most recent revision
Defaults to -1 (i.e. the most recent revision).
interface: phpmethod
operation: ~
optional: true
...

View File

@@ -0,0 +1,39 @@
arg_name: param
name: $filename
type: string
description: |
The ``filename`` of the file{{action}}.
interface: phpmethod
operation: ~
optional: false
replacement:
action: ""
---
arg_name: param
name: $id
type: mixed
description: |
The ``_id`` of the file{{action}}.
interface: phpmethod
operation: ~
optional: false
replacement:
action: ""
---
arg_name: param
name: $stream
type: resource
description: |
The GridFS stream resource.
interface: phpmethod
operation: ~
---
arg_name: param
name: $destination
type: resource
description: |
Writable stream, to which the GridFS file's contents will be written.
interface: phpmethod
operation: ~
optional: false
...

View File

@@ -0,0 +1,44 @@
arg_name: option
name: bucketName
type: string
description: |
The bucket name, which will be used as a prefix for the files and chunks
collections. Defaults to ``"fs"``.
interface: phpmethod
operation: ~
optional: true
---
arg_name: option
name: chunkSizeBytes
type: integer
description: |
The chunk size in bytes. Defaults to ``261120`` (i.e. 255 KiB).
interface: phpmethod
operation: ~
optional: true
---
source:
file: apiargs-common-option.yaml
ref: readConcern
replacement:
resource: "bucket"
parent: "database"
---
source:
file: apiargs-common-option.yaml
ref: readPreference
replacement:
resource: "bucket"
parent: "database"
---
source:
file: apiargs-MongoDBClient-method-construct-driverOptions.yaml
ref: typeMap
---
source:
file: apiargs-common-option.yaml
ref: writeConcern
replacement:
resource: "bucket"
parent: "database"
...

View File

@@ -0,0 +1,12 @@
source:
file: apiargs-common-param.yaml
ref: $manager
---
source:
file: apiargs-common-param.yaml
ref: $databaseName
---
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,6 @@
source:
file: apiargs-MongoDBGridFSBucket-common-param.yaml
ref: $id
replacement:
resource: " to delete"
...

View File

@@ -0,0 +1,10 @@
source:
file: apiargs-MongoDBGridFSBucket-common-param.yaml
ref: $id
replacement:
resource: " to download"
---
source:
file: apiargs-MongoDBGridFSBucket-common-param.yaml
ref: $destination
...

View File

@@ -0,0 +1,4 @@
source:
file: apiargs-MongoDBGridFSBucket-common-option.yaml
ref: revision
...

View File

@@ -0,0 +1,14 @@
source:
file: apiargs-MongoDBGridFSBucket-common-param.yaml
ref: $filename
replacement:
resource: " to download"
---
source:
file: apiargs-MongoDBGridFSBucket-common-param.yaml
ref: $destination
---
source:
file: apiargs-common-param.yaml
ref: $options
...

Some files were not shown because too many files have changed in this diff Show More