Commit 3cc57327 authored by Jeremy Mikola's avatar Jeremy Mikola

PHPLIB-234: Use "Return Values" section headings

parent 72884721
......@@ -29,11 +29,12 @@ Definition
.. include:: /includes/apiargs/MongoDBClient-method-dropDatabase-option.rst
:returns:
Return Values
-------------
An array or object with the result document of the :manual:`dropDatabase
</reference/command/dropDatabase>` command. The return type will depend on
the ``typeMap`` option.
An array or object with the result document of the :manual:`dropDatabase
</reference/command/dropDatabase>` command. The return type will depend on the
``typeMap`` option.
Example
-------
......
......@@ -23,9 +23,10 @@ Definition
function getManager(): MongoDB\Manager
:returns:
Return Values
-------------
A :php:`MongoDB\\Driver\\Manager <class.mongodb-driver-manager>` object.
A :php:`MongoDB\\Driver\\Manager <class.mongodb-driver-manager>` object.
See Also
--------
......
......@@ -29,11 +29,12 @@ Definition
.. include:: /includes/apiargs/MongoDBClient-method-listDatabases-option.rst
:returns:
Return Values
-------------
A traversable :phpclass:`MongoDB\\Model\\DatabaseInfoIterator`, which
contains an :phpclass:`MongoDB\\Model\\DatabaseInfo` object for each
database on the server.
A traversable :phpclass:`MongoDB\\Model\\DatabaseInfoIterator`, which contains
a :phpclass:`MongoDB\\Model\\DatabaseInfo` object for each database on the
server.
Example
-------
......
......@@ -29,9 +29,10 @@ Definition
.. include:: /includes/apiargs/MongoDBClient-method-selectCollection-option.rst
:returns:
Return Values
-------------
A :phpclass:`MongoDB\\Collection` object.
A :phpclass:`MongoDB\\Collection` object.
Behavior
--------
......
......@@ -29,9 +29,10 @@ Definition
.. include:: /includes/apiargs/MongoDBClient-method-selectDatabase-option.rst
:returns:
Return Values
-------------
A :phpclass:`MongoDB\\Database` object.
A :phpclass:`MongoDB\\Database` object.
Behavior
--------
......
......@@ -27,9 +27,10 @@ Definition
.. include:: /includes/apiargs/MongoDBClient-method-get-param.rst
:returns:
Return Values
-------------
A :phpclass:`MongoDB\\Database` object.
A :phpclass:`MongoDB\\Database` object.
Behavior
--------
......
......@@ -30,11 +30,12 @@ Definition
.. include:: /includes/apiargs/MongoDBCollection-method-aggregate-option.rst
:returns:
Return Values
-------------
A :php:`MongoDB\\Driver\\Cursor <class.mongodb-driver-cursor>` or
:php:`ArrayIterator <arrayiterator>` object. In both cases, the return
value will be :php:`Traversable <traversable>`.
A :php:`MongoDB\\Driver\\Cursor <class.mongodb-driver-cursor>` or
:php:`ArrayIterator <arrayiterator>` object. In both cases, the return value
will be :php:`Traversable <traversable>`.
.. _php-agg-method-behavior:
......
......@@ -29,11 +29,11 @@ Definition
.. include:: /includes/apiargs/MongoDBCollection-method-bulkWrite-option.rst
:returns:
Return Values
-------------
A :phpclass:`MongoDB\\BulkWriteResult` object, which encapsulates a
:php:`MongoDB\\Driver\\WriteResult <class.mongodb-driver-writeresult>`
object.
A :phpclass:`MongoDB\\BulkWriteResult` object, which encapsulates a
:php:`MongoDB\\Driver\\WriteResult <class.mongodb-driver-writeresult>` object.
.. todo: add output and examples
......
......@@ -29,9 +29,10 @@ Definition
.. include:: /includes/apiargs/MongoDBCollection-method-count-option.rst
:returns:
Return Values
-------------
The number of documents matching the filter criteria.
The number of documents matching the filter criteria.
.. todo: add output and examples
......
......@@ -34,9 +34,10 @@ Definition
:manual:`createIndexes </reference/command/createIndexes>` command reference
in the MongoDB manual.
:returns:
Return Values
-------------
The name of the created index as a string.
The name of the created index as a string.
Examples
--------
......
......@@ -29,9 +29,10 @@ Definition
.. include:: /includes/apiargs/MongoDBCollection-method-createIndexes-option.rst
:returns:
Return Values
-------------
The names of the created indexes as an array of strings.
The names of the created indexes as an array of strings.
``$indexes`` parameter
----------------------
......
......@@ -29,11 +29,11 @@ Definition
.. include:: /includes/apiargs/MongoDBCollection-method-deleteMany-option.rst
:returns:
Return Values
-------------
A :phpclass:`MongoDB\\DeleteResult` object, which encapsulates a
:php:`MongoDB\\Driver\\WriteResult <class.mongodb-driver-writeresult>`
object.
A :phpclass:`MongoDB\\DeleteResult` object, which encapsulates a
:php:`MongoDB\\Driver\\WriteResult <class.mongodb-driver-writeresult>` object.
Example
-------
......
......@@ -31,11 +31,11 @@ Definition
.. include:: /includes/apiargs/MongoDBCollection-method-deleteOne-option.rst
:returns:
Return Values
-------------
A :phpclass:`MongoDB\\DeleteResult` object, which encapsulates a
:php:`MongoDB\\Driver\\WriteResult <class.mongodb-driver-writeresult>`
object.
A :phpclass:`MongoDB\\DeleteResult` object, which encapsulates a
:php:`MongoDB\\Driver\\WriteResult <class.mongodb-driver-writeresult>` object.
Example
-------
......
......@@ -29,9 +29,10 @@ Definition
.. include:: /includes/apiargs/MongoDBCollection-method-distinct-option.rst
:returns:
Return Values
-------------
An array of the distinct values.
An array of the distinct values.
Examples
--------
......
......@@ -29,11 +29,12 @@ Definition
.. include:: /includes/apiargs/MongoDBCollection-method-drop-option.rst
:returns:
Return Values
-------------
An array or object with the result document of the :manual:`drop
</reference/command/drop>` command. The return type will depend on the
``typeMap`` option.
An array or object with the result document of the :manual:`drop
</reference/command/drop>` command. The return type will depend on the
``typeMap`` option.
Example
-------
......
......@@ -29,11 +29,12 @@ Definition
.. include:: /includes/apiargs/MongoDBCollection-method-dropIndex-option.rst
:returns:
Return Values
-------------
An array or object with the result document of the :manual:`dropIndexes
</reference/command/dropIndexes>` command. The return type will depend on
the ``typeMap`` option.
An array or object with the result document of the :manual:`dropIndexes
</reference/command/dropIndexes>` command. The return type will depend on the
``typeMap`` option.
Example
-------
......
......@@ -30,11 +30,12 @@ Definition
.. include:: /includes/apiargs/MongoDBCollection-method-dropIndex-option.rst
:returns:
Return Values
-------------
An array or object with the result document of the :manual:`dropIndexes
</reference/command/dropIndexes>` command. The return type will depend on
the ``typeMap`` option.
An array or object with the result document of the :manual:`dropIndexes
</reference/command/dropIndexes>` command. The return type will depend on the
``typeMap`` option.
Example
-------
......
......@@ -29,9 +29,10 @@ Definition
.. include:: /includes/apiargs/MongoDBCollection-method-find-option.rst
:returns:
Return Values
-------------
A :php:`MongoDB\\Driver\\Cursor <class.mongodb-driver-cursor>` object.
A :php:`MongoDB\\Driver\\Cursor <class.mongodb-driver-cursor>` object.
Examples
--------
......
......@@ -29,11 +29,12 @@ Definition
.. include:: /includes/apiargs/MongoDBCollection-method-findOne-option.rst
:returns:
Return Values
-------------
An array or object for the :term:`first document <natural order>` document
that matched the query, or ``null`` if no document matched the query. The
return type will depend on the ``typeMap`` option.
An array or object for the :term:`first document <natural order>` document that
matched the query, or ``null`` if no document matched the query. The return type
will depend on the ``typeMap`` option.
Examples
--------
......
......@@ -31,10 +31,11 @@ Definition
.. include:: /includes/extracts/bson-deserialization-findOneAndDelete.rst
:returns:
Return Values
-------------
An object for the document that was deleted, or ``null`` if no document
matched the query.
An object for the document that was deleted, or ``null`` if no document matched
the query.
Examples
--------
......
......@@ -31,12 +31,12 @@ Definition
.. include:: /includes/extracts/bson-deserialization-findOneAndReplace.rst
:returns:
Return Values
-------------
An object for either the original or the replaced document, depending on
the specified value of the ``returnDocument`` option. By default, the
original document is returned. If no document matched the query, ``null``
is returned.
An object for either the original or the replaced document, depending on the
specified value of the ``returnDocument`` option. By default, the original
document is returned. If no document matched the query, ``null`` is returned.
Examples
--------
......
......@@ -31,12 +31,12 @@ Definition
.. include:: /includes/extracts/bson-deserialization-findOneAndUpdate.rst
:returns:
Return Values
-------------
An object for either the original or the updated document, depending on
the specified value of the ``returnDocument`` option. By default, the
original document is returned. If no document matched the query, ``null``
is returned.
An object for either the original or the updated document, depending on the
specified value of the ``returnDocument`` option. By default, the original
document is returned. If no document matched the query, ``null`` is returned.
Examples
--------
......
......@@ -21,9 +21,10 @@ Definition
function getCollectionName(): string
:returns:
Return Values
-------------
The name of this collection as a string.
The name of this collection as a string.
Example
-------
......
......@@ -21,9 +21,10 @@ Definition
function getDatabaseName(): string
:returns:
Return Values
-------------
The name of the database containing this collection as a string.
The name of the database containing this collection as a string.
Example
-------
......
......@@ -23,9 +23,10 @@ Definition
function getManager(): MongoDB\Manager
:returns:
Return Values
-------------
A :php:`MongoDB\\Driver\\Manager <class.mongodb-driver-manager>` object.
A :php:`MongoDB\\Driver\\Manager <class.mongodb-driver-manager>` object.
See Also
--------
......
......@@ -22,9 +22,10 @@ Definition
function getNamespace(): string
:returns:
Return Values
-------------
The namespace of this collection as a string.
The namespace of this collection as a string.
Example
-------
......
......@@ -29,11 +29,11 @@ Definition
.. include:: /includes/apiargs/MongoDBCollection-method-insertMany-option.rst
:returns:
Return Values
-------------
A :phpclass:`MongoDB\\InsertManyResult` object, which encapsulates a
:php:`MongoDB\\Driver\\WriteResult <class.mongodb-driver-writeresult>`
object.
A :phpclass:`MongoDB\\InsertManyResult` object, which encapsulates a
:php:`MongoDB\\Driver\\WriteResult <class.mongodb-driver-writeresult>` object.
Example
-------
......
......@@ -29,11 +29,11 @@ Definition
.. include:: /includes/apiargs/MongoDBCollection-method-insertOne-option.rst
:returns:
Return Values
-------------
A :phpclass:`MongoDB\\InsertOneResult` object, which encapsulates a
:php:`MongoDB\\Driver\\WriteResult <class.mongodb-driver-writeresult>`
object.
A :phpclass:`MongoDB\\InsertOneResult` object, which encapsulates a
:php:`MongoDB\\Driver\\WriteResult <class.mongodb-driver-writeresult>` object.
Example
-------
......
......@@ -29,11 +29,11 @@ Definition
.. include:: /includes/apiargs/MongoDBCollection-method-listIndexes-option.rst
:returns:
Return Values
-------------
A traversable :phpclass:`MongoDB\\Model\\IndexInfoIterator`, which
contains an :phpclass:`MongoDB\\Model\\IndexInfo` object for each index
for the collection.
A traversable :phpclass:`MongoDB\\Model\\IndexInfoIterator`, which contains a
:phpclass:`MongoDB\\Model\\IndexInfo` object for each index for the collection.
Example
-------
......
......@@ -31,11 +31,11 @@ Definition
.. include:: /includes/apiargs/MongoDBCollection-method-replaceOne-option.rst
:returns:
Return Values
-------------
A :phpclass:`MongoDB\\UpdateResult` object, which encapsulates a
:php:`MongoDB\\Driver\\WriteResult <class.mongodb-driver-writeresult>`
object.
A :phpclass:`MongoDB\\UpdateResult` object, which encapsulates a
:php:`MongoDB\\Driver\\WriteResult <class.mongodb-driver-writeresult>` object.
Example
-------
......
......@@ -29,11 +29,11 @@ Definition
.. include:: /includes/apiargs/MongoDBCollection-method-updateMany-option.rst
:returns:
Return Values
-------------
A :phpclass:`MongoDB\\UpdateResult` object, which encapsulates a
:php:`MongoDB\\Driver\\WriteResult <class.mongodb-driver-writeresult>`
object.
A :phpclass:`MongoDB\\UpdateResult` object, which encapsulates a
:php:`MongoDB\\Driver\\WriteResult <class.mongodb-driver-writeresult>` object.
Examples
--------
......
......@@ -31,11 +31,11 @@ Definition
.. include:: /includes/apiargs/MongoDBCollection-method-updateOne-option.rst
:returns:
Return Values
-------------
A :phpclass:`MongoDB\\UpdateResult` object, which encapsulates a
:php:`MongoDB\\Driver\\WriteResult <class.mongodb-driver-writeresult>`
object.
A :phpclass:`MongoDB\\UpdateResult` object, which encapsulates a
:php:`MongoDB\\Driver\\WriteResult <class.mongodb-driver-writeresult>` object.
Examples
--------
......
......@@ -29,9 +29,10 @@ Definition
.. include:: /includes/apiargs/MongoDBCollection-method-withOptions-option.rst
:returns:
Return Values
-------------
A :phpclass:`MongoDB\\Collection` object.
A :phpclass:`MongoDB\\Collection` object.
Example
-------
......
......@@ -29,9 +29,10 @@ Definition
.. include:: /includes/apiargs/MongoDBDatabase-method-command-option.rst
:returns:
Return Values
-------------
A :php:`MongoDB\\Driver\\Cursor <class.mongodb-driver-cursor>` object.
A :php:`MongoDB\\Driver\\Cursor <class.mongodb-driver-cursor>` object.
Example
-------
......
......@@ -47,10 +47,11 @@ Definition
:manual:`create </reference/command/create>` command reference in the MongoDB
manual for compatibility considerations.
:returns:
Return Values
-------------
An array or object with the result document of the :manual:`create
</reference/command/create>` command.
An array or object with the result document of the :manual:`create
</reference/command/create>` command.
Example
-------
......
......@@ -29,11 +29,12 @@ Definition
.. include:: /includes/apiargs/MongoDBDatabase-method-drop-option.rst
:returns:
Return Values
-------------
An array or object with the result document of the :manual:`dropDatabase
</reference/command/dropDatabase>` command. The return type will depend on
the ``typeMap`` option.
An array or object with the result document of the :manual:`dropDatabase
</reference/command/dropDatabase>` command. The return type will depend on the
``typeMap`` option.
Example
-------
......
......@@ -29,11 +29,12 @@ Definition
.. include:: /includes/apiargs/MongoDBDatabase-method-dropCollection-option.rst
:returns:
Return Values
-------------
An array or object with the result document of the :manual:`drop
</reference/command/drop>` command. The return type will depend on
the ``typeMap`` option.
An array or object with the result document of the :manual:`drop
</reference/command/drop>` command. The return type will depend on the
``typeMap`` option.
Example
-------
......
......@@ -21,9 +21,10 @@ Definition
function getDatabaseName(): string
:returns:
Return Values
-------------
The name of this database as a string.
The name of this database as a string.
Example
-------
......
......@@ -23,9 +23,10 @@ Definition
function getManager(): MongoDB\Manager
:returns:
Return Values
-------------
A :php:`MongoDB\\Driver\\Manager <class.mongodb-driver-manager>` object.
A :php:`MongoDB\\Driver\\Manager <class.mongodb-driver-manager>` object.
See Also
--------
......
......@@ -29,11 +29,12 @@ Definition
.. include:: /includes/apiargs/MongoDBDatabase-method-listCollections-option.rst
:returns:
Return Values
-------------
A traversable :phpclass:`MongoDB\\Model\\CollectionInfoIterator`, which
contains an :phpclass:`MongoDB\\Model\\CollectionInfo` object for each
collection in the database.
A traversable :phpclass:`MongoDB\\Model\\CollectionInfoIterator`, which contains
a :phpclass:`MongoDB\\Model\\CollectionInfo` object for each collection in the
database.
Example
-------
......
......@@ -29,9 +29,10 @@ Definition
.. include:: /includes/apiargs/MongoDBDatabase-method-selectCollection-option.rst
:returns:
Return Values
-------------
A :phpclass:`MongoDB\\Collection` object.
A :phpclass:`MongoDB\\Collection` object.
Behavior
--------
......
......@@ -29,9 +29,10 @@ Definition
.. include:: /includes/apiargs/MongoDBDatabase-method-selectGridFSBucket-option.rst
:returns:
Return Values
-------------
A :phpclass:`MongoDB\\GridFS\\Bucket` object.
A :phpclass:`MongoDB\\GridFS\\Bucket` object.
Behavior
--------
......
......@@ -29,9 +29,10 @@ Definition
.. include:: /includes/apiargs/MongoDBDatabase-method-withOptions-option.rst
:returns:
Return Values
-------------
A :phpclass:`MongoDB\\Database` object.
A :phpclass:`MongoDB\\Database` object.
Example
-------
......
......@@ -25,9 +25,10 @@ Definition
.. include:: /includes/apiargs/MongoDBDatabase-method-get-param.rst
:returns:
Return Values
-------------
A :phpclass:`MongoDB\\Collection` object.
A :phpclass:`MongoDB\\Collection` object.
Behavior
--------
......
......@@ -29,9 +29,10 @@ Definition
.. include:: /includes/apiargs/MongoDBGridFSBucket-method-find-option.rst
:returns:
Return Values
-------------
A :php:`MongoDB\\Driver\\Cursor <class.mongodb-driver-cursor>` object.
A :php:`MongoDB\\Driver\\Cursor <class.mongodb-driver-cursor>` object.
.. todo: add examples
......
......@@ -21,8 +21,9 @@ Definition
function getBucketName(): string
:returns:
Return Values
-------------
The name of this bucket as a string.
The name of this bucket as a string.
.. todo: add examples
......@@ -21,8 +21,9 @@ Definition
function getDatabaseName(): string
:returns:
Return Values
-------------
The name of the database containing this bucket as a string.
The name of the database containing this bucket as a string.
.. todo: add examples
......@@ -25,9 +25,10 @@ Definition
.. include:: /includes/apiargs/MongoDBGridFSBucket-method-getFileDocumentForStream-param.rst
:returns:
Return Values
-------------
The metadata document associated with the GridFS stream.
The metadata document associated with the GridFS stream.
.. todo: add examples
......
......@@ -25,10 +25,11 @@ Definition
.. include:: /includes/apiargs/MongoDBGridFSBucket-method-getFileIdForStream-param.rst
:returns:
Return Values
-------------
The ``_id`` field of the metadata document associated with the GridFS
stream.
The ``_id`` field of the metadata document associated with the GridFS
stream.
.. todo: add examples
......
......@@ -25,9 +25,10 @@ Definition
.. include:: /includes/apiargs/MongoDBGridFSBucket-method-openDownloadStream-param.rst
:returns:
Return Values
-------------
A readable stream resource.
A readable stream resource.
.. todo: add examples
......
......@@ -29,9 +29,10 @@ Definition
.. include:: /includes/apiargs/MongoDBGridFSBucket-method-openDownloadStreamByName-option.rst
:returns:
Return Values
-------------
A readable stream resource.
A readable stream resource.
.. todo: add examples
......
......@@ -29,9 +29,10 @@ Definition
.. include:: /includes/apiargs/MongoDBGridFSBucket-method-openUploadStream-option.rst
:returns:
Return Values
-------------
A writable stream resource.
A writable stream resource.
Behavior
--------
......
......@@ -29,12 +29,13 @@ Definition
.. include:: /includes/apiargs/MongoDBGridFSBucket-method-uploadFromStream-option.rst
:returns:
Return Values
-------------
The ``_id`` field of the metadata document associated with the newly
created GridFS file. If the ``_id`` option is not specified, a new
:php:`MongoDB\\BSON\\ObjectID <class.mongodb-bson-objectid>` object will
be used by default.
The ``_id`` field of the metadata document associated with the newly created
GridFS file. If the ``_id`` option is not specified, a new
:php:`MongoDB\\BSON\\ObjectID <class.mongodb-bson-objectid>` object will be used
by default.
.. todo: add examples
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment