From 3034f43cdc9fefc0684e5a780ecef76bd0643afa Mon Sep 17 00:00:00 2001 From: Jeremy Mikola Date: Wed, 13 Dec 2023 09:12:27 -0500 Subject: [PATCH] PHPLIB-1275: Replace apiargs usage in docs with extracts This backports 8f562a701c908b6b7e09e344062094d245050fd3 from master to v1.17 --- .../apiargs-MongoDBClient-common-option.yaml | 34 -- ...Client-method-construct-driverOptions.yaml | 189 --------- ...-MongoDBClient-method-construct-param.yaml | 51 --- ...t-method-createClientEncryption-param.yaml | 4 - ...goDBClient-method-dropDatabase-option.yaml | 25 -- ...ngoDBClient-method-dropDatabase-param.yaml | 10 - ...piargs-MongoDBClient-method-get-param.yaml | 6 - ...oDBClient-method-listDatabases-option.yaml | 47 --- ...goDBClient-method-listDatabases-param.yaml | 4 - ...Client-method-selectCollection-option.yaml | 27 -- ...BClient-method-selectCollection-param.yaml | 16 - ...DBClient-method-selectDatabase-option.yaml | 27 -- ...oDBClient-method-selectDatabase-param.yaml | 10 - ...rgs-MongoDBClient-method-watch-option.yaml | 71 ---- ...args-MongoDBClient-method-watch-param.yaml | 8 - ...iargs-MongoDBCollection-common-option.yaml | 86 ----- ...piargs-MongoDBCollection-common-param.yaml | 33 -- ...oDBCollection-method-aggregate-option.yaml | 72 ---- ...goDBCollection-method-aggregate-param.yaml | 14 - ...oDBCollection-method-bulkWrite-option.yaml | 44 --- ...goDBCollection-method-bulkWrite-param.yaml | 37 -- ...oDBCollection-method-construct-option.yaml | 25 -- ...goDBCollection-method-construct-param.yaml | 16 - ...MongoDBCollection-method-count-option.yaml | 64 --- ...-MongoDBCollection-method-count-param.yaml | 11 - ...llection-method-countDocuments-option.yaml | 56 --- ...ollection-method-countDocuments-param.yaml | 11 - ...BCollection-method-createIndex-option.yaml | 117 ------ ...DBCollection-method-createIndex-param.yaml | 20 - ...ollection-method-createIndexes-option.yaml | 29 -- ...Collection-method-createIndexes-param.yaml | 23 -- ...ction-method-createSearchIndex-option.yaml | 17 - ...ection-method-createSearchIndex-param.yaml | 14 - ...ion-method-createSearchIndexes-option.yaml | 4 - ...tion-method-createSearchIndexes-param.yaml | 21 - ...DBCollection-method-deleteMany-option.yaml | 38 -- ...oDBCollection-method-deleteMany-param.yaml | 11 - ...oDBCollection-method-deleteOne-option.yaml | 38 -- ...goDBCollection-method-deleteOne-param.yaml | 11 - ...goDBCollection-method-distinct-option.yaml | 37 -- ...ngoDBCollection-method-distinct-param.yaml | 20 - ...-MongoDBCollection-method-drop-option.yaml | 31 -- ...s-MongoDBCollection-method-drop-param.yaml | 4 - ...oDBCollection-method-dropIndex-option.yaml | 31 -- ...goDBCollection-method-dropIndex-param.yaml | 15 - ...BCollection-method-dropIndexes-option.yaml | 29 -- ...DBCollection-method-dropIndexes-param.yaml | 4 - ...lection-method-dropSearchIndex-option.yaml | 4 - ...llection-method-dropSearchIndex-param.yaml | 13 - ...n-method-estimateDocumentCount-option.yaml | 25 -- ...on-method-estimateDocumentCount-param.yaml | 4 - ...ngoDBCollection-method-explain-option.yaml | 31 -- ...ongoDBCollection-method-explain-param.yaml | 13 - ...-MongoDBCollection-method-find-option.yaml | 263 ------------- ...s-MongoDBCollection-method-find-param.yaml | 11 - ...ngoDBCollection-method-findOne-option.yaml | 84 ---- ...ongoDBCollection-method-findOne-param.yaml | 11 - ...ection-method-findOneAndDelete-option.yaml | 56 --- ...lection-method-findOneAndDelete-param.yaml | 11 - ...ction-method-findOneAndReplace-option.yaml | 77 ---- ...ection-method-findOneAndReplace-param.yaml | 15 - ...ection-method-findOneAndUpdate-option.yaml | 83 ---- ...lection-method-findOneAndUpdate-param.yaml | 15 - ...DBCollection-method-insertMany-option.yaml | 27 -- ...oDBCollection-method-insertMany-param.yaml | 13 - ...oDBCollection-method-insertOne-option.yaml | 23 -- ...goDBCollection-method-insertOne-param.yaml | 13 - ...BCollection-method-listIndexes-option.yaml | 19 - ...DBCollection-method-listIndexes-param.yaml | 4 - ...ction-method-listSearchIndexes-option.yaml | 44 --- ...ection-method-listSearchIndexes-param.yaml | 4 - ...oDBCollection-method-mapReduce-option.yaml | 113 ------ ...goDBCollection-method-mapReduce-param.yaml | 46 --- ...ongoDBCollection-method-rename-option.yaml | 33 -- ...MongoDBCollection-method-rename-param.yaml | 25 -- ...DBCollection-method-replaceOne-option.yaml | 46 --- ...oDBCollection-method-replaceOne-param.yaml | 15 - ...DBCollection-method-updateMany-option.yaml | 52 --- ...oDBCollection-method-updateMany-param.yaml | 15 - ...oDBCollection-method-updateOne-option.yaml | 52 --- ...goDBCollection-method-updateOne-param.yaml | 15 - ...ction-method-updateSearchIndex-option.yaml | 4 - ...ection-method-updateSearchIndex-param.yaml | 25 -- ...MongoDBCollection-method-watch-option.yaml | 73 ---- ...-MongoDBCollection-method-watch-param.yaml | 8 - ...BCollection-method-withOptions-option.yaml | 27 -- ...DBCollection-method-withOptions-param.yaml | 4 - ...apiargs-MongoDBDatabase-common-option.yaml | 36 -- ...ngoDBDatabase-method-aggregate-option.yaml | 64 --- ...ongoDBDatabase-method-aggregate-param.yaml | 14 - ...MongoDBDatabase-method-command-option.yaml | 17 - ...-MongoDBDatabase-method-command-param.yaml | 13 - ...ngoDBDatabase-method-construct-option.yaml | 25 -- ...ongoDBDatabase-method-construct-param.yaml | 12 - ...tabase-method-createCollection-option.yaml | 363 ------------------ ...atabase-method-createCollection-param.yaml | 10 - ...ethod-createEncryptedCollection-param.yaml | 47 --- ...gs-MongoDBDatabase-method-drop-option.yaml | 25 -- ...rgs-MongoDBDatabase-method-drop-param.yaml | 4 - ...Database-method-dropCollection-option.yaml | 31 -- ...BDatabase-method-dropCollection-param.yaml | 10 - ...args-MongoDBDatabase-method-get-param.yaml | 6 - ...atabase-method-listCollections-option.yaml | 46 --- ...Database-method-listCollections-param.yaml | 4 - ...tabase-method-modifyCollection-option.yaml | 23 -- ...atabase-method-modifyCollection-param.yaml | 20 - ...tabase-method-renameCollection-option.yaml | 33 -- ...atabase-method-renameCollection-param.yaml | 34 -- ...tabase-method-selectCollection-option.yaml | 27 -- ...atabase-method-selectCollection-param.yaml | 10 - ...base-method-selectGridFSBucket-option.yaml | 52 --- ...abase-method-selectGridFSBucket-param.yaml | 4 - ...s-MongoDBDatabase-method-watch-option.yaml | 71 ---- ...gs-MongoDBDatabase-method-watch-param.yaml | 8 - ...oDBDatabase-method-withOptions-option.yaml | 27 -- ...goDBDatabase-method-withOptions-param.yaml | 4 - ...rgs-MongoDBGridFSBucket-common-option.yaml | 61 --- ...args-MongoDBGridFSBucket-common-param.yaml | 39 -- ...BGridFSBucket-method-construct-option.yaml | 50 --- ...DBGridFSBucket-method-construct-param.yaml | 12 - ...ngoDBGridFSBucket-method-delete-param.yaml | 6 - ...SBucket-method-downloadToStream-param.yaml | 10 - ...-method-downloadToStreamByName-option.yaml | 4 - ...t-method-downloadToStreamByName-param.yaml | 14 - ...ongoDBGridFSBucket-method-find-option.yaml | 76 ---- ...oDBGridFSBucket-method-findOne-option.yaml | 46 --- ...method-getFileDocumentForStream-param.yaml | 4 - ...ucket-method-getFileIdForStream-param.yaml | 4 - ...ucket-method-openDownloadStream-param.yaml | 6 - ...ethod-openDownloadStreamByName-option.yaml | 4 - ...method-openDownloadStreamByName-param.yaml | 10 - ...Bucket-method-openUploadStream-option.yaml | 18 - ...SBucket-method-openUploadStream-param.yaml | 10 - ...ngoDBGridFSBucket-method-rename-param.yaml | 15 - ...Bucket-method-uploadFromStream-option.yaml | 18 - ...SBucket-method-uploadFromStream-param.yaml | 19 - docs/includes/apiargs-aggregate-option.yaml | 43 --- docs/includes/apiargs-common-option.yaml | 124 ------ docs/includes/apiargs-common-param.yaml | 42 -- .../apiargs-dropCollection-option.yaml | 21 - .../apiargs-function-add_logger-param.yaml | 11 - .../apiargs-function-remove_logger-param.yaml | 11 - ...iargs-function-with_transaction-param.yaml | 31 -- docs/includes/apiargs-method-watch-param.yaml | 13 - docs/includes/extracts-bucket-option.yaml | 28 ++ docs/includes/extracts-client-option.yaml | 28 ++ docs/includes/extracts-collection-option.yaml | 38 ++ docs/includes/extracts-common-option.yaml | 86 +++++ docs/includes/extracts-database-option.yaml | 28 ++ docs/includes/extracts-note.yaml | 24 +- docs/includes/extracts-option-requires.yaml | 48 +++ ...option.yaml => extracts-watch-option.yaml} | 89 ++--- docs/reference/function/add_logger.txt | 8 +- docs/reference/function/remove_logger.txt | 8 +- docs/reference/function/with_transaction.txt | 22 +- ...ongoDBBulkWriteResult-getModifiedCount.txt | 2 +- .../MongoDBClient-createClientEncryption.txt | 17 +- .../method/MongoDBClient-dropDatabase.txt | 41 +- .../MongoDBClient-listDatabaseNames.txt | 51 ++- .../method/MongoDBClient-listDatabases.txt | 53 ++- .../method/MongoDBClient-selectCollection.txt | 46 ++- .../method/MongoDBClient-selectDatabase.txt | 42 +- .../method/MongoDBClient-startSession.txt | 10 +- docs/reference/method/MongoDBClient-watch.txt | 85 +++- .../method/MongoDBClient__construct.txt | 190 ++++++++- docs/reference/method/MongoDBClient__get.txt | 6 +- .../method/MongoDBCollection-aggregate.txt | 115 +++++- .../method/MongoDBCollection-bulkWrite.txt | 87 ++++- .../method/MongoDBCollection-count.txt | 72 +++- .../MongoDBCollection-countDocuments.txt | 57 ++- .../method/MongoDBCollection-createIndex.txt | 112 +++++- .../MongoDBCollection-createIndexes.txt | 83 +++- .../MongoDBCollection-createSearchIndex.txt | 42 +- .../MongoDBCollection-createSearchIndexes.txt | 42 +- .../method/MongoDBCollection-deleteMany.txt | 60 ++- .../method/MongoDBCollection-deleteOne.txt | 60 ++- .../method/MongoDBCollection-distinct.txt | 65 +++- .../method/MongoDBCollection-drop.txt | 62 ++- .../method/MongoDBCollection-dropIndex.txt | 56 ++- .../method/MongoDBCollection-dropIndexes.txt | 51 ++- .../MongoDBCollection-dropSearchIndex.txt | 23 +- ...ngoDBCollection-estimatedDocumentCount.txt | 40 +- .../method/MongoDBCollection-explain.txt | 47 ++- .../method/MongoDBCollection-find.txt | 200 +++++++++- .../method/MongoDBCollection-findOne.txt | 151 +++++++- .../MongoDBCollection-findOneAndDelete.txt | 82 +++- .../MongoDBCollection-findOneAndReplace.txt | 105 ++++- .../MongoDBCollection-findOneAndUpdate.txt | 116 +++++- .../method/MongoDBCollection-insertMany.txt | 57 ++- .../method/MongoDBCollection-insertOne.txt | 47 ++- .../method/MongoDBCollection-listIndexes.txt | 32 +- .../MongoDBCollection-listSearchIndexes.txt | 66 +++- .../method/MongoDBCollection-mapReduce.txt | 134 ++++++- .../method/MongoDBCollection-rename.txt | 58 ++- .../method/MongoDBCollection-replaceOne.txt | 75 +++- .../method/MongoDBCollection-updateMany.txt | 86 ++++- .../method/MongoDBCollection-updateOne.txt | 86 ++++- .../MongoDBCollection-updateSearchIndex.txt | 41 +- .../method/MongoDBCollection-watch.txt | 89 ++++- .../method/MongoDBCollection-withOptions.txt | 40 +- .../method/MongoDBCollection__construct.txt | 58 ++- .../method/MongoDBDatabase-aggregate.txt | 104 ++++- .../method/MongoDBDatabase-command.txt | 36 +- .../MongoDBDatabase-createCollection.txt | 296 +++++++++++++- ...goDBDatabase-createEncryptedCollection.txt | 38 +- .../reference/method/MongoDBDatabase-drop.txt | 38 +- .../method/MongoDBDatabase-dropCollection.txt | 66 +++- .../MongoDBDatabase-listCollectionNames.txt | 48 ++- .../MongoDBDatabase-listCollections.txt | 50 ++- .../MongoDBDatabase-modifyCollection.txt | 48 ++- .../MongoDBDatabase-renameCollection.txt | 60 ++- .../MongoDBDatabase-selectCollection.txt | 42 +- .../MongoDBDatabase-selectGridFSBucket.txt | 51 ++- .../method/MongoDBDatabase-watch.txt | 85 +++- .../method/MongoDBDatabase-withOptions.txt | 40 +- .../method/MongoDBDatabase__construct.txt | 61 ++- .../reference/method/MongoDBDatabase__get.txt | 6 +- .../method/MongoDBGridFSBucket-delete.txt | 6 +- .../MongoDBGridFSBucket-downloadToStream.txt | 9 +- ...oDBGridFSBucket-downloadToStreamByName.txt | 42 +- .../method/MongoDBGridFSBucket-find.txt | 200 +++++++++- .../method/MongoDBGridFSBucket-findOne.txt | 151 +++++++- ...BGridFSBucket-getFileDocumentForStream.txt | 6 +- ...MongoDBGridFSBucket-getFileIdForStream.txt | 6 +- ...MongoDBGridFSBucket-openDownloadStream.txt | 6 +- ...BGridFSBucket-openDownloadStreamByName.txt | 38 +- .../MongoDBGridFSBucket-openUploadStream.txt | 45 ++- .../method/MongoDBGridFSBucket-rename.txt | 9 +- .../MongoDBGridFSBucket-uploadFromStream.txt | 49 ++- .../method/MongoDBGridFSBucket__construct.txt | 74 +++- docs/tutorial/modeling-bson-data.txt | 2 +- 231 files changed, 4819 insertions(+), 5130 deletions(-) delete mode 100644 docs/includes/apiargs-MongoDBClient-common-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBClient-method-construct-driverOptions.yaml delete mode 100644 docs/includes/apiargs-MongoDBClient-method-construct-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBClient-method-createClientEncryption-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBClient-method-dropDatabase-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBClient-method-dropDatabase-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBClient-method-get-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBClient-method-listDatabases-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBClient-method-listDatabases-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBClient-method-selectCollection-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBClient-method-selectCollection-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBClient-method-selectDatabase-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBClient-method-selectDatabase-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBClient-method-watch-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBClient-method-watch-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-common-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-common-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-aggregate-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-aggregate-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-bulkWrite-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-bulkWrite-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-construct-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-construct-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-count-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-count-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-countDocuments-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-countDocuments-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-createIndex-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-createIndex-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-createIndexes-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-createIndexes-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-createSearchIndex-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-createSearchIndex-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-createSearchIndexes-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-createSearchIndexes-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-deleteMany-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-deleteMany-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-deleteOne-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-deleteOne-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-distinct-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-distinct-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-drop-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-drop-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-dropIndex-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-dropIndex-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-dropIndexes-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-dropIndexes-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-dropSearchIndex-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-dropSearchIndex-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-estimateDocumentCount-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-estimateDocumentCount-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-explain-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-explain-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-find-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-find-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-findOne-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-findOne-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-findOneAndDelete-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-findOneAndDelete-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-findOneAndReplace-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-findOneAndReplace-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-findOneAndUpdate-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-findOneAndUpdate-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-insertMany-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-insertMany-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-insertOne-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-insertOne-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-listIndexes-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-listIndexes-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-listSearchIndexes-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-listSearchIndexes-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-mapReduce-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-mapReduce-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-rename-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-rename-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-replaceOne-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-replaceOne-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-updateMany-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-updateMany-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-updateOne-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-updateOne-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-updateSearchIndex-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-updateSearchIndex-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-watch-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-watch-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-withOptions-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-withOptions-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBDatabase-common-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBDatabase-method-aggregate-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBDatabase-method-aggregate-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBDatabase-method-command-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBDatabase-method-command-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBDatabase-method-construct-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBDatabase-method-construct-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBDatabase-method-createCollection-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBDatabase-method-createCollection-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBDatabase-method-createEncryptedCollection-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBDatabase-method-drop-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBDatabase-method-drop-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBDatabase-method-dropCollection-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBDatabase-method-dropCollection-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBDatabase-method-get-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBDatabase-method-listCollections-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBDatabase-method-listCollections-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBDatabase-method-modifyCollection-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBDatabase-method-modifyCollection-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBDatabase-method-renameCollection-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBDatabase-method-renameCollection-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBDatabase-method-selectCollection-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBDatabase-method-selectCollection-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBDatabase-method-selectGridFSBucket-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBDatabase-method-selectGridFSBucket-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBDatabase-method-watch-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBDatabase-method-watch-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBDatabase-method-withOptions-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBDatabase-method-withOptions-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBGridFSBucket-common-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBGridFSBucket-common-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBGridFSBucket-method-construct-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBGridFSBucket-method-construct-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBGridFSBucket-method-delete-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBGridFSBucket-method-downloadToStream-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBGridFSBucket-method-downloadToStreamByName-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBGridFSBucket-method-downloadToStreamByName-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBGridFSBucket-method-find-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBGridFSBucket-method-findOne-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBGridFSBucket-method-getFileDocumentForStream-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBGridFSBucket-method-getFileIdForStream-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBGridFSBucket-method-openDownloadStream-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBGridFSBucket-method-openDownloadStreamByName-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBGridFSBucket-method-openDownloadStreamByName-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBGridFSBucket-method-openUploadStream-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBGridFSBucket-method-openUploadStream-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBGridFSBucket-method-rename-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBGridFSBucket-method-uploadFromStream-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBGridFSBucket-method-uploadFromStream-param.yaml delete mode 100644 docs/includes/apiargs-aggregate-option.yaml delete mode 100644 docs/includes/apiargs-common-option.yaml delete mode 100644 docs/includes/apiargs-common-param.yaml delete mode 100644 docs/includes/apiargs-dropCollection-option.yaml delete mode 100644 docs/includes/apiargs-function-add_logger-param.yaml delete mode 100644 docs/includes/apiargs-function-remove_logger-param.yaml delete mode 100644 docs/includes/apiargs-function-with_transaction-param.yaml delete mode 100644 docs/includes/apiargs-method-watch-param.yaml create mode 100644 docs/includes/extracts-bucket-option.yaml create mode 100644 docs/includes/extracts-client-option.yaml create mode 100644 docs/includes/extracts-collection-option.yaml create mode 100644 docs/includes/extracts-common-option.yaml create mode 100644 docs/includes/extracts-database-option.yaml create mode 100644 docs/includes/extracts-option-requires.yaml rename docs/includes/{apiargs-method-watch-option.yaml => extracts-watch-option.yaml} (76%) diff --git a/docs/includes/apiargs-MongoDBClient-common-option.yaml b/docs/includes/apiargs-MongoDBClient-common-option.yaml deleted file mode 100644 index 4ffc52a92..000000000 --- a/docs/includes/apiargs-MongoDBClient-common-option.yaml +++ /dev/null @@ -1,34 +0,0 @@ -arg_name: option -name: readConcern -type: :php:`MongoDB\\Driver\\ReadConcern ` -description: | - :manual:`Read concern ` to use for the operation. - Defaults to the client's read concern. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: readPreference -type: :php:`MongoDB\\Driver\\ReadPreference ` -description: | - :manual:`Read preference ` to use for the - operation. Defaults to the client's read preference. -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-common-option.yaml - ref: typeMap ---- -arg_name: option -name: writeConcern -type: :php:`MongoDB\\Driver\\WriteConcern ` -description: | - :manual:`Write concern ` to use for the operation. - Defaults to the client's write concern. -interface: phpmethod -operation: ~ -optional: true -... diff --git a/docs/includes/apiargs-MongoDBClient-method-construct-driverOptions.yaml b/docs/includes/apiargs-MongoDBClient-method-construct-driverOptions.yaml deleted file mode 100644 index 8406bd091..000000000 --- a/docs/includes/apiargs-MongoDBClient-method-construct-driverOptions.yaml +++ /dev/null @@ -1,189 +0,0 @@ -arg_name: option -name: autoEncryption -type: array -description: | - Options to configure client-side field-level encryption in the driver. The - encryption options are documented in the :php:`extension documentation - `. - For the ``keyVaultClient`` option, you may pass a :phpclass:`MongoDB\\Client` - instance, which will be unwrapped to provide a :php:`MongoDB\\Driver\\Manager ` - to the extension. - - .. versionadded:: 1.6 -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: driver -type: array -description: | - Additional driver metadata to be passed on to the server handshake. This is an - array containing ``name``, ``version``, and ``platform`` fields: - - .. code-block:: php - - [ - 'name' => 'my-driver', - 'version' => '1.2.3-dev', - 'platform' => 'some-platform', - ] - - .. note:: - - This feature is primarily designed for custom drivers and ODMs, which may - want to identify themselves to the server for diagnostic purposes. - Applications should use the ``appName`` URI option instead of driver - metadata. - - .. versionadded:: 1.7 -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: serverApi -type: :php:`MongoDB\\Driver\\ServerApi ` -description: | - Used to declare an API version on the client. See the - :manual:`Stable API tutorial ` for usage. - - .. versionadded:: 1.9 -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: typeMap -type: array -description: | - Default :php:`type map - ` - 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 `_. - - .. deprecated:: 1.6 - This option has been deprecated. Use the ``tlsAllowInvalidHostnames`` URI - option instead. -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. - - .. deprecated:: 1.6 - This option has been deprecated. Use the ``tlsCAFile`` URI option instead. -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. - - .. deprecated:: 1.6 - This option has been deprecated. Use the ``tlsCertificateKeyFile`` URI - option instead. -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. - - .. deprecated:: 1.6 - This option has been deprecated. Use the ``tlsCertificateKeyFilePassword`` - URI option instead. -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. - - .. deprecated:: 1.6 - This option has been deprecated. Use the ``tlsAllowInvalidCertificates`` - URI option instead. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: context -type: resource -description: | - :php:`SSL context options ` 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 -... diff --git a/docs/includes/apiargs-MongoDBClient-method-construct-param.yaml b/docs/includes/apiargs-MongoDBClient-method-construct-param.yaml deleted file mode 100644 index 62998287e..000000000 --- a/docs/includes/apiargs-MongoDBClient-method-construct-param.yaml +++ /dev/null @@ -1,51 +0,0 @@ -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 - ` 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 `_. 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() ` 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 `_. - - Refer to the :php:`MongoDB\\Driver\\Manager::__construct() - ` extension reference and :manual:`MongoDB - 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 `, the - |php-library| allows you to specify a default :php:`type map - ` - to apply to the cursors it creates. -interface: phpmethod -operation: ~ -optional: true -... diff --git a/docs/includes/apiargs-MongoDBClient-method-createClientEncryption-param.yaml b/docs/includes/apiargs-MongoDBClient-method-createClientEncryption-param.yaml deleted file mode 100644 index 73ad04d0b..000000000 --- a/docs/includes/apiargs-MongoDBClient-method-createClientEncryption-param.yaml +++ /dev/null @@ -1,4 +0,0 @@ -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBClient-method-dropDatabase-option.yaml b/docs/includes/apiargs-MongoDBClient-method-dropDatabase-option.yaml deleted file mode 100644 index be0a19aa9..000000000 --- a/docs/includes/apiargs-MongoDBClient-method-dropDatabase-option.yaml +++ /dev/null @@ -1,25 +0,0 @@ -source: - file: apiargs-common-option.yaml - ref: comment -post: | - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -source: - file: apiargs-common-option.yaml - ref: session -post: | - .. versionadded:: 1.3 ---- -source: - file: apiargs-common-option.yaml - ref: typeMap -post: | - This will be used for the returned command result document. ---- -source: - file: apiargs-MongoDBClient-common-option.yaml - ref: writeConcern -... diff --git a/docs/includes/apiargs-MongoDBClient-method-dropDatabase-param.yaml b/docs/includes/apiargs-MongoDBClient-method-dropDatabase-param.yaml deleted file mode 100644 index 07b768348..000000000 --- a/docs/includes/apiargs-MongoDBClient-method-dropDatabase-param.yaml +++ /dev/null @@ -1,10 +0,0 @@ -source: - file: apiargs-common-param.yaml - ref: $databaseName -replacement: - action: " to drop" ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBClient-method-get-param.yaml b/docs/includes/apiargs-MongoDBClient-method-get-param.yaml deleted file mode 100644 index e9d3ccc6c..000000000 --- a/docs/includes/apiargs-MongoDBClient-method-get-param.yaml +++ /dev/null @@ -1,6 +0,0 @@ -source: - file: apiargs-common-param.yaml - ref: $databaseName -replacement: - action: " to select" -... diff --git a/docs/includes/apiargs-MongoDBClient-method-listDatabases-option.yaml b/docs/includes/apiargs-MongoDBClient-method-listDatabases-option.yaml deleted file mode 100644 index 38baf93ad..000000000 --- a/docs/includes/apiargs-MongoDBClient-method-listDatabases-option.yaml +++ /dev/null @@ -1,47 +0,0 @@ -arg_name: option -name: authorizedDatabases -type: boolean -description: | - A flag that determines which databases are returned based on the user - privileges when access control is enabled. For more information, see the - `listDatabases command documentation `_. - - For servers < 4.0.5, this option is ignored. - - .. versionadded:: 1.7 -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-common-option.yaml - ref: comment -post: | - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -arg_name: option -name: filter -type: array|object -description: | - A query expression to filter the list of databases. - - You can specify a query expression for database fields (e.g. ``name``, - ``sizeOnDisk``, ``empty``). - - .. versionadded:: 1.3 -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-common-option.yaml - ref: maxTimeMS ---- -source: - file: apiargs-common-option.yaml - ref: session -post: | - .. versionadded:: 1.3 diff --git a/docs/includes/apiargs-MongoDBClient-method-listDatabases-param.yaml b/docs/includes/apiargs-MongoDBClient-method-listDatabases-param.yaml deleted file mode 100644 index 73ad04d0b..000000000 --- a/docs/includes/apiargs-MongoDBClient-method-listDatabases-param.yaml +++ /dev/null @@ -1,4 +0,0 @@ -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBClient-method-selectCollection-option.yaml b/docs/includes/apiargs-MongoDBClient-method-selectCollection-option.yaml deleted file mode 100644 index d81d31811..000000000 --- a/docs/includes/apiargs-MongoDBClient-method-selectCollection-option.yaml +++ /dev/null @@ -1,27 +0,0 @@ -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" -... diff --git a/docs/includes/apiargs-MongoDBClient-method-selectCollection-param.yaml b/docs/includes/apiargs-MongoDBClient-method-selectCollection-param.yaml deleted file mode 100644 index 99c764460..000000000 --- a/docs/includes/apiargs-MongoDBClient-method-selectCollection-param.yaml +++ /dev/null @@ -1,16 +0,0 @@ -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 -... diff --git a/docs/includes/apiargs-MongoDBClient-method-selectDatabase-option.yaml b/docs/includes/apiargs-MongoDBClient-method-selectDatabase-option.yaml deleted file mode 100644 index e4ffd3c66..000000000 --- a/docs/includes/apiargs-MongoDBClient-method-selectDatabase-option.yaml +++ /dev/null @@ -1,27 +0,0 @@ -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" -... diff --git a/docs/includes/apiargs-MongoDBClient-method-selectDatabase-param.yaml b/docs/includes/apiargs-MongoDBClient-method-selectDatabase-param.yaml deleted file mode 100644 index 8e5f9d45f..000000000 --- a/docs/includes/apiargs-MongoDBClient-method-selectDatabase-param.yaml +++ /dev/null @@ -1,10 +0,0 @@ -source: - file: apiargs-common-param.yaml - ref: $databaseName -replacement: - action: " to select" ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBClient-method-watch-option.yaml b/docs/includes/apiargs-MongoDBClient-method-watch-option.yaml deleted file mode 100644 index cad9c3f75..000000000 --- a/docs/includes/apiargs-MongoDBClient-method-watch-option.yaml +++ /dev/null @@ -1,71 +0,0 @@ ---- -source: - file: apiargs-method-watch-option.yaml - ref: batchSize ---- -source: - file: apiargs-common-option.yaml - ref: collation ---- -source: - file: apiargs-common-option.yaml - ref: comment -post: | - The comment can be any valid BSON type for server versions 4.4 and above. - Earlier server versions only support string values. - - .. versionadded:: 1.13 ---- -source: - file: apiargs-method-watch-option.yaml - ref: fullDocument ---- -source: - file: apiargs-method-watch-option.yaml - ref: fullDocumentBeforeChange -post: | - .. versionadded: 1.13 ---- -source: - file: apiargs-method-watch-option.yaml - ref: maxAwaitTimeMS ---- -source: - file: apiargs-MongoDBClient-common-option.yaml - ref: readConcern ---- -source: - file: apiargs-MongoDBClient-common-option.yaml - ref: readPreference -post: | - This is used for both the initial change stream aggregation and for - server selection during an automatic resume. ---- -source: - file: apiargs-method-watch-option.yaml - ref: resumeAfter ---- -source: - file: apiargs-common-option.yaml - ref: session ---- -source: - file: apiargs-method-watch-option.yaml - ref: showExpandedEvents -post: | - .. versionadded:: 1.13 ---- -source: - file: apiargs-method-watch-option.yaml - ref: startAfter -post: | - .. versionadded: 1.5 ---- -source: - file: apiargs-method-watch-option.yaml - ref: startAtOperationTime ---- -source: - file: apiargs-MongoDBClient-common-option.yaml - ref: typeMap -... diff --git a/docs/includes/apiargs-MongoDBClient-method-watch-param.yaml b/docs/includes/apiargs-MongoDBClient-method-watch-param.yaml deleted file mode 100644 index b00e450cf..000000000 --- a/docs/includes/apiargs-MongoDBClient-method-watch-param.yaml +++ /dev/null @@ -1,8 +0,0 @@ -source: - file: apiargs-method-watch-param.yaml - ref: $pipeline ---- -source: - file: apiargs-method-watch-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBCollection-common-option.yaml b/docs/includes/apiargs-MongoDBCollection-common-option.yaml deleted file mode 100644 index fb919ea42..000000000 --- a/docs/includes/apiargs-MongoDBCollection-common-option.yaml +++ /dev/null @@ -1,86 +0,0 @@ -arg_name: option -name: arrayFilters -type: array -description: | - An array of filter documents that determines which array elements to modify - for an update operation on an array field. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: bypassDocumentValidation -type: boolean -description: | - If ``true``, allows the write operation to circumvent document level - validation. Defaults to ``false``. -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-common-option.yaml - ref: collation -post: | - 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. ---- -arg_name: option -name: readConcern -type: :php:`MongoDB\\Driver\\ReadConcern ` -description: | - :manual:`Read concern ` to use for the operation. - Defaults to the collection's read concern. - - It is not possible to specify a :manual:`read concern - ` for individual operations as part of a - transaction. Instead, set the ``readConcern`` option when starting the - transaction with :php:`startTransaction `. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: readPreference -type: :php:`MongoDB\\Driver\\ReadPreference ` -description: | - :manual:`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 ` -description: | - :manual:`Write concern ` to use for the operation. - Defaults to the collection's write concern. - - It is not possible to specify a :manual:`write concern - ` for individual operations as part of a - transaction. Instead, set the ``writeConcern`` option when starting the - transaction with :php:`startTransaction `. -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 -... diff --git a/docs/includes/apiargs-MongoDBCollection-common-param.yaml b/docs/includes/apiargs-MongoDBCollection-common-param.yaml deleted file mode 100644 index 47100d19a..000000000 --- a/docs/includes/apiargs-MongoDBCollection-common-param.yaml +++ /dev/null @@ -1,33 +0,0 @@ -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 - `. Starting with MongoDB 4.2, an `aggregation - pipeline `_ - can be passed as this parameter. -interface: phpmethod -operation: ~ -optional: false -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-aggregate-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-aggregate-option.yaml deleted file mode 100644 index a299eefa1..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-aggregate-option.yaml +++ /dev/null @@ -1,72 +0,0 @@ -source: - file: apiargs-aggregate-option.yaml - ref: allowDiskUse ---- -source: - file: apiargs-aggregate-option.yaml - ref: batchSize ---- -source: - file: apiargs-aggregate-option.yaml - ref: bypassDocumentValidation ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: collation ---- -source: - file: apiargs-common-option.yaml - ref: comment -post: | - The comment can be any valid BSON type for server versions 4.4 and above. - Earlier server versions only support string values. - - .. versionadded:: 1.3 ---- -source: - file: apiargs-aggregate-option.yaml - ref: explain -post: | - .. versionadded:: 1.4 ---- -source: - file: apiargs-common-option.yaml - ref: hint -post: | - .. versionadded:: 1.3 ---- -source: - file: apiargs-common-option.yaml - ref: let -post: | - .. versionadded:: 1.9 ---- -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-common-option.yaml - ref: session -post: | - .. versionadded:: 1.3 ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: typeMap ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: writeConcern -post: | - This only applies when a :ref:`$out ` or :ref:`$merge ` - stage is specified. -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-aggregate-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-aggregate-param.yaml deleted file mode 100644 index cbad3b49b..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-aggregate-param.yaml +++ /dev/null @@ -1,14 +0,0 @@ -arg_name: param -name: $pipeline -type: array -description: | - Specifies an :manual:`aggregation pipeline ` - operation. -interface: phpmethod -operation: ~ -optional: false ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-bulkWrite-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-bulkWrite-option.yaml deleted file mode 100644 index 25d8e24d3..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-bulkWrite-option.yaml +++ /dev/null @@ -1,44 +0,0 @@ -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: bypassDocumentValidation ---- -source: - file: apiargs-common-option.yaml - ref: comment -post: | - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -source: - file: apiargs-common-option.yaml - ref: let -post: | - .. versionadded:: 1.13 ---- -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-common-option.yaml - ref: session -post: | - .. versionadded:: 1.3 ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: writeConcern -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-bulkWrite-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-bulkWrite-param.yaml deleted file mode 100644 index 79423a637..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-bulkWrite-param.yaml +++ /dev/null @@ -1,37 +0,0 @@ -arg_name: param -name: $operations -type: array -description: | - An array containing the write operations to perform. - :phpmethod:`MongoDB\\Collection::bulkWrite()` supports - :phpmethod:`deleteMany() `, - :phpmethod:`deleteOne() `, - :phpmethod:`insertOne() `, - :phpmethod:`replaceOne() `, - :phpmethod:`updateMany() `, and - :phpmethod:`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 -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-construct-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-construct-option.yaml deleted file mode 100644 index 7d422ca05..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-construct-option.yaml +++ /dev/null @@ -1,25 +0,0 @@ -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" -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-construct-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-construct-param.yaml deleted file mode 100644 index 0827800ba..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-construct-param.yaml +++ /dev/null @@ -1,16 +0,0 @@ -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 -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-count-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-count-option.yaml deleted file mode 100644 index 3d839e04a..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-count-option.yaml +++ /dev/null @@ -1,64 +0,0 @@ -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: collation ---- -source: - file: apiargs-common-option.yaml - ref: comment -post: | - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -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 ---- -source: - file: apiargs-common-option.yaml - ref: session -post: | - .. versionadded:: 1.3 ---- -arg_name: option -name: skip -type: integer -description: | - The number of matching documents to skip before returning results. -interface: phpmethod -operation: ~ -optional: true -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-count-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-count-param.yaml deleted file mode 100644 index e18c616bc..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-count-param.yaml +++ /dev/null @@ -1,11 +0,0 @@ -source: - file: apiargs-MongoDBCollection-common-param.yaml - ref: $filter -optional: true -replacement: - action: " to count" ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-countDocuments-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-countDocuments-option.yaml deleted file mode 100644 index da1f01138..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-countDocuments-option.yaml +++ /dev/null @@ -1,56 +0,0 @@ -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: collation ---- -source: - file: apiargs-common-option.yaml - ref: comment -post: | - The comment can be any valid BSON type for server versions 4.4 and above. - Earlier server versions only support string values. ---- -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. -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 ---- -source: - file: apiargs-common-option.yaml - ref: session ---- -arg_name: option -name: skip -type: integer -description: | - The number of matching documents to skip before returning results. -interface: phpmethod -operation: ~ -optional: true -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-countDocuments-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-countDocuments-param.yaml deleted file mode 100644 index e18c616bc..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-countDocuments-param.yaml +++ /dev/null @@ -1,11 +0,0 @@ -source: - file: apiargs-MongoDBCollection-common-param.yaml - ref: $filter -optional: true -replacement: - action: " to count" ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-createIndex-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-createIndex-option.yaml deleted file mode 100644 index 182837674..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-createIndex-option.yaml +++ /dev/null @@ -1,117 +0,0 @@ -arg_name: option -name: commitQuorum -type: string|integer -description: | - Specifies how many data-bearing members of a replica set, including the - primary, must complete the index builds successfully before the primary marks - the indexes as ready. - - This option accepts the same values for the ``w`` field in a write concern - plus ``"votingMembers"``, which indicates all voting data-bearing nodes. - - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.7 -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-common-option.yaml - ref: comment -post: | - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -arg_name: option -name: unique -type: boolean -description: | - Creates a :manual:`unique ` index. -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: collation -pre: | - Specifies the :manual:`collation - ` for the index. ---- -arg_name: option -name: partialFilterExpression -type: array|object -description: | - Creates a :manual:`partial ` index. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: sparse -type: boolean -description: | - Creates a :manual:`sparse ` index. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: expireAfterSeconds -type: integer -description: | - Creates a :manual:`TTL ` index. -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-common-option.yaml - ref: maxTimeMS -post: | - .. versionadded:: 1.3 ---- -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 - ` process. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: 2dsphereIndexVersion -type: integer -description: | - Overrides the server's default version for a :manual:`2dsphere - ` index. -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-common-option.yaml - ref: session -post: | - .. versionadded:: 1.3 ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: writeConcern -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-createIndex-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-createIndex-param.yaml deleted file mode 100644 index c2979d913..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-createIndex-param.yaml +++ /dev/null @@ -1,20 +0,0 @@ -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 -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-createIndexes-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-createIndexes-option.yaml deleted file mode 100644 index 54c33bfa0..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-createIndexes-option.yaml +++ /dev/null @@ -1,29 +0,0 @@ -source: - file: apiargs-common-option.yaml - ref: comment -post: | - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -source: - file: apiargs-MongoDBCollection-method-createIndex-option.yaml - ref: commitQuorum ---- -source: - file: apiargs-common-option.yaml - ref: maxTimeMS -post: | - .. versionadded:: 1.3 ---- -source: - file: apiargs-common-option.yaml - ref: session -post: | - .. versionadded:: 1.3 ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: writeConcern -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-createIndexes-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-createIndexes-param.yaml deleted file mode 100644 index e98d9aad0..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-createIndexes-param.yaml +++ /dev/null @@ -1,23 +0,0 @@ -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 -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-createSearchIndex-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-createSearchIndex-option.yaml deleted file mode 100644 index c6adffe8b..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-createSearchIndex-option.yaml +++ /dev/null @@ -1,17 +0,0 @@ -arg_name: option -name: name -type: string -description: | - Name of the search index to create. - - You cannot create multiple indexes with the same name on a single collection. - - If you do not specify a name, the index is named "default". -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-common-option.yaml - ref: comment -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-createSearchIndex-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-createSearchIndex-param.yaml deleted file mode 100644 index bec751360..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-createSearchIndex-param.yaml +++ /dev/null @@ -1,14 +0,0 @@ -arg_name: param -name: $definition -type: array|object -description: | - Document describing the index to create. For details on definition syntax, see - :manual:`Search Index Definition Syntax `. -interface: phpmethod -operation: ~ -optional: false ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-createSearchIndexes-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-createSearchIndexes-option.yaml deleted file mode 100644 index 7661d09e4..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-createSearchIndexes-option.yaml +++ /dev/null @@ -1,4 +0,0 @@ -source: - file: apiargs-common-option.yaml - ref: comment -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-createSearchIndexes-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-createSearchIndexes-param.yaml deleted file mode 100644 index 4003b24d2..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-createSearchIndexes-param.yaml +++ /dev/null @@ -1,21 +0,0 @@ -arg_name: param -name: $indexes -type: array -description: | - Array of documents describing the indexes to create. - - A required ``definition`` document field describes the index to create. For - details on definition syntax, see - :manual:`Search Index Definition Syntax `. - - An optional ``name`` string field specifies the name of the search index to - create. You cannot create multiple indexes with the same name on a single - collection. If you do not specify a name, the index is named "default". -interface: phpmethod -operation: ~ -optional: false ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-deleteMany-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-deleteMany-option.yaml deleted file mode 100644 index 110911f51..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-deleteMany-option.yaml +++ /dev/null @@ -1,38 +0,0 @@ -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: collation ---- -source: - file: apiargs-common-option.yaml - ref: comment -post: | - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -source: - file: apiargs-common-option.yaml - ref: hint -post: | - This option is available in MongoDB 4.4+ and will result in an exception at - execution time if specified for an older server version. - - .. versionadded:: 1.7 ---- -source: - file: apiargs-common-option.yaml - ref: let -post: | - .. versionadded:: 1.13 ---- -source: - file: apiargs-common-option.yaml - ref: session -post: | - .. versionadded:: 1.3 ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: writeConcern -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-deleteMany-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-deleteMany-param.yaml deleted file mode 100644 index 92797eb53..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-deleteMany-param.yaml +++ /dev/null @@ -1,11 +0,0 @@ -source: - file: apiargs-MongoDBCollection-common-param.yaml - ref: $filter -optional: false -replacement: - action: " to delete" ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-deleteOne-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-deleteOne-option.yaml deleted file mode 100644 index 110911f51..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-deleteOne-option.yaml +++ /dev/null @@ -1,38 +0,0 @@ -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: collation ---- -source: - file: apiargs-common-option.yaml - ref: comment -post: | - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -source: - file: apiargs-common-option.yaml - ref: hint -post: | - This option is available in MongoDB 4.4+ and will result in an exception at - execution time if specified for an older server version. - - .. versionadded:: 1.7 ---- -source: - file: apiargs-common-option.yaml - ref: let -post: | - .. versionadded:: 1.13 ---- -source: - file: apiargs-common-option.yaml - ref: session -post: | - .. versionadded:: 1.3 ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: writeConcern -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-deleteOne-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-deleteOne-param.yaml deleted file mode 100644 index 92797eb53..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-deleteOne-param.yaml +++ /dev/null @@ -1,11 +0,0 @@ -source: - file: apiargs-MongoDBCollection-common-param.yaml - ref: $filter -optional: false -replacement: - action: " to delete" ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-distinct-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-distinct-option.yaml deleted file mode 100644 index 05a1b2853..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-distinct-option.yaml +++ /dev/null @@ -1,37 +0,0 @@ -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: collation ---- -source: - file: apiargs-common-option.yaml - ref: comment -post: | - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -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-common-option.yaml - ref: session -post: | - .. versionadded:: 1.3 ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: typeMap -post: | - .. versionadded:: 1.5 -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-distinct-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-distinct-param.yaml deleted file mode 100644 index 37cd9b50b..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-distinct-param.yaml +++ /dev/null @@ -1,20 +0,0 @@ -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 -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-drop-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-drop-option.yaml deleted file mode 100644 index 5eb5efaba..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-drop-option.yaml +++ /dev/null @@ -1,31 +0,0 @@ -source: - file: apiargs-common-option.yaml - ref: comment -post: | - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -source: - file: apiargs-dropCollection-option.yaml - ref: encryptedFields -post: | - .. versionadded:: 1.13 ---- -source: - file: apiargs-common-option.yaml - ref: session -post: | - .. versionadded:: 1.3 ---- -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 -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-drop-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-drop-param.yaml deleted file mode 100644 index 73ad04d0b..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-drop-param.yaml +++ /dev/null @@ -1,4 +0,0 @@ -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-dropIndex-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-dropIndex-option.yaml deleted file mode 100644 index b87e09b74..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-dropIndex-option.yaml +++ /dev/null @@ -1,31 +0,0 @@ -source: - file: apiargs-common-option.yaml - ref: comment -post: | - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -source: - file: apiargs-common-option.yaml - ref: maxTimeMS -post: | - .. versionadded:: 1.3 ---- -source: - file: apiargs-common-option.yaml - ref: session -post: | - .. versionadded:: 1.3 ---- -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 -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-dropIndex-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-dropIndex-param.yaml deleted file mode 100644 index 7cac6d1de..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-dropIndex-param.yaml +++ /dev/null @@ -1,15 +0,0 @@ -arg_name: param -name: $indexName -type: string| :phpclass:`MongoDB\\Model\\IndexInfo` -description: | - The name or model object of the index to drop. View the existing indexes on - the collection using the :phpmethod:`listIndexes() - ` method. -interface: phpmethod -operation: ~ -optional: false ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-dropIndexes-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-dropIndexes-option.yaml deleted file mode 100644 index aff9f4d75..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-dropIndexes-option.yaml +++ /dev/null @@ -1,29 +0,0 @@ -source: - file: apiargs-common-option.yaml - ref: comment -post: | - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -source: - file: apiargs-common-option.yaml - ref: maxTimeMS ---- -source: - file: apiargs-common-option.yaml - ref: session -post: | - .. versionadded:: 1.3 ---- -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 -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-dropIndexes-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-dropIndexes-param.yaml deleted file mode 100644 index 73ad04d0b..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-dropIndexes-param.yaml +++ /dev/null @@ -1,4 +0,0 @@ -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-dropSearchIndex-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-dropSearchIndex-option.yaml deleted file mode 100644 index 7661d09e4..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-dropSearchIndex-option.yaml +++ /dev/null @@ -1,4 +0,0 @@ -source: - file: apiargs-common-option.yaml - ref: comment -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-dropSearchIndex-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-dropSearchIndex-param.yaml deleted file mode 100644 index 9a57fc987..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-dropSearchIndex-param.yaml +++ /dev/null @@ -1,13 +0,0 @@ -arg_name: param -name: $name -type: string -description: | - Name of the index to drop. -interface: phpmethod -operation: ~ -optional: false ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-estimateDocumentCount-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-estimateDocumentCount-option.yaml deleted file mode 100644 index 7289296e9..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-estimateDocumentCount-option.yaml +++ /dev/null @@ -1,25 +0,0 @@ -source: - file: apiargs-common-option.yaml - ref: comment -post: | - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -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-common-option.yaml - ref: session -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-estimateDocumentCount-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-estimateDocumentCount-param.yaml deleted file mode 100644 index 73ad04d0b..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-estimateDocumentCount-param.yaml +++ /dev/null @@ -1,4 +0,0 @@ -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-explain-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-explain-option.yaml deleted file mode 100644 index 650633bce..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-explain-option.yaml +++ /dev/null @@ -1,31 +0,0 @@ -source: - file: apiargs-common-option.yaml - ref: comment -post: | - Defaults to the ``comment`` of the explained operation (if any). - - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -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 command result document. ---- -arg_name: option -name: verbosity -type: string -description: | - The verbosity level at which to run the command. See the :manual:`explain - ` command for more information. -interface: phpmethod -operation: ~ -optional: true -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-explain-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-explain-param.yaml deleted file mode 100644 index 59f156376..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-explain-param.yaml +++ /dev/null @@ -1,13 +0,0 @@ -arg_name: param -name: $explainable -type: :phpclass:`MongoDB\\Operation\\Explainable` -description: | - The command to explain. -interface: phpmethod -operation: ~ -optional: false ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-find-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-find-option.yaml deleted file mode 100644 index 1b01599ec..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-find-option.yaml +++ /dev/null @@ -1,263 +0,0 @@ -arg_name: option -name: projection -type: array|object -description: | - The :ref:`projection specification ` to determine which fields to - include in the returned documents. See :manual:`Project Fields to Return from - Query ` and - :manual:`Projection Operators ` 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: allowDiskUse -type: boolean -description: | - Enables writing to temporary files. When set to ``true``, queries can write - data to the ``_tmp`` sub-directory in the ``dbPath`` directory. -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 ---- -source: - file: apiargs-common-option.yaml - ref: comment -post: | - The comment can be any valid BSON type for server versions 4.4 and above. - Earlier server versions only support string values. ---- -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 ---- -source: - file: apiargs-common-option.yaml - ref: hint -post: | - .. versionadded:: 1.2 ---- -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 ---- -source: - file: apiargs-common-option.yaml - ref: session -post: | - .. versionadded:: 1.3 ---- -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. - - .. deprecated:: 1.4 - .. 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: } } - - The :php:`MongoDB\\BSON\\Timestamp ` class - reference describes how to represent MongoDB's BSON timestamp type with PHP. - - .. deprecated:: 1.7 -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. - - .. deprecated:: 1.4 - .. 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 ` 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 ---- -source: - file: apiargs-common-option.yaml - ref: let -post: | - .. versionadded:: 1.13 -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-find-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-find-param.yaml deleted file mode 100644 index 5683a7bba..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-find-param.yaml +++ /dev/null @@ -1,11 +0,0 @@ -source: - file: apiargs-MongoDBCollection-common-param.yaml - ref: $filter -optional: true -replacement: - action: " to query" ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-findOne-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-findOne-option.yaml deleted file mode 100644 index 139e700ac..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-findOne-option.yaml +++ /dev/null @@ -1,84 +0,0 @@ -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-method-find-option.yaml - ref: allowDiskUse ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: collation ---- -source: - file: apiargs-MongoDBCollection-method-find-option.yaml - ref: comment ---- -source: - file: apiargs-common-option.yaml - ref: hint -post: | - .. versionadded:: 1.2 ---- -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-common-option.yaml - ref: session -post: | - .. versionadded:: 1.3 ---- -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 ---- -source: - file: apiargs-common-option.yaml - ref: let -post: | - .. versionadded:: 1.13 -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-findOne-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-findOne-param.yaml deleted file mode 100644 index 5683a7bba..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-findOne-param.yaml +++ /dev/null @@ -1,11 +0,0 @@ -source: - file: apiargs-MongoDBCollection-common-param.yaml - ref: $filter -optional: true -replacement: - action: " to query" ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-findOneAndDelete-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-findOneAndDelete-option.yaml deleted file mode 100644 index d8f2b3a4a..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-findOneAndDelete-option.yaml +++ /dev/null @@ -1,56 +0,0 @@ -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: comment -post: | - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -source: - file: apiargs-common-option.yaml - ref: hint -post: | - This option is available in MongoDB 4.4+ and will result in an exception at - execution time if specified for an older server version. - - .. versionadded:: 1.7 ---- -source: - file: apiargs-common-option.yaml - ref: let -post: | - .. versionadded:: 1.13 ---- -source: - file: apiargs-common-option.yaml - ref: maxTimeMS ---- -source: - file: apiargs-common-option.yaml - ref: session -post: | - .. versionadded:: 1.3 ---- -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 -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-findOneAndDelete-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-findOneAndDelete-param.yaml deleted file mode 100644 index 92797eb53..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-findOneAndDelete-param.yaml +++ /dev/null @@ -1,11 +0,0 @@ -source: - file: apiargs-MongoDBCollection-common-param.yaml - ref: $filter -optional: false -replacement: - action: " to delete" ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-findOneAndReplace-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-findOneAndReplace-option.yaml deleted file mode 100644 index b509ac947..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-findOneAndReplace-option.yaml +++ /dev/null @@ -1,77 +0,0 @@ -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: comment -post: | - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -source: - file: apiargs-common-option.yaml - ref: hint -post: | - This option is available in MongoDB 4.4+ and will result in an exception at - execution time if specified for an older server version. - - .. versionadded:: 1.7 ---- -source: - file: apiargs-common-option.yaml - ref: maxTimeMS ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: bypassDocumentValidation ---- -source: - file: apiargs-common-option.yaml - ref: let -post: | - .. versionadded:: 1.13 ---- -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-common-option.yaml - ref: session -post: | - .. versionadded:: 1.3 ---- -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 -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-findOneAndReplace-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-findOneAndReplace-param.yaml deleted file mode 100644 index 32ed6b35f..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-findOneAndReplace-param.yaml +++ /dev/null @@ -1,15 +0,0 @@ -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 -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-findOneAndUpdate-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-findOneAndUpdate-option.yaml deleted file mode 100644 index a8f895f1b..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-findOneAndUpdate-option.yaml +++ /dev/null @@ -1,83 +0,0 @@ -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: arrayFilters -post: | - .. versionadded:: 1.3 ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: collation ---- -source: - file: apiargs-common-option.yaml - ref: comment -post: | - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -source: - file: apiargs-common-option.yaml - ref: hint -post: | - This option is available in MongoDB 4.4+ and will result in an exception at - execution time if specified for an older server version. - - .. versionadded:: 1.7 ---- -source: - file: apiargs-common-option.yaml - ref: maxTimeMS ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: bypassDocumentValidation ---- -source: - file: apiargs-common-option.yaml - ref: let -post: | - .. versionadded:: 1.13 ---- -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-common-option.yaml - ref: session -post: | - .. versionadded:: 1.3 ---- -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 -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-findOneAndUpdate-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-findOneAndUpdate-param.yaml deleted file mode 100644 index a335678a3..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-findOneAndUpdate-param.yaml +++ /dev/null @@ -1,15 +0,0 @@ -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 -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-insertMany-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-insertMany-option.yaml deleted file mode 100644 index 60f197d2b..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-insertMany-option.yaml +++ /dev/null @@ -1,27 +0,0 @@ -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: bypassDocumentValidation ---- -source: - file: apiargs-common-option.yaml - ref: comment -post: | - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -source: - file: apiargs-MongoDBCollection-method-bulkWrite-option.yaml - ref: ordered ---- -source: - file: apiargs-common-option.yaml - ref: session -post: | - .. versionadded:: 1.3 ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: writeConcern -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-insertMany-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-insertMany-param.yaml deleted file mode 100644 index 78246d30d..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-insertMany-param.yaml +++ /dev/null @@ -1,13 +0,0 @@ -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 -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-insertOne-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-insertOne-option.yaml deleted file mode 100644 index adf17cb61..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-insertOne-option.yaml +++ /dev/null @@ -1,23 +0,0 @@ -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: bypassDocumentValidation ---- -source: - file: apiargs-common-option.yaml - ref: comment -post: | - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -source: - file: apiargs-common-option.yaml - ref: session -post: | - .. versionadded:: 1.3 ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: writeConcern -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-insertOne-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-insertOne-param.yaml deleted file mode 100644 index 5dc231d30..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-insertOne-param.yaml +++ /dev/null @@ -1,13 +0,0 @@ -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 -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-listIndexes-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-listIndexes-option.yaml deleted file mode 100644 index aa939b950..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-listIndexes-option.yaml +++ /dev/null @@ -1,19 +0,0 @@ -source: - file: apiargs-common-option.yaml - ref: comment -post: | - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -source: - file: apiargs-common-option.yaml - ref: maxTimeMS ---- -source: - file: apiargs-common-option.yaml - ref: session -post: | - .. versionadded:: 1.3 -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-listIndexes-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-listIndexes-param.yaml deleted file mode 100644 index 73ad04d0b..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-listIndexes-param.yaml +++ /dev/null @@ -1,4 +0,0 @@ -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-listSearchIndexes-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-listSearchIndexes-option.yaml deleted file mode 100644 index 910024ee7..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-listSearchIndexes-option.yaml +++ /dev/null @@ -1,44 +0,0 @@ -source: - file: apiargs-aggregate-option.yaml - ref: batchSize ---- -source: - file: apiargs-common-option.yaml - ref: collation ---- -source: - file: apiargs-common-option.yaml - ref: comment ---- -arg_name: option -name: name -type: string -description: | - Name of the index to return information about. - - If name is not specified, information for all indexes on the collection will - be returned. -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 ---- -source: - file: apiargs-common-option.yaml - ref: session ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: typeMap -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-listSearchIndexes-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-listSearchIndexes-param.yaml deleted file mode 100644 index 73ad04d0b..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-listSearchIndexes-param.yaml +++ /dev/null @@ -1,4 +0,0 @@ -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-mapReduce-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-mapReduce-option.yaml deleted file mode 100644 index 478d12dda..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-mapReduce-option.yaml +++ /dev/null @@ -1,113 +0,0 @@ -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: bypassDocumentValidation -post: | - This only applies when results are output to a collection. ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: collation ---- -source: - file: apiargs-common-option.yaml - ref: comment -post: | - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -arg_name: option -name: finalize -type: :php:`MongoDB\\BSON\\Javascript ` -description: | - Follows the reduce method and modifies the output. - - .. note:: - - Passing a Javascript instance with a scope is deprecated. Put all scope - variables in the ``scope`` option of the MapReduce operation. -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. -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: array|object -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 -post: | - This option will be ignored when results are output to a collection. ---- -arg_name: option -name: scope -type: array|object -description: | - Specifies global variables that are accessible in the map, reduce, and finalize - functions. -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-common-option.yaml - ref: session -post: | - .. versionadded:: 1.3 ---- -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. -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: writeConcern -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-mapReduce-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-mapReduce-param.yaml deleted file mode 100644 index 6a76d6365..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-mapReduce-param.yaml +++ /dev/null @@ -1,46 +0,0 @@ -arg_name: param -name: $map -type: :php:`MongoDB\\BSON\\Javascript ` -description: | - A JavaScript function that associates or "maps" a value with a key and emits - the key and value pair. - - .. note:: - - Passing a Javascript instance with a scope is deprecated. Put all scope - variables in the ``scope`` option of the MapReduce operation. -interface: phpmethod -operation: ~ -optional: false ---- -arg_name: param -name: $reduce -type: :php:`MongoDB\\BSON\\Javascript ` -description: | - A JavaScript function that "reduces" to a single object all the values - associated with a particular key. - - .. note:: - - Passing a Javascript instance with a scope is deprecated. Put all scope - variables in the ``scope`` option of the MapReduce operation. -interface: phpmethod -operation: ~ -optional: false ---- -arg_name: param -name: $out -type: string|array|object -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 -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-rename-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-rename-option.yaml deleted file mode 100644 index 0b0b0809c..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-rename-option.yaml +++ /dev/null @@ -1,33 +0,0 @@ -source: - file: apiargs-common-option.yaml - ref: comment -post: | - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 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-common-option.yaml - ref: session ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: writeConcern ---- -arg_name: option -name: dropTarget -type: boolean -description: | - If ``true``, MongoDB will drop the target before renaming the collection. The - default value is ``false``. -interface: phpmethod -operation: ~ -optional: true -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-rename-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-rename-param.yaml deleted file mode 100644 index 459b2789d..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-rename-param.yaml +++ /dev/null @@ -1,25 +0,0 @@ -arg_name: param -name: $toCollectionName -type: string -description: | - The new name of the collection. -interface: phpmethod -operation: ~ -optional: false ---- -arg_name: param -name: $toDatabaseName -type: string -description: | - The new database name of the collection. If a new database name is not - specified, the database of the original collection will be used. If the new - name specifies a different database, the command copies the collection - to the new database and drops the source collection. -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-replaceOne-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-replaceOne-option.yaml deleted file mode 100644 index 676296d26..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-replaceOne-option.yaml +++ /dev/null @@ -1,46 +0,0 @@ -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-common-option.yaml - ref: comment -post: | - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -source: - file: apiargs-common-option.yaml - ref: hint -post: | - This option is available in MongoDB 4.2+ and will result in an exception at - execution time if specified for an older server version. - - .. versionadded:: 1.6 ---- -source: - file: apiargs-common-option.yaml - ref: let -post: | - .. versionadded:: 1.13 ---- -source: - file: apiargs-common-option.yaml - ref: session -post: | - .. versionadded:: 1.3 ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: writeConcern -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-replaceOne-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-replaceOne-param.yaml deleted file mode 100644 index 32ed6b35f..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-replaceOne-param.yaml +++ /dev/null @@ -1,15 +0,0 @@ -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 -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-updateMany-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-updateMany-option.yaml deleted file mode 100644 index 64eec34e0..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-updateMany-option.yaml +++ /dev/null @@ -1,52 +0,0 @@ -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: upsert ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: arrayFilters -post: | - .. versionadded:: 1.3 ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: bypassDocumentValidation ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: collation ---- -source: - file: apiargs-common-option.yaml - ref: comment -post: | - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -source: - file: apiargs-common-option.yaml - ref: hint -post: | - This option is available in MongoDB 4.2+ and will result in an exception at - execution time if specified for an older server version. - - .. versionadded:: 1.6 ---- -source: - file: apiargs-common-option.yaml - ref: let -post: | - .. versionadded:: 1.13 ---- -source: - file: apiargs-common-option.yaml - ref: session -post: | - .. versionadded:: 1.3 ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: writeConcern -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-updateMany-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-updateMany-param.yaml deleted file mode 100644 index a335678a3..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-updateMany-param.yaml +++ /dev/null @@ -1,15 +0,0 @@ -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 -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-updateOne-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-updateOne-option.yaml deleted file mode 100644 index 64eec34e0..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-updateOne-option.yaml +++ /dev/null @@ -1,52 +0,0 @@ -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: upsert ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: arrayFilters -post: | - .. versionadded:: 1.3 ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: bypassDocumentValidation ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: collation ---- -source: - file: apiargs-common-option.yaml - ref: comment -post: | - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -source: - file: apiargs-common-option.yaml - ref: hint -post: | - This option is available in MongoDB 4.2+ and will result in an exception at - execution time if specified for an older server version. - - .. versionadded:: 1.6 ---- -source: - file: apiargs-common-option.yaml - ref: let -post: | - .. versionadded:: 1.13 ---- -source: - file: apiargs-common-option.yaml - ref: session -post: | - .. versionadded:: 1.3 ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: writeConcern -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-updateOne-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-updateOne-param.yaml deleted file mode 100644 index a335678a3..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-updateOne-param.yaml +++ /dev/null @@ -1,15 +0,0 @@ -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 -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-updateSearchIndex-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-updateSearchIndex-option.yaml deleted file mode 100644 index 7661d09e4..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-updateSearchIndex-option.yaml +++ /dev/null @@ -1,4 +0,0 @@ -source: - file: apiargs-common-option.yaml - ref: comment -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-updateSearchIndex-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-updateSearchIndex-param.yaml deleted file mode 100644 index f5893878c..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-updateSearchIndex-param.yaml +++ /dev/null @@ -1,25 +0,0 @@ -arg_name: param -name: $name -type: string -description: | - Name of the index to update. -interface: phpmethod -operation: ~ -optional: false ---- -arg_name: param -name: $definition -type: array|object -description: | - Document describing the updated search index definition. The specified - definition replaces the prior definition in the search index. For details on - definition syntax, see - :manual:`Search Index Definition Syntax `. -interface: phpmethod -operation: ~ -optional: false ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-watch-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-watch-option.yaml deleted file mode 100644 index 2b8ac8e4c..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-watch-option.yaml +++ /dev/null @@ -1,73 +0,0 @@ ---- -source: - file: apiargs-method-watch-option.yaml - ref: batchSize ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: collation ---- -source: - file: apiargs-common-option.yaml - ref: comment -post: | - The comment can be any valid BSON type for server versions 4.4 and above. - Earlier server versions only support string values. - - .. versionadded:: 1.13 ---- -source: - file: apiargs-method-watch-option.yaml - ref: fullDocument ---- -source: - file: apiargs-method-watch-option.yaml - ref: fullDocumentBeforeChange -post: | - .. versionadded: 1.13 ---- -source: - file: apiargs-method-watch-option.yaml - ref: maxAwaitTimeMS ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: readConcern ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: readPreference -post: | - This is used for both the initial change stream aggregation and for - server selection during an automatic resume. ---- -source: - file: apiargs-method-watch-option.yaml - ref: resumeAfter ---- -source: - file: apiargs-common-option.yaml - ref: session ---- -source: - file: apiargs-method-watch-option.yaml - ref: showExpandedEvents -post: | - .. versionadded:: 1.13 ---- -source: - file: apiargs-method-watch-option.yaml - ref: startAfter -post: | - .. versionadded: 1.5 ---- -source: - file: apiargs-method-watch-option.yaml - ref: startAtOperationTime -post: | - .. versionadded:: 1.4 ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: typeMap -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-watch-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-watch-param.yaml deleted file mode 100644 index b00e450cf..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-watch-param.yaml +++ /dev/null @@ -1,8 +0,0 @@ -source: - file: apiargs-method-watch-param.yaml - ref: $pipeline ---- -source: - file: apiargs-method-watch-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-withOptions-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-withOptions-option.yaml deleted file mode 100644 index 681144f3a..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-withOptions-option.yaml +++ /dev/null @@ -1,27 +0,0 @@ -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" -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-withOptions-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-withOptions-param.yaml deleted file mode 100644 index 73ad04d0b..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-withOptions-param.yaml +++ /dev/null @@ -1,4 +0,0 @@ -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBDatabase-common-option.yaml b/docs/includes/apiargs-MongoDBDatabase-common-option.yaml deleted file mode 100644 index b03dac7a7..000000000 --- a/docs/includes/apiargs-MongoDBDatabase-common-option.yaml +++ /dev/null @@ -1,36 +0,0 @@ -arg_name: option -name: readConcern -type: :php:`MongoDB\\Driver\\ReadConcern ` -description: | - :manual:`Read concern ` to use for the operation. - Defaults to the database's read concern. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: readPreference -type: :php:`MongoDB\\Driver\\ReadPreference ` -description: | - :manual:`Read preference ` to use for the - operation. Defaults to the database's read preference. -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-common-option.yaml - ref: typeMap -replacement: - parent: "database" ---- -arg_name: option -name: writeConcern -type: :php:`MongoDB\\Driver\\WriteConcern ` -description: | - :manual:`Write concern ` to use for the operation. - Defaults to the database's write concern. -interface: phpmethod -operation: ~ -optional: true -... diff --git a/docs/includes/apiargs-MongoDBDatabase-method-aggregate-option.yaml b/docs/includes/apiargs-MongoDBDatabase-method-aggregate-option.yaml deleted file mode 100644 index 93bccd2f3..000000000 --- a/docs/includes/apiargs-MongoDBDatabase-method-aggregate-option.yaml +++ /dev/null @@ -1,64 +0,0 @@ -source: - file: apiargs-aggregate-option.yaml - ref: allowDiskUse ---- -source: - file: apiargs-aggregate-option.yaml - ref: batchSize ---- -source: - file: apiargs-aggregate-option.yaml - ref: bypassDocumentValidation ---- -source: - file: apiargs-common-option.yaml - ref: collation ---- -source: - file: apiargs-common-option.yaml - ref: comment -post: | - The comment can be any valid BSON type for server versions 4.4 and above. - Earlier server versions only support string values. ---- -source: - file: apiargs-aggregate-option.yaml - ref: explain ---- -source: - file: apiargs-common-option.yaml - ref: hint ---- -source: - file: apiargs-common-option.yaml - ref: let -post: | - .. versionadded:: 1.9 ---- -source: - file: apiargs-common-option.yaml - ref: maxTimeMS ---- -source: - file: apiargs-MongoDBDatabase-common-option.yaml - ref: readConcern ---- -source: - file: apiargs-MongoDBDatabase-common-option.yaml - ref: readPreference ---- -source: - file: apiargs-common-option.yaml - ref: session ---- -source: - file: apiargs-MongoDBDatabase-common-option.yaml - ref: typeMap ---- -source: - file: apiargs-MongoDBDatabase-common-option.yaml - ref: writeConcern -post: | - This only applies when a :ref:`$out ` or :ref:`$merge ` - stage is specified. -... diff --git a/docs/includes/apiargs-MongoDBDatabase-method-aggregate-param.yaml b/docs/includes/apiargs-MongoDBDatabase-method-aggregate-param.yaml deleted file mode 100644 index cbad3b49b..000000000 --- a/docs/includes/apiargs-MongoDBDatabase-method-aggregate-param.yaml +++ /dev/null @@ -1,14 +0,0 @@ -arg_name: param -name: $pipeline -type: array -description: | - Specifies an :manual:`aggregation pipeline ` - operation. -interface: phpmethod -operation: ~ -optional: false ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBDatabase-method-command-option.yaml b/docs/includes/apiargs-MongoDBDatabase-method-command-option.yaml deleted file mode 100644 index 934e325db..000000000 --- a/docs/includes/apiargs-MongoDBDatabase-method-command-option.yaml +++ /dev/null @@ -1,17 +0,0 @@ -source: - file: apiargs-common-option.yaml - ref: readPreference -description: | - :manual:`Read preference ` to use for the - operation. Defaults to the database's read preference. ---- -source: - file: apiargs-common-option.yaml - ref: session -post: | - .. versionadded:: 1.3 ---- -source: - file: apiargs-MongoDBDatabase-common-option.yaml - ref: typeMap -... diff --git a/docs/includes/apiargs-MongoDBDatabase-method-command-param.yaml b/docs/includes/apiargs-MongoDBDatabase-method-command-param.yaml deleted file mode 100644 index 5a4b03d7b..000000000 --- a/docs/includes/apiargs-MongoDBDatabase-method-command-param.yaml +++ /dev/null @@ -1,13 +0,0 @@ -arg_name: param -name: $command -type: array|object -description: | - The :manual:`database command ` document. -interface: phpmethod -operation: ~ -optional: false ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBDatabase-method-construct-option.yaml b/docs/includes/apiargs-MongoDBDatabase-method-construct-option.yaml deleted file mode 100644 index d398069a8..000000000 --- a/docs/includes/apiargs-MongoDBDatabase-method-construct-option.yaml +++ /dev/null @@ -1,25 +0,0 @@ -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" -... diff --git a/docs/includes/apiargs-MongoDBDatabase-method-construct-param.yaml b/docs/includes/apiargs-MongoDBDatabase-method-construct-param.yaml deleted file mode 100644 index 5ef826c17..000000000 --- a/docs/includes/apiargs-MongoDBDatabase-method-construct-param.yaml +++ /dev/null @@ -1,12 +0,0 @@ -source: - file: apiargs-common-param.yaml - ref: $manager ---- -source: - file: apiargs-common-param.yaml - ref: $databaseName ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBDatabase-method-createCollection-option.yaml b/docs/includes/apiargs-MongoDBDatabase-method-createCollection-option.yaml deleted file mode 100644 index ceb7dd075..000000000 --- a/docs/includes/apiargs-MongoDBDatabase-method-createCollection-option.yaml +++ /dev/null @@ -1,363 +0,0 @@ -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:: 1.4 - This option has been deprecated since MongoDB 3.2. As of MongoDB 4.0, this - option cannot be ``false`` when creating a replicated collection (i.e. a - collection outside of the ``local`` database in any mongod mode). -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 ---- -arg_name: option -name: changeStreamPreAndPostImages -type: document -description: | - Used to configure support for pre- and post-images in change streams. See the - :manual:`create ` command documentation for more - information. - - This option is available in MongoDB 6.0+ and will result in an exception at - execution time if specified for an older server version. - - .. versionadded:: 1.13 -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: clusteredIndex -type: document -description: | - A clustered index specification. See - :manual:`Clustered Collections ` or the - :manual:`create ` command documentation for more - information. - - This option is available in MongoDB 5.3+ and will result in an exception at - execution time if specified for an older server version. - - .. versionadded:: 1.13 -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-common-option.yaml - ref: collation -pre: | - Specifies the :manual:`collation - ` for the collection. ---- -source: - file: apiargs-common-option.yaml - ref: comment -post: | - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -arg_name: option -name: encryptedFields -type: document -description: | - A document describing encrypted fields for queryable encryption. If omitted, - the ``encryptedFieldsMap`` option within the ``autoEncryption`` driver option - will be consulted. See - `Field Encryption and Queryability `_ - in the MongoDB manual for more information. - - This option is available in MongoDB 7.0+ and will result in an exception at - execution time if specified for an older server version. - - .. versionadded:: 1.13 -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: expireAfterSeconds -type: integer -description: | - Used to automatically delete documents in time series collections. See the - :manual:`create ` command documentation for more - information. - - This option is available in MongoDB 5.0+ and will result in an exception at - execution time if specified for an older server version. - - .. versionadded:: 1.9 -interface: phpmethod -operation: ~ -optional: true ---- -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 ` 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 ` and - :manual:`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: - - .. code-block:: none - - { : } - - 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: pipeline -type: array -description: | - An array that consists of the aggregation pipeline stage(s), which will be - applied to the collection or view specified by ``viewOn``. See the - :manual:`create ` command documentation for more - information. - - .. versionadded:: 1.13 -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-common-option.yaml - ref: session -post: | - .. versionadded:: 1.3 ---- -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: - - .. code-block:: none - - { : } - - 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 ---- -arg_name: option -name: timeseries -type: array|object -description: | - An object containing options for creating time series collections. See the - :manual:`create ` command documentation for - supported options. - - This option is available in MongoDB 5.0+ and will result in an exception at - execution time if specified for an older server version. - - .. versionadded:: 1.9 -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|object -description: | - Allows users to specify :manual:`validation rules or expressions - ` for the collection. For more information, see - :manual:`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 ` 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 ---- -arg_name: option -name: viewOn -type: string -description: | - The name of the source collection or view from which to create the view. - - .. note:: - - The name is not the full namespace of the collection or view (i.e. it does - not include the database name). Views must be created in the same databases - as the source collection or view. - - .. versionadded:: 1.13 -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-MongoDBDatabase-common-option.yaml - ref: writeConcern -... diff --git a/docs/includes/apiargs-MongoDBDatabase-method-createCollection-param.yaml b/docs/includes/apiargs-MongoDBDatabase-method-createCollection-param.yaml deleted file mode 100644 index b6bb2dccd..000000000 --- a/docs/includes/apiargs-MongoDBDatabase-method-createCollection-param.yaml +++ /dev/null @@ -1,10 +0,0 @@ -source: - file: apiargs-common-param.yaml - ref: $collectionName -replacement: - action: " to create" ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBDatabase-method-createEncryptedCollection-param.yaml b/docs/includes/apiargs-MongoDBDatabase-method-createEncryptedCollection-param.yaml deleted file mode 100644 index 6d56d6785..000000000 --- a/docs/includes/apiargs-MongoDBDatabase-method-createEncryptedCollection-param.yaml +++ /dev/null @@ -1,47 +0,0 @@ -source: - file: apiargs-common-param.yaml - ref: $collectionName -replacement: - subject: "encrypted collection" - action: " to create" ---- -arg_name: param -name: $clientEncryption -type: :php:`MongoDB\\Driver\\ClientEncryption ` -description: | - The ClientEncryption object used to create data keys. -interface: phpmethod -operation: ~ -optional: false ---- -arg_name: param -name: $kmsProvider -type: string -description: | - KMS provider (e.g. "local", "aws") that will be used to encrypt new data keys. - This corresponds to the ``$kmsProvider`` parameter for - :php:`MongoDB\\Driver\\ClientEncryption::createDataKey() `. -interface: phpmethod -operation: ~ -optional: false ---- -arg_name: param -name: $masterKey -type: array|null -description: | - KMS-specific key options that will be used to encrypt new data keys. This - corresponds to the ``masterKey`` option for - :php:`MongoDB\\Driver\\ClientEncryption::createDataKey() `. - - If ``$kmsProvider`` is "local", this should be ``null``. -interface: phpmethod -operation: ~ -optional: false ---- -source: - file: apiargs-common-param.yaml - ref: $options -optional: false -post: | - The ``encryptedFields`` option is required. -... diff --git a/docs/includes/apiargs-MongoDBDatabase-method-drop-option.yaml b/docs/includes/apiargs-MongoDBDatabase-method-drop-option.yaml deleted file mode 100644 index e725fc1be..000000000 --- a/docs/includes/apiargs-MongoDBDatabase-method-drop-option.yaml +++ /dev/null @@ -1,25 +0,0 @@ -source: - file: apiargs-common-option.yaml - ref: comment -post: | - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -source: - file: apiargs-common-option.yaml - ref: session -post: | - .. versionadded:: 1.3 ---- -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 -... diff --git a/docs/includes/apiargs-MongoDBDatabase-method-drop-param.yaml b/docs/includes/apiargs-MongoDBDatabase-method-drop-param.yaml deleted file mode 100644 index 73ad04d0b..000000000 --- a/docs/includes/apiargs-MongoDBDatabase-method-drop-param.yaml +++ /dev/null @@ -1,4 +0,0 @@ -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBDatabase-method-dropCollection-option.yaml b/docs/includes/apiargs-MongoDBDatabase-method-dropCollection-option.yaml deleted file mode 100644 index 0034b5e88..000000000 --- a/docs/includes/apiargs-MongoDBDatabase-method-dropCollection-option.yaml +++ /dev/null @@ -1,31 +0,0 @@ -source: - file: apiargs-dropCollection-option.yaml - ref: encryptedFields -post: | - .. versionadded:: 1.13 ---- -source: - file: apiargs-common-option.yaml - ref: comment -post: | - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -source: - file: apiargs-common-option.yaml - ref: session -post: | - .. versionadded:: 1.3 ---- -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 -... diff --git a/docs/includes/apiargs-MongoDBDatabase-method-dropCollection-param.yaml b/docs/includes/apiargs-MongoDBDatabase-method-dropCollection-param.yaml deleted file mode 100644 index c8e0a614e..000000000 --- a/docs/includes/apiargs-MongoDBDatabase-method-dropCollection-param.yaml +++ /dev/null @@ -1,10 +0,0 @@ -source: - file: apiargs-common-param.yaml - ref: $collectionName -replacement: - action: " to drop" ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBDatabase-method-get-param.yaml b/docs/includes/apiargs-MongoDBDatabase-method-get-param.yaml deleted file mode 100644 index 651c85f94..000000000 --- a/docs/includes/apiargs-MongoDBDatabase-method-get-param.yaml +++ /dev/null @@ -1,6 +0,0 @@ -source: - file: apiargs-common-param.yaml - ref: $collectionName -replacement: - action: " to select" -... diff --git a/docs/includes/apiargs-MongoDBDatabase-method-listCollections-option.yaml b/docs/includes/apiargs-MongoDBDatabase-method-listCollections-option.yaml deleted file mode 100644 index bacf7280a..000000000 --- a/docs/includes/apiargs-MongoDBDatabase-method-listCollections-option.yaml +++ /dev/null @@ -1,46 +0,0 @@ -arg_name: option -name: authorizedCollections -type: boolean -description: | - A flag that determines which collections are returned based on the user - privileges when access control is enabled. For more information, see the - `listCollections command documentation `_. - - For servers < 4.0, this option is ignored. - - .. versionadded:: 1.12 -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-common-option.yaml - ref: comment -post: | - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -arg_name: option -name: filter -type: array|object -description: | - A query expression to filter the list of collections. - - You can specify a query expression for collection fields (e.g. ``name``, - ``options``). -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-common-option.yaml - ref: maxTimeMS ---- -source: - file: apiargs-common-option.yaml - ref: session -post: | - .. versionadded:: 1.3 -... diff --git a/docs/includes/apiargs-MongoDBDatabase-method-listCollections-param.yaml b/docs/includes/apiargs-MongoDBDatabase-method-listCollections-param.yaml deleted file mode 100644 index 73ad04d0b..000000000 --- a/docs/includes/apiargs-MongoDBDatabase-method-listCollections-param.yaml +++ /dev/null @@ -1,4 +0,0 @@ -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBDatabase-method-modifyCollection-option.yaml b/docs/includes/apiargs-MongoDBDatabase-method-modifyCollection-option.yaml deleted file mode 100644 index b27c16cfb..000000000 --- a/docs/includes/apiargs-MongoDBDatabase-method-modifyCollection-option.yaml +++ /dev/null @@ -1,23 +0,0 @@ -source: - file: apiargs-common-option.yaml - ref: comment -post: | - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -source: - file: apiargs-common-option.yaml - ref: session ---- -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 -... diff --git a/docs/includes/apiargs-MongoDBDatabase-method-modifyCollection-param.yaml b/docs/includes/apiargs-MongoDBDatabase-method-modifyCollection-param.yaml deleted file mode 100644 index 16597b3af..000000000 --- a/docs/includes/apiargs-MongoDBDatabase-method-modifyCollection-param.yaml +++ /dev/null @@ -1,20 +0,0 @@ -source: - file: apiargs-common-param.yaml - ref: $collectionName -replacement: - subject: "collection or view" - action: " to modify" ---- -arg_name: param -name: $collectionOptions -type: array -description: | - Collection or view options to assign. -interface: phpmethod -operation: ~ -optional: false ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBDatabase-method-renameCollection-option.yaml b/docs/includes/apiargs-MongoDBDatabase-method-renameCollection-option.yaml deleted file mode 100644 index bb026bd9c..000000000 --- a/docs/includes/apiargs-MongoDBDatabase-method-renameCollection-option.yaml +++ /dev/null @@ -1,33 +0,0 @@ -source: - file: apiargs-common-option.yaml - ref: comment -post: | - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -source: - file: apiargs-common-option.yaml - ref: session ---- -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 ---- -arg_name: option -name: dropTarget -type: boolean -description: | - If ``true``, MongoDB will drop the target before renaming the collection. The - default value is ``false``. -interface: phpmethod -operation: ~ -optional: true -... diff --git a/docs/includes/apiargs-MongoDBDatabase-method-renameCollection-param.yaml b/docs/includes/apiargs-MongoDBDatabase-method-renameCollection-param.yaml deleted file mode 100644 index 3043f4dd5..000000000 --- a/docs/includes/apiargs-MongoDBDatabase-method-renameCollection-param.yaml +++ /dev/null @@ -1,34 +0,0 @@ -arg_name: param -name: $fromCollectionName -type: string -description: | - The name of the collection to rename. -interface: phpmethod -operation: ~ -optional: false ---- -arg_name: param -name: $toCollectionName -type: string -description: | - The new name of the collection. -interface: phpmethod -operation: ~ -optional: false ---- -arg_name: param -name: $toDatabaseName -type: string -description: | - The new database name of the collection. If a new database name is not - specified, the current database will be used. If the new name specifies a - different database, the command copies the collection to the new database - and drops the source collection. -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBDatabase-method-selectCollection-option.yaml b/docs/includes/apiargs-MongoDBDatabase-method-selectCollection-option.yaml deleted file mode 100644 index 932c1b16b..000000000 --- a/docs/includes/apiargs-MongoDBDatabase-method-selectCollection-option.yaml +++ /dev/null @@ -1,27 +0,0 @@ -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" -... diff --git a/docs/includes/apiargs-MongoDBDatabase-method-selectCollection-param.yaml b/docs/includes/apiargs-MongoDBDatabase-method-selectCollection-param.yaml deleted file mode 100644 index 46d4e72a6..000000000 --- a/docs/includes/apiargs-MongoDBDatabase-method-selectCollection-param.yaml +++ /dev/null @@ -1,10 +0,0 @@ -source: - file: apiargs-common-param.yaml - ref: $collectionName -replacement: - action: " to select" ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBDatabase-method-selectGridFSBucket-option.yaml b/docs/includes/apiargs-MongoDBDatabase-method-selectGridFSBucket-option.yaml deleted file mode 100644 index 2039d114a..000000000 --- a/docs/includes/apiargs-MongoDBDatabase-method-selectGridFSBucket-option.yaml +++ /dev/null @@ -1,52 +0,0 @@ -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-MongoDBGridFSBucket-common-option.yaml - ref: disableMD5 -post: | - .. versionadded: 1.4 ---- -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" -... diff --git a/docs/includes/apiargs-MongoDBDatabase-method-selectGridFSBucket-param.yaml b/docs/includes/apiargs-MongoDBDatabase-method-selectGridFSBucket-param.yaml deleted file mode 100644 index 73ad04d0b..000000000 --- a/docs/includes/apiargs-MongoDBDatabase-method-selectGridFSBucket-param.yaml +++ /dev/null @@ -1,4 +0,0 @@ -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBDatabase-method-watch-option.yaml b/docs/includes/apiargs-MongoDBDatabase-method-watch-option.yaml deleted file mode 100644 index b24efbec2..000000000 --- a/docs/includes/apiargs-MongoDBDatabase-method-watch-option.yaml +++ /dev/null @@ -1,71 +0,0 @@ ---- -source: - file: apiargs-method-watch-option.yaml - ref: batchSize ---- -source: - file: apiargs-common-option.yaml - ref: collation ---- -source: - file: apiargs-common-option.yaml - ref: comment -post: | - The comment can be any valid BSON type for server versions 4.4 and above. - Earlier server versions only support string values. - - .. versionadded:: 1.13 ---- -source: - file: apiargs-method-watch-option.yaml - ref: fullDocument ---- -source: - file: apiargs-method-watch-option.yaml - ref: fullDocumentBeforeChange -post: | - .. versionadded: 1.13 ---- -source: - file: apiargs-method-watch-option.yaml - ref: maxAwaitTimeMS ---- -source: - file: apiargs-MongoDBDatabase-common-option.yaml - ref: readConcern ---- -source: - file: apiargs-MongoDBDatabase-common-option.yaml - ref: readPreference -post: | - This is used for both the initial change stream aggregation and for - server selection during an automatic resume. ---- -source: - file: apiargs-method-watch-option.yaml - ref: resumeAfter ---- -source: - file: apiargs-common-option.yaml - ref: session ---- -source: - file: apiargs-method-watch-option.yaml - ref: showExpandedEvents -post: | - .. versionadded:: 1.13 ---- -source: - file: apiargs-method-watch-option.yaml - ref: startAfter -post: | - .. versionadded: 1.5 ---- -source: - file: apiargs-method-watch-option.yaml - ref: startAtOperationTime ---- -source: - file: apiargs-MongoDBDatabase-common-option.yaml - ref: typeMap -... diff --git a/docs/includes/apiargs-MongoDBDatabase-method-watch-param.yaml b/docs/includes/apiargs-MongoDBDatabase-method-watch-param.yaml deleted file mode 100644 index b00e450cf..000000000 --- a/docs/includes/apiargs-MongoDBDatabase-method-watch-param.yaml +++ /dev/null @@ -1,8 +0,0 @@ -source: - file: apiargs-method-watch-param.yaml - ref: $pipeline ---- -source: - file: apiargs-method-watch-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBDatabase-method-withOptions-option.yaml b/docs/includes/apiargs-MongoDBDatabase-method-withOptions-option.yaml deleted file mode 100644 index c048182c1..000000000 --- a/docs/includes/apiargs-MongoDBDatabase-method-withOptions-option.yaml +++ /dev/null @@ -1,27 +0,0 @@ -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" -... diff --git a/docs/includes/apiargs-MongoDBDatabase-method-withOptions-param.yaml b/docs/includes/apiargs-MongoDBDatabase-method-withOptions-param.yaml deleted file mode 100644 index 73ad04d0b..000000000 --- a/docs/includes/apiargs-MongoDBDatabase-method-withOptions-param.yaml +++ /dev/null @@ -1,4 +0,0 @@ -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBGridFSBucket-common-option.yaml b/docs/includes/apiargs-MongoDBGridFSBucket-common-option.yaml deleted file mode 100644 index bf2de660a..000000000 --- a/docs/includes/apiargs-MongoDBGridFSBucket-common-option.yaml +++ /dev/null @@ -1,61 +0,0 @@ -arg_name: option -name: _id -type: mixed -description: | - Value to use as the file document identifier. Defaults to a new - :php:`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: disableMD5 -type: boolean -description: | - Whether to disable automatic MD5 generation when storing files. - - Defaults to ``false``. -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 -... diff --git a/docs/includes/apiargs-MongoDBGridFSBucket-common-param.yaml b/docs/includes/apiargs-MongoDBGridFSBucket-common-param.yaml deleted file mode 100644 index f1d6b136a..000000000 --- a/docs/includes/apiargs-MongoDBGridFSBucket-common-param.yaml +++ /dev/null @@ -1,39 +0,0 @@ -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 -... diff --git a/docs/includes/apiargs-MongoDBGridFSBucket-method-construct-option.yaml b/docs/includes/apiargs-MongoDBGridFSBucket-method-construct-option.yaml deleted file mode 100644 index c8a7eb795..000000000 --- a/docs/includes/apiargs-MongoDBGridFSBucket-method-construct-option.yaml +++ /dev/null @@ -1,50 +0,0 @@ -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-MongoDBGridFSBucket-common-option.yaml - ref: disableMD5 -post: | - .. versionadded: 1.4 ---- -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" -... diff --git a/docs/includes/apiargs-MongoDBGridFSBucket-method-construct-param.yaml b/docs/includes/apiargs-MongoDBGridFSBucket-method-construct-param.yaml deleted file mode 100644 index 5ef826c17..000000000 --- a/docs/includes/apiargs-MongoDBGridFSBucket-method-construct-param.yaml +++ /dev/null @@ -1,12 +0,0 @@ -source: - file: apiargs-common-param.yaml - ref: $manager ---- -source: - file: apiargs-common-param.yaml - ref: $databaseName ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBGridFSBucket-method-delete-param.yaml b/docs/includes/apiargs-MongoDBGridFSBucket-method-delete-param.yaml deleted file mode 100644 index 7e8baa214..000000000 --- a/docs/includes/apiargs-MongoDBGridFSBucket-method-delete-param.yaml +++ /dev/null @@ -1,6 +0,0 @@ -source: - file: apiargs-MongoDBGridFSBucket-common-param.yaml - ref: $id -replacement: - resource: " to delete" -... diff --git a/docs/includes/apiargs-MongoDBGridFSBucket-method-downloadToStream-param.yaml b/docs/includes/apiargs-MongoDBGridFSBucket-method-downloadToStream-param.yaml deleted file mode 100644 index 39d48dc5d..000000000 --- a/docs/includes/apiargs-MongoDBGridFSBucket-method-downloadToStream-param.yaml +++ /dev/null @@ -1,10 +0,0 @@ -source: - file: apiargs-MongoDBGridFSBucket-common-param.yaml - ref: $id -replacement: - resource: " to download" ---- -source: - file: apiargs-MongoDBGridFSBucket-common-param.yaml - ref: $destination -... diff --git a/docs/includes/apiargs-MongoDBGridFSBucket-method-downloadToStreamByName-option.yaml b/docs/includes/apiargs-MongoDBGridFSBucket-method-downloadToStreamByName-option.yaml deleted file mode 100644 index 9dc941d97..000000000 --- a/docs/includes/apiargs-MongoDBGridFSBucket-method-downloadToStreamByName-option.yaml +++ /dev/null @@ -1,4 +0,0 @@ -source: - file: apiargs-MongoDBGridFSBucket-common-option.yaml - ref: revision -... diff --git a/docs/includes/apiargs-MongoDBGridFSBucket-method-downloadToStreamByName-param.yaml b/docs/includes/apiargs-MongoDBGridFSBucket-method-downloadToStreamByName-param.yaml deleted file mode 100644 index 2704877be..000000000 --- a/docs/includes/apiargs-MongoDBGridFSBucket-method-downloadToStreamByName-param.yaml +++ /dev/null @@ -1,14 +0,0 @@ -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 -... diff --git a/docs/includes/apiargs-MongoDBGridFSBucket-method-find-option.yaml b/docs/includes/apiargs-MongoDBGridFSBucket-method-find-option.yaml deleted file mode 100644 index 1f2e9d8eb..000000000 --- a/docs/includes/apiargs-MongoDBGridFSBucket-method-find-option.yaml +++ /dev/null @@ -1,76 +0,0 @@ -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-method-find-option.yaml - ref: limit ---- -source: - file: apiargs-MongoDBCollection-method-find-option.yaml - ref: allowDiskUse ---- -source: - file: apiargs-MongoDBCollection-method-find-option.yaml - ref: batchSize ---- -source: - file: apiargs-MongoDBCollection-method-find-option.yaml - ref: collation ---- -source: - file: apiargs-MongoDBCollection-method-find-option.yaml - ref: comment ---- -source: - file: apiargs-MongoDBCollection-method-find-option.yaml - ref: cursorType ---- -source: - file: apiargs-MongoDBCollection-method-find-option.yaml - ref: maxTimeMS ---- -source: - file: apiargs-MongoDBCollection-method-find-option.yaml - ref: readConcern -description: | - :manual:`Read concern ` to use for the operation. - Defaults to the bucket's read concern. ---- -source: - file: apiargs-MongoDBCollection-method-find-option.yaml - ref: readPreference -description: | - :manual:`Read preference ` to use for the - operation. Defaults to the bucket's read preference. ---- -source: - file: apiargs-MongoDBCollection-method-find-option.yaml - ref: oplogReplay ---- -source: - file: apiargs-MongoDBCollection-method-find-option.yaml - ref: noCursorTimeout ---- -source: - file: apiargs-MongoDBCollection-method-find-option.yaml - ref: allowPartialResults ---- -source: - file: apiargs-MongoDBCollection-method-find-option.yaml - ref: typeMap -replacement: - parent: "bucket" ---- -source: - file: apiargs-MongoDBCollection-method-find-option.yaml - ref: modifiers -... diff --git a/docs/includes/apiargs-MongoDBGridFSBucket-method-findOne-option.yaml b/docs/includes/apiargs-MongoDBGridFSBucket-method-findOne-option.yaml deleted file mode 100644 index 3d0d0ed8e..000000000 --- a/docs/includes/apiargs-MongoDBGridFSBucket-method-findOne-option.yaml +++ /dev/null @@ -1,46 +0,0 @@ -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-method-find-option.yaml - ref: allowDiskUse ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: collation ---- -source: - file: apiargs-MongoDBCollection-method-find-option.yaml - ref: comment ---- -source: - file: apiargs-common-option.yaml - ref: maxTimeMS ---- -source: - file: apiargs-MongoDBCollection-method-find-option.yaml - ref: readConcern ---- -source: - file: apiargs-MongoDBGridFSBucket-method-find-option.yaml - ref: readPreference ---- -source: - file: apiargs-MongoDBGridFSBucket-method-find-option.yaml - ref: typeMap -post: | - This will be used for the returned result document. ---- -source: - file: apiargs-MongoDBCollection-method-find-option.yaml - ref: modifiers -... diff --git a/docs/includes/apiargs-MongoDBGridFSBucket-method-getFileDocumentForStream-param.yaml b/docs/includes/apiargs-MongoDBGridFSBucket-method-getFileDocumentForStream-param.yaml deleted file mode 100644 index 0801cb21d..000000000 --- a/docs/includes/apiargs-MongoDBGridFSBucket-method-getFileDocumentForStream-param.yaml +++ /dev/null @@ -1,4 +0,0 @@ -source: - file: apiargs-MongoDBGridFSBucket-common-param.yaml - ref: $stream -... diff --git a/docs/includes/apiargs-MongoDBGridFSBucket-method-getFileIdForStream-param.yaml b/docs/includes/apiargs-MongoDBGridFSBucket-method-getFileIdForStream-param.yaml deleted file mode 100644 index 0801cb21d..000000000 --- a/docs/includes/apiargs-MongoDBGridFSBucket-method-getFileIdForStream-param.yaml +++ /dev/null @@ -1,4 +0,0 @@ -source: - file: apiargs-MongoDBGridFSBucket-common-param.yaml - ref: $stream -... diff --git a/docs/includes/apiargs-MongoDBGridFSBucket-method-openDownloadStream-param.yaml b/docs/includes/apiargs-MongoDBGridFSBucket-method-openDownloadStream-param.yaml deleted file mode 100644 index 54e7c8c21..000000000 --- a/docs/includes/apiargs-MongoDBGridFSBucket-method-openDownloadStream-param.yaml +++ /dev/null @@ -1,6 +0,0 @@ -source: - file: apiargs-MongoDBGridFSBucket-common-param.yaml - ref: $id -replacement: - resource: " to download" -... diff --git a/docs/includes/apiargs-MongoDBGridFSBucket-method-openDownloadStreamByName-option.yaml b/docs/includes/apiargs-MongoDBGridFSBucket-method-openDownloadStreamByName-option.yaml deleted file mode 100644 index 9dc941d97..000000000 --- a/docs/includes/apiargs-MongoDBGridFSBucket-method-openDownloadStreamByName-option.yaml +++ /dev/null @@ -1,4 +0,0 @@ -source: - file: apiargs-MongoDBGridFSBucket-common-option.yaml - ref: revision -... diff --git a/docs/includes/apiargs-MongoDBGridFSBucket-method-openDownloadStreamByName-param.yaml b/docs/includes/apiargs-MongoDBGridFSBucket-method-openDownloadStreamByName-param.yaml deleted file mode 100644 index eb8ec932c..000000000 --- a/docs/includes/apiargs-MongoDBGridFSBucket-method-openDownloadStreamByName-param.yaml +++ /dev/null @@ -1,10 +0,0 @@ -source: - file: apiargs-MongoDBGridFSBucket-common-param.yaml - ref: $filename -replacement: - resource: " to download" ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBGridFSBucket-method-openUploadStream-option.yaml b/docs/includes/apiargs-MongoDBGridFSBucket-method-openUploadStream-option.yaml deleted file mode 100644 index 592040d69..000000000 --- a/docs/includes/apiargs-MongoDBGridFSBucket-method-openUploadStream-option.yaml +++ /dev/null @@ -1,18 +0,0 @@ -source: - file: apiargs-MongoDBGridFSBucket-common-option.yaml - ref: _id ---- -source: - file: apiargs-MongoDBGridFSBucket-common-option.yaml - ref: chunkSizeBytes ---- -source: - file: apiargs-MongoDBGridFSBucket-common-option.yaml - ref: disableMD5 -post: | - .. versionadded: 1.4 ---- -source: - file: apiargs-MongoDBGridFSBucket-common-option.yaml - ref: metadata -... diff --git a/docs/includes/apiargs-MongoDBGridFSBucket-method-openUploadStream-param.yaml b/docs/includes/apiargs-MongoDBGridFSBucket-method-openUploadStream-param.yaml deleted file mode 100644 index 6b8efb347..000000000 --- a/docs/includes/apiargs-MongoDBGridFSBucket-method-openUploadStream-param.yaml +++ /dev/null @@ -1,10 +0,0 @@ -source: - file: apiargs-MongoDBGridFSBucket-common-param.yaml - ref: $filename -replacement: - resource: " to create" ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBGridFSBucket-method-rename-param.yaml b/docs/includes/apiargs-MongoDBGridFSBucket-method-rename-param.yaml deleted file mode 100644 index e1b140aea..000000000 --- a/docs/includes/apiargs-MongoDBGridFSBucket-method-rename-param.yaml +++ /dev/null @@ -1,15 +0,0 @@ -source: - file: apiargs-MongoDBGridFSBucket-common-param.yaml - ref: $id -replacement: - resource: " to rename" ---- -arg_name: param -name: $newFilename -type: string -description: | - The new ``filename`` value. -interface: phpmethod -operation: ~ -optional: false -... diff --git a/docs/includes/apiargs-MongoDBGridFSBucket-method-uploadFromStream-option.yaml b/docs/includes/apiargs-MongoDBGridFSBucket-method-uploadFromStream-option.yaml deleted file mode 100644 index 592040d69..000000000 --- a/docs/includes/apiargs-MongoDBGridFSBucket-method-uploadFromStream-option.yaml +++ /dev/null @@ -1,18 +0,0 @@ -source: - file: apiargs-MongoDBGridFSBucket-common-option.yaml - ref: _id ---- -source: - file: apiargs-MongoDBGridFSBucket-common-option.yaml - ref: chunkSizeBytes ---- -source: - file: apiargs-MongoDBGridFSBucket-common-option.yaml - ref: disableMD5 -post: | - .. versionadded: 1.4 ---- -source: - file: apiargs-MongoDBGridFSBucket-common-option.yaml - ref: metadata -... diff --git a/docs/includes/apiargs-MongoDBGridFSBucket-method-uploadFromStream-param.yaml b/docs/includes/apiargs-MongoDBGridFSBucket-method-uploadFromStream-param.yaml deleted file mode 100644 index 48fa2db4c..000000000 --- a/docs/includes/apiargs-MongoDBGridFSBucket-method-uploadFromStream-param.yaml +++ /dev/null @@ -1,19 +0,0 @@ -source: - file: apiargs-MongoDBGridFSBucket-common-param.yaml - ref: $filename -replacement: - resource: " to create" ---- -arg_name: param -name: $source -type: resource -description: | - Readable stream, from which the new GridFS file's contents will be read. -interface: phpmethod -operation: ~ -optional: false ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-aggregate-option.yaml b/docs/includes/apiargs-aggregate-option.yaml deleted file mode 100644 index e5b410c4f..000000000 --- a/docs/includes/apiargs-aggregate-option.yaml +++ /dev/null @@ -1,43 +0,0 @@ -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. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: batchSize -type: integer -description: | - Specifies the batch size for the cursor, which will apply to both the initial - ``aggregate`` command and any subsequent ``getMore`` commands. This determines - the maximum number of documents to return in each response from the server. - - A batchSize of ``0`` is special in that and will only apply to the initial - ``aggregate`` command; subsequent ``getMore`` commands will use the server's - default batch size. This may be useful for quickly returning a cursor or - failure from ``aggregate`` without doing significant server-side work. -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: bypassDocumentValidation -post: | - This only applies when using the :ref:`$out ` and - :ref:`$out ` stages. ---- -arg_name: option -name: explain -type: boolean -description: | - Specifies whether or not to return the information on the processing of the - pipeline. -interface: phpmethod -operation: ~ -optional: true -... diff --git a/docs/includes/apiargs-common-option.yaml b/docs/includes/apiargs-common-option.yaml deleted file mode 100644 index cae141871..000000000 --- a/docs/includes/apiargs-common-option.yaml +++ /dev/null @@ -1,124 +0,0 @@ -arg_name: option -name: collation -type: array|object -description: | - :manual:`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 - `. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: comment -type: mixed -description: | - Enables users to specify an arbitrary comment to help trace the operation - through the :manual:`database profiler `, - :manual:`currentOp ` output, and - :manual:`logs `. -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. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: let -type: array|object -description: | - Map of parameter names and values. Values must be constant or closed - expressions that do not reference document fields. Parameters can then be - accessed as variables in an aggregate expression context (e.g. ``$$var``). - - This is not supported for server versions prior to 5.0 and will result in an - exception at execution time if used. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: maxTimeMS -type: integer -description: | - The cumulative time limit in milliseconds for processing operations on the - cursor. MongoDB aborts the operation at the earliest following - :term:`interrupt point`. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: readConcern -type: :php:`MongoDB\\Driver\\ReadConcern ` -description: | - The default read concern to use for {{resource}} operations. Defaults to the - {{parent}}'s read concern. -interface: phpmethod -operation: ~ -optional: true -replacement: - resource: "collection" - parent: "client" ---- -arg_name: option -name: readPreference -type: :php:`MongoDB\\Driver\\ReadPreference ` -description: | - The default read preference to use for {{resource}} operations. Defaults to - the {{parent}}'s read preference. -interface: phpmethod -operation: ~ -optional: true -replacement: - resource: "collection" - parent: "client" ---- -arg_name: option -name: session -type: :php:`MongoDB\\Driver\\Session ` -description: | - Client session to associate with the operation. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: typeMap -type: array -description: | - The :php:`type map - ` - to apply to cursors, which determines how BSON documents are converted to PHP - values. Defaults to the {{parent}}'s type map. -interface: phpmethod -operation: ~ -optional: true -replacement: - parent: "client" ---- -arg_name: option -name: writeConcern -type: :php:`MongoDB\\Driver\\WriteConcern ` -description: | - The default write concern to use for {{resource}} operations. Defaults - to the {{parent}}'s write concern. -interface: phpmethod -operation: ~ -optional: true -replacement: - resource: "collection" - parent: "client" -... diff --git a/docs/includes/apiargs-common-param.yaml b/docs/includes/apiargs-common-param.yaml deleted file mode 100644 index a8d790825..000000000 --- a/docs/includes/apiargs-common-param.yaml +++ /dev/null @@ -1,42 +0,0 @@ -arg_name: param -name: $manager -type: :php:`MongoDB\\Driver\\Manager ` -description: | - The :php:`Manager ` instance from the driver. The - manager maintains connections between the driver and your MongoDB instances. -interface: phpmethod -operation: ~ -optional: false ---- -arg_name: param -name: $databaseName -type: string -description: | - The name of the database{{action}}. -interface: phpmethod -operation: ~ -optional: false -replacement: - action: "" ---- -arg_name: param -name: $collectionName -type: string -description: | - The name of the {{subject}}{{action}}. -interface: phpmethod -operation: ~ -optional: false -replacement: - subject: "collection" - action: "" ---- -arg_name: param -name: $options -type: array -description: | - An array specifying the desired options. -interface: phpmethod -operation: ~ -optional: true -... diff --git a/docs/includes/apiargs-dropCollection-option.yaml b/docs/includes/apiargs-dropCollection-option.yaml deleted file mode 100644 index 158c4a438..000000000 --- a/docs/includes/apiargs-dropCollection-option.yaml +++ /dev/null @@ -1,21 +0,0 @@ -arg_name: option -name: encryptedFields -type: array|object -description: | - A document describing encrypted fields for queryable encryption. If omitted, - the ``encryptedFieldsMap`` option within the ``autoEncryption`` driver option - will be consulted. If ``encryptedFieldsMap`` was defined but does not specify - this collection, the library will make a final attempt to consult the - server-side value for ``encryptedFields``. See - `Field Encryption and Queryability `_ - in the MongoDB manual for more information. - - .. note:: - - This option is not passed to the :manual:`drop ` - command. The library uses it to determine related metadata collections that - should be dropped in addition to an encrypted collection. -interface: phpmethod -operation: ~ -optional: true -... diff --git a/docs/includes/apiargs-function-add_logger-param.yaml b/docs/includes/apiargs-function-add_logger-param.yaml deleted file mode 100644 index 424b405f3..000000000 --- a/docs/includes/apiargs-function-add_logger-param.yaml +++ /dev/null @@ -1,11 +0,0 @@ -arg_name: param -name: $logger -type: Psr\\Log\\LoggerInterface -description: | - A logger to register. - - If the logger is already registered, the method will have no effect. -interface: phpmethod -operation: ~ -optional: false -... diff --git a/docs/includes/apiargs-function-remove_logger-param.yaml b/docs/includes/apiargs-function-remove_logger-param.yaml deleted file mode 100644 index 7ee1be56e..000000000 --- a/docs/includes/apiargs-function-remove_logger-param.yaml +++ /dev/null @@ -1,11 +0,0 @@ -arg_name: param -name: $logger -type: Psr\\Log\\LoggerInterface -description: | - A logger to unregister. - - If the logger is not registered, the method will have no effect. -interface: phpmethod -operation: ~ -optional: false -... diff --git a/docs/includes/apiargs-function-with_transaction-param.yaml b/docs/includes/apiargs-function-with_transaction-param.yaml deleted file mode 100644 index 78875e913..000000000 --- a/docs/includes/apiargs-function-with_transaction-param.yaml +++ /dev/null @@ -1,31 +0,0 @@ -arg_name: param -name: $session -type: :php:`MongoDB\\Driver\\Session ` -description: | - A client session used to execute the transaction. -interface: phpmethod -operation: ~ -optional: false ---- -arg_name: param -name: $callback -type: callback -description: | - A callback that will be run inside the transaction. The callback must accept a - :php:`MongoDB\\Driver\\Session ` object as first - argument. -interface: phpmethod -operation: ~ -optional: false ---- -arg_name: param -name: $transactionOptions -type: array -description: | - Transaction options, which will be passed to - :php:`MongoDB\\Driver\\Session::startTransaction `. - See the extension documentation for a list of supported options. -interface: phpmethod -operation: ~ -optional: true -... diff --git a/docs/includes/apiargs-method-watch-param.yaml b/docs/includes/apiargs-method-watch-param.yaml deleted file mode 100644 index e0da852c4..000000000 --- a/docs/includes/apiargs-method-watch-param.yaml +++ /dev/null @@ -1,13 +0,0 @@ -arg_name: param -name: $pipeline -type: array|object -description: | - The pipeline of stages to append to an initial ``$changeStream`` stage. -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/extracts-bucket-option.yaml b/docs/includes/extracts-bucket-option.yaml new file mode 100644 index 000000000..0492ae9f0 --- /dev/null +++ b/docs/includes/extracts-bucket-option.yaml @@ -0,0 +1,28 @@ +ref: bucket-option-readConcern +source: + ref: common-option-readConcern + file: extracts-common-option.yaml +replacement: + object: bucket +--- +ref: bucket-option-readPreference +source: + ref: common-option-readPreference + file: extracts-common-option.yaml +replacement: + object: bucket +--- +ref: bucket-option-typeMap +source: + ref: common-option-typeMap + file: extracts-common-option.yaml +replacement: + object: bucket +--- +ref: bucket-option-writeConcern +source: + ref: common-option-writeConcern + file: extracts-common-option.yaml +replacement: + object: bucket +... diff --git a/docs/includes/extracts-client-option.yaml b/docs/includes/extracts-client-option.yaml new file mode 100644 index 000000000..9b9020bda --- /dev/null +++ b/docs/includes/extracts-client-option.yaml @@ -0,0 +1,28 @@ +ref: client-option-readConcern +source: + ref: common-option-readConcern + file: extracts-common-option.yaml +replacement: + object: client +--- +ref: client-option-readPreference +source: + ref: common-option-readPreference + file: extracts-common-option.yaml +replacement: + object: client +--- +ref: client-option-typeMap +source: + ref: common-option-typeMap + file: extracts-common-option.yaml +replacement: + object: client +--- +ref: client-option-writeConcern +source: + ref: common-option-writeConcern + file: extracts-common-option.yaml +replacement: + object: client +... diff --git a/docs/includes/extracts-collection-option.yaml b/docs/includes/extracts-collection-option.yaml new file mode 100644 index 000000000..94d9b9b04 --- /dev/null +++ b/docs/includes/extracts-collection-option.yaml @@ -0,0 +1,38 @@ +ref: collection-option-collation +source: + ref: common-option-collation + file: extracts-common-option.yaml +post: | + 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. +--- +ref: collection-option-readConcern +source: + ref: common-option-readConcern + file: extracts-common-option.yaml +replacement: + object: collection +--- +ref: collection-option-readPreference +source: + ref: common-option-readPreference + file: extracts-common-option.yaml +replacement: + object: collection +--- +ref: collection-option-typeMap +source: + ref: common-option-typeMap + file: extracts-common-option.yaml +replacement: + object: collection +--- +ref: collection-option-writeConcern +source: + ref: common-option-writeConcern + file: extracts-common-option.yaml +replacement: + object: collection +... diff --git a/docs/includes/extracts-common-option.yaml b/docs/includes/extracts-common-option.yaml new file mode 100644 index 000000000..65940b1c4 --- /dev/null +++ b/docs/includes/extracts-common-option.yaml @@ -0,0 +1,86 @@ +ref: common-option-collation +content: | + :manual:`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 `. +--- +ref: common-option-comment +content: | + Enables users to specify an arbitrary comment to help trace the operation + through the :manual:`database profiler `, + :manual:`currentOp ` output, and + :manual:`logs `. +--- +ref: common-option-comment-string-before-4.4 +content: | + The comment can be any valid BSON type since MongoDB 4.4. Earlier server + versions only support string values. +--- +ref: common-option-hint +content: | + 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. +--- +ref: common-option-let +content: | + Map of parameter names and values. Values must be constant or closed + expressions that do not reference document fields. Parameters can then be + accessed as variables in an aggregate expression context (e.g. ``$$var``). + + This is not supported for server versions prior to 5.0 and will result in an + exception at execution time if used. +--- +ref: common-option-maxTimeMS +content: | + The cumulative time limit in milliseconds for processing operations on the + cursor. MongoDB aborts the operation at the earliest following + :term:`interrupt point`. +--- +ref: common-option-readConcern +content: | + :manual:`Read concern ` to use for the operation. + Defaults to the {{object}}'s read concern. +replacement: + object: object +--- +ref: common-option-readConcern-transaction +content: | + It is not possible to specify a read concern for individual operations as part + of a transaction. Instead, set the ``readConcern`` option when + :php:`starting the transaction `. +--- +ref: common-option-readPreference +content: | + :manual:`Read preference ` to use for the + operation. Defaults to the {{object}}'s read preference. +replacement: + object: object +--- +ref: common-option-session +content: | + Client session to associate with the operation. +--- +ref: common-option-typeMap +content: | + The :php:`type map ` + to apply to cursors, which determines how BSON documents are converted to PHP + values. Defaults to the {{object}}'s type map. +replacement: + object: object +--- +ref: common-option-writeConcern +content: | + :manual:`Write concern ` to use for the operation. + Defaults to the {{object}}'s write concern. +replacement: + object: object +--- +ref: common-option-writeConcern-transaction +content: | + It is not possible to specify a write concern for individual operations as + part of a transaction. Instead, set the ``writeConcern`` option when + :php:`starting the transaction `. +... diff --git a/docs/includes/extracts-database-option.yaml b/docs/includes/extracts-database-option.yaml new file mode 100644 index 000000000..e83c7abf9 --- /dev/null +++ b/docs/includes/extracts-database-option.yaml @@ -0,0 +1,28 @@ +ref: database-option-readConcern +source: + ref: common-option-readConcern + file: extracts-common-option.yaml +replacement: + object: database +--- +ref: database-option-readPreference +source: + ref: common-option-readPreference + file: extracts-common-option.yaml +replacement: + object: database +--- +ref: database-option-typeMap +source: + ref: common-option-typeMap + file: extracts-common-option.yaml +replacement: + object: database +--- +ref: database-option-writeConcern +source: + ref: common-option-writeConcern + file: extracts-common-option.yaml +replacement: + object: database +... diff --git a/docs/includes/extracts-note.yaml b/docs/includes/extracts-note.yaml index 46dadfea4..4c41e1917 100644 --- a/docs/includes/extracts-note.yaml +++ b/docs/includes/extracts-note.yaml @@ -12,21 +12,17 @@ content: | --- ref: note-atlas-search-requirement content: | - .. note:: - - This command can only be run on a deployment hosted on - :manual:`MongoDB Atlas ` and requires an Atlas cluster tier of at - least M10. A - `Local Atlas Deployment `__ - can also be used for development. + This command can only be run on a deployment hosted on + :manual:`MongoDB Atlas ` and requires an Atlas cluster tier of at + least M10. A + `Local Atlas Deployment `__ + can also be used for development. --- ref: note-atlas-search-async content: | - .. note:: - - Atlas Search indexes are managed asynchronously. After creating or - updating an index, you can periodically execute - :phpmethod:`MongoDB\\Collection::listSearchIndexes()` and check the - ``queryable`` :manual:`output field ` - to determine whether it is ready to be used. + Atlas Search indexes are managed asynchronously. After creating or updating an + index, you can periodically execute + :phpmethod:`MongoDB\\Collection::listSearchIndexes()` and check the + ``queryable`` :manual:`output field ` + to determine whether it is ready to be used. ... diff --git a/docs/includes/extracts-option-requires.yaml b/docs/includes/extracts-option-requires.yaml new file mode 100644 index 000000000..3b65fbbab --- /dev/null +++ b/docs/includes/extracts-option-requires.yaml @@ -0,0 +1,48 @@ +--- +ref: option-requires-4.2 +source: + ref: option-requires-version + file: extracts-option-requires.yaml +replacement: + version: "4.2" +--- +ref: option-requires-4.4 +source: + ref: option-requires-version + file: extracts-option-requires.yaml +replacement: + version: "4.4" +--- +ref: option-requires-5.0 +source: + ref: option-requires-version + file: extracts-option-requires.yaml +replacement: + version: "5.0" +--- +ref: option-requires-5.3 +source: + ref: option-requires-version + file: extracts-option-requires.yaml +replacement: + version: "5.3" +--- +ref: option-requires-6.0 +source: + ref: option-requires-version + file: extracts-option-requires.yaml +replacement: + version: "6.0" +--- +ref: option-requires-7.0 +source: + ref: option-requires-version + file: extracts-option-requires.yaml +replacement: + version: "7.0" +--- +ref: option-requires-version +content: | + This option is available since MongoDB {{version}} and will result in an + exception at execution time if specified for an older server version. +... diff --git a/docs/includes/apiargs-method-watch-option.yaml b/docs/includes/extracts-watch-option.yaml similarity index 76% rename from docs/includes/apiargs-method-watch-option.yaml rename to docs/includes/extracts-watch-option.yaml index d09278286..533e76acf 100644 --- a/docs/includes/apiargs-method-watch-option.yaml +++ b/docs/includes/extracts-watch-option.yaml @@ -1,8 +1,5 @@ ---- -arg_name: option -name: batchSize -type: integer -description: | +ref: watch-option-batchSize +content: | Specifies the batch size for the cursor, which will apply to both the initial ``aggregate`` command and any subsequent ``getMore`` commands. This determines the maximum number of change events to return in each response from the @@ -14,20 +11,15 @@ description: | response for a change stream generally does not include any documents unless another option is used to configure its starting point (e.g. ``startAfter``). -interface: phpmethod -operation: ~ -optional: true --- -arg_name: option -name: fullDocument -type: string -description: | - Determines how the "fullDocument" response field will be populated for update - operations. +ref: watch-option-fullDocument +content: | + Determines how the ``fullDocument`` response field will be populated for + update operations. By default, change streams only return the delta of fields (via an - "updateDescription" field) for update operations and "fullDocument" is - omitted. Insert and replace operations always include the "fullDocument" + ``updateDescription`` field) for update operations and ``fullDocument`` is + omitted. Insert and replace operations always include the ``fullDocument`` field. Delete operations omit the field as the document no longer exists. Specify "updateLookup" to return the current majority-committed version of the @@ -48,15 +40,10 @@ description: | .. note:: This is an option of the ``$changeStream`` pipeline stage. -interface: phpmethod -operation: ~ -optional: true --- -arg_name: option -name: fullDocumentBeforeChange -type: string -description: | - Determines how the "fullDocumentBeforeChange" response field will be +ref: watch-option-fullDocumentBeforeChange +content: | + Determines how the ``fullDocumentBeforeChange`` response field will be populated. By default, the field is omitted. MongoDB 6.0+ allows returning the pre-image of the modified document if the @@ -73,24 +60,16 @@ description: | .. note:: This is an option of the ``$changeStream`` pipeline stage. -interface: phpmethod -operation: ~ -optional: true + + .. versionadded: 1.13 --- -arg_name: option -name: maxAwaitTimeMS -type: integer -description: | +ref: watch-option-maxAwaitTimeMS +content: | Positive integer denoting the time limit in milliseconds for the server to block a getMore operation if no data is available. -interface: phpmethod -operation: ~ -optional: true --- -arg_name: option -name: resumeAfter -type: array|object -description: | +ref: watch-option-resumeAfter +content: | Specifies the logical starting point for the new change stream. The ``_id`` field in documents returned by the change stream may be used here. @@ -101,14 +80,9 @@ description: | .. note:: This is an option of the ``$changeStream`` pipeline stage. -interface: phpmethod -operation: ~ -optional: true --- -arg_name: option -name: showExpandedEvents -type: boolean -description: | +ref: watch-option-showExpandedEvents +content: | If true, instructs the server to include additional DDL events in the change stream. The additional events that may be included are: @@ -126,14 +100,11 @@ description: | .. note:: This is an option of the ``$changeStream`` pipeline stage. -interface: phpmethod -operation: ~ -optional: true + + .. versionadded:: 1.13 --- -arg_name: option -name: startAfter -type: array|object -description: | +ref: watch-option-startAfter +content: | Specifies the logical starting point for the new change stream. The ``_id`` field in documents returned by the change stream may be used here. Unlike ``resumeAfter``, this option can be used with a resume token from an @@ -149,14 +120,11 @@ description: | .. note:: This is an option of the ``$changeStream`` pipeline stage. -interface: phpmethod -operation: ~ -optional: true + + .. versionadded: 1.5 --- -arg_name: option -name: startAtOperationTime -type: :php:`MongoDB\\BSON\\TimestampInterface ` -description: | +ref: watch-option-startAtOperationTime +content: | If specified, the change stream will only provide changes that occurred at or after the specified timestamp. Command responses from a MongoDB 4.0+ server include an ``operationTime`` that can be used here. By default, the @@ -172,7 +140,4 @@ description: | .. note:: This is an option of the ``$changeStream`` pipeline stage. -interface: phpmethod -operation: ~ -optional: true ... diff --git a/docs/reference/function/add_logger.txt b/docs/reference/function/add_logger.txt index ada7c9de7..f00039df8 100644 --- a/docs/reference/function/add_logger.txt +++ b/docs/reference/function/add_logger.txt @@ -23,9 +23,13 @@ Definition function add_logger(Psr\Log\LoggerInterface $logger): void - This method has the following parameters: +Parameters +---------- + +``$logger`` : Psr\\Log\\LoggerInterface + A logger to register. - .. include:: /includes/apiargs/function-add_logger-param.rst + If the logger is already registered, the method will have no effect. Behavior -------- diff --git a/docs/reference/function/remove_logger.txt b/docs/reference/function/remove_logger.txt index d183f94b2..5ced6f0ac 100644 --- a/docs/reference/function/remove_logger.txt +++ b/docs/reference/function/remove_logger.txt @@ -23,9 +23,13 @@ Definition function remove_logger(Psr\Log\LoggerInterface $logger): void - This method has the following parameters: +Parameters +---------- + +``$logger`` : Psr\\Log\\LoggerInterface + A logger to unregister. - .. include:: /includes/apiargs/function-remove_logger-param.rst + If the logger is not registered, the method will have no effect. Errors/Exceptions ----------------- diff --git a/docs/reference/function/with_transaction.txt b/docs/reference/function/with_transaction.txt index f7b7b92d5..438ea7a13 100644 --- a/docs/reference/function/with_transaction.txt +++ b/docs/reference/function/with_transaction.txt @@ -21,11 +21,27 @@ Definition .. code-block:: php - function with_transaction(MongoDB\Driver\Session $session, callable $callback, array $transactionOptions = []): void + function with_transaction( + MongoDB\Driver\Session $session, + callable $callback, + array $transactionOptions = [] + ): void - This method has the following parameters: +Parameters +---------- + +``$session`` : :php:`MongoDB\\Driver\\Session ` + A client session used to execute the transaction. + +``$callback`` : :php:`callable ` + A callback that will be run inside the transaction. The callback must accept a + :php:`MongoDB\\Driver\\Session ` object as its first + argument. - .. include:: /includes/apiargs/function-with_transaction-param.rst +``$transactionOptions`` : array + Transaction options, which will be passed to + :php:`MongoDB\\Driver\\Session::startTransaction `. + See the extension documentation for a list of supported options. Behavior -------- diff --git a/docs/reference/method/MongoDBBulkWriteResult-getModifiedCount.txt b/docs/reference/method/MongoDBBulkWriteResult-getModifiedCount.txt index 2e8f708b0..da115c5ff 100644 --- a/docs/reference/method/MongoDBBulkWriteResult-getModifiedCount.txt +++ b/docs/reference/method/MongoDBBulkWriteResult-getModifiedCount.txt @@ -20,7 +20,7 @@ Definition .. code-block:: php - function getModifiedCount(): integer|null + function getModifiedCount(): integer This method should only be called if the write was acknowledged. diff --git a/docs/reference/method/MongoDBClient-createClientEncryption.txt b/docs/reference/method/MongoDBClient-createClientEncryption.txt index 9b6f817ea..0dd925cd1 100644 --- a/docs/reference/method/MongoDBClient-createClientEncryption.txt +++ b/docs/reference/method/MongoDBClient-createClientEncryption.txt @@ -22,15 +22,18 @@ Definition function createClientEncryption(array $options): MongoDB\Driver\ClientEncryption - This method has the following parameters: +Parameters +---------- - .. include:: /includes/apiargs/MongoDBClient-method-createClientEncryption-param.rst +``$options`` : array + An array specifying the desired options. Refer to the + :php:`MongoDB\\Driver\\Manager::createClientEncryption() ` + extension documentation for a list of supported options. - The ``$options`` parameter supports all options documented in the - :php:`extension manual `. - For the ``keyVaultClient`` option, an instance of :phpclass:`MongoDB\\Client` - is automatically unwrapped and the :php:`MongoDB\\Driver\\Manager ` - instance is passed to the extension. + If a :phpclass:`MongoDB\\Client` is provided for the ``keyVaultClient`` + option, it will be unwrapped into a + :php:`MongoDB\\Driver\\Manager ` for the + extension. Return Values ------------- diff --git a/docs/reference/method/MongoDBClient-dropDatabase.txt b/docs/reference/method/MongoDBClient-dropDatabase.txt index 3e963ee5c..5a2687651 100644 --- a/docs/reference/method/MongoDBClient-dropDatabase.txt +++ b/docs/reference/method/MongoDBClient-dropDatabase.txt @@ -21,13 +21,46 @@ Definition function dropDatabase(string $databaseName, array $options = []): array|object - This method has the following parameters: +Parameters +---------- + +``$databaseName`` : string + The name of the database to drop. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + .. include:: /includes/extracts/option-requires-4.4.rst + + .. versionadded:: 1.13 + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst + + .. versionadded:: 1.3 - .. include:: /includes/apiargs/MongoDBClient-method-dropDatabase-param.rst + * - typeMap + - array + - .. include:: /includes/extracts/client-option-typeMap.rst - The ``$options`` parameter supports the following options: + This will be used for the returned command result document. - .. include:: /includes/apiargs/MongoDBClient-method-dropDatabase-option.rst + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - .. include:: /includes/extracts/client-option-writeConcern.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBClient-listDatabaseNames.txt b/docs/reference/method/MongoDBClient-listDatabaseNames.txt index bf4fb48fe..cac7d22c6 100644 --- a/docs/reference/method/MongoDBClient-listDatabaseNames.txt +++ b/docs/reference/method/MongoDBClient-listDatabaseNames.txt @@ -23,13 +23,56 @@ Definition function listDatabaseNames(array $options = []): Iterator - This method has the following parameters: +Parameters +---------- + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - authorizedDatabases + - boolean + - A flag that determines which databases are returned based on the user + privileges when access control is enabled. For more information, see the + `listDatabases command documentation `_. + + For servers < 4.0.5, this option is ignored. + + .. versionadded:: 1.7 + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + .. include:: /includes/extracts/option-requires-4.4.rst + + .. versionadded:: 1.13 + + * - filter + - array|object + - A query expression to filter the list of databases. + + You can specify a query expression for database fields (e.g. ``name``, + ``sizeOnDisk``, ``empty``). + + .. versionadded:: 1.3 - .. include:: /includes/apiargs/MongoDBClient-method-listDatabases-param.rst + * - maxTimeMS + - integer + - .. include:: /includes/extracts/common-option-maxTimeMS.rst - The ``$options`` parameter supports the following options: + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst - .. include:: /includes/apiargs/MongoDBClient-method-listDatabases-option.rst + .. versionadded:: 1.3 Return Values ------------- diff --git a/docs/reference/method/MongoDBClient-listDatabases.txt b/docs/reference/method/MongoDBClient-listDatabases.txt index 822f98d7c..dd6b2da84 100644 --- a/docs/reference/method/MongoDBClient-listDatabases.txt +++ b/docs/reference/method/MongoDBClient-listDatabases.txt @@ -21,13 +21,58 @@ Definition function listDatabases(array $options = []): MongoDB\Model\DatabaseInfoIterator - This method has the following parameters: +Parameters +---------- + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - authorizedDatabases + - boolean + - A flag that determines which databases are returned based on the user + privileges when access control is enabled. For more information, see the + `listDatabases command documentation `_. + + For servers < 4.0.5, this option is ignored. + + .. versionadded:: 1.7 + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + .. include:: /includes/extracts/option-requires-4.4.rst + + .. versionadded:: 1.13 + + * - filter + - array|object + - A query expression to filter the list of databases. + + You can specify a query expression for database fields (e.g. ``name``, + ``sizeOnDisk``, ``empty``). + + .. versionadded:: 1.3 + + * - maxTimeMS + - integer + - .. include:: /includes/extracts/common-option-maxTimeMS.rst + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst - .. include:: /includes/apiargs/MongoDBClient-method-listDatabases-param.rst + .. versionadded:: 1.3 - The ``$options`` parameter supports the following options: - .. include:: /includes/apiargs/MongoDBClient-method-listDatabases-option.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBClient-selectCollection.txt b/docs/reference/method/MongoDBClient-selectCollection.txt index 88828c29b..6700f0233 100644 --- a/docs/reference/method/MongoDBClient-selectCollection.txt +++ b/docs/reference/method/MongoDBClient-selectCollection.txt @@ -19,15 +19,51 @@ Definition .. code-block:: php - function selectCollection(string $databaseName, string $collectionName, array $options = []): MongoDB\Collection + function selectCollection( + string $databaseName, + string $collectionName, + array $options = [] + ): MongoDB\Collection - This method has the following parameters: +Parameters +---------- + +``$databaseName`` : string + The name of the database containing the collection to select. + +``$collectionName`` : string + The name of the collection to select. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - readConcern + - :php:`MongoDB\\Driver\\ReadConcern ` + - The default read concern to use for collection operations. Defaults to + the client's read concern. - .. include:: /includes/apiargs/MongoDBClient-method-selectCollection-param.rst + * - readPreference + - :php:`MongoDB\\Driver\\ReadPreference ` + - The default read preference to use for collection operations. Defaults + to the client's read preference. - The ``$options`` parameter supports the following options: + * - typeMap + - array + - The default type map to use for collection operations. Defaults to the + client's type map. - .. include:: /includes/apiargs/MongoDBClient-method-selectCollection-option.rst + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - The default write concern to use for collection operations. Defaults to + the client's write concern. Return Values ------------- diff --git a/docs/reference/method/MongoDBClient-selectDatabase.txt b/docs/reference/method/MongoDBClient-selectDatabase.txt index a556a06ae..b18145167 100644 --- a/docs/reference/method/MongoDBClient-selectDatabase.txt +++ b/docs/reference/method/MongoDBClient-selectDatabase.txt @@ -19,15 +19,47 @@ Definition .. code-block:: php - function selectDatabase(string $databaseName, array $options = []): MongoDB\Database + function selectDatabase( + string $databaseName, + array $options = [] + ): MongoDB\Database - This method has the following parameters: +Parameters +---------- + +``$databaseName`` : string + The name of the database to select. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - readConcern + - :php:`MongoDB\\Driver\\ReadConcern ` + - The default read concern to use for database operations. Defaults to + the client's read concern. - .. include:: /includes/apiargs/MongoDBClient-method-selectDatabase-param.rst + * - readPreference + - :php:`MongoDB\\Driver\\ReadPreference ` + - The default read preference to use for database operations. Defaults to + the client's read preference. - The ``$options`` parameter supports the following options: + * - typeMap + - array + - The default type map to use for database operations. Defaults to the + client's type map. - .. include:: /includes/apiargs/MongoDBClient-method-selectDatabase-option.rst + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - The default write concern to use for database operations. Defaults to + the client's write concern. Return Values ------------- diff --git a/docs/reference/method/MongoDBClient-startSession.txt b/docs/reference/method/MongoDBClient-startSession.txt index 07a9b2b20..8de00ee09 100644 --- a/docs/reference/method/MongoDBClient-startSession.txt +++ b/docs/reference/method/MongoDBClient-startSession.txt @@ -23,9 +23,13 @@ Definition function startSession(array $options = []): MongoDB\Driver\Session - Refer to the :php:`MongoDB\\Driver\\Manager::startSession() - ` extension reference for accepted - options. +Parameters +---------- + +``$options`` : array + An array specifying the desired options. Refer to the + :php:`MongoDB\\Driver\\Manager::startSession() ` + extension documentation for a list of supported options. Return Values ------------- diff --git a/docs/reference/method/MongoDBClient-watch.txt b/docs/reference/method/MongoDBClient-watch.txt index 0e7aab34a..2977475a6 100644 --- a/docs/reference/method/MongoDBClient-watch.txt +++ b/docs/reference/method/MongoDBClient-watch.txt @@ -22,15 +22,90 @@ Definition .. code-block:: php - function watch(array $pipeline = [], array $options = []): MongoDB\ChangeStream + function watch( + array $pipeline = [], + array $options = [] + ): MongoDB\ChangeStream - This method has the following parameters: +Parameters +---------- + +``$pipeline`` : array|object + The pipeline of stages to append to an initial ``$changeStream`` stage. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - batchSize + - integer + - .. include:: /includes/extracts/watch-option-batchSize.rst + + * - collation + - array|object + - .. include:: /includes/extracts/common-option-collation.rst + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + .. include:: /includes/extracts/common-option-comment-string-before-4.4.rst + + .. versionadded:: 1.13 + + * - fullDocument + - string + - .. include:: /includes/extracts/watch-option-fullDocument.rst + + * - fullDocumentBeforeChange + - string + - .. include:: /includes/extracts/watch-option-fullDocumentBeforeChange.rst + + * - maxAwaitTimeMS + - integer + - .. include:: /includes/extracts/watch-option-maxAwaitTimeMS.rst + + * - readConcern + - :php:`MongoDB\\Driver\\ReadConcern ` + - .. include:: /includes/extracts/client-option-readConcern.rst + + * - readPreference + - :php:`MongoDB\\Driver\\ReadPreference ` + - .. include:: /includes/extracts/client-option-readPreference.rst + + This is used for both the initial change stream aggregation and for + server selection during an automatic resume. + + * - resumeAfter + - array|object + - .. include:: /includes/extracts/watch-option-resumeAfter.rst + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst + + * - showExpandedEvents + - boolean + - .. include:: /includes/extracts/watch-option-showExpandedEvents.rst - .. include:: /includes/apiargs/MongoDBClient-method-watch-param.rst + * - startAfter + - array|object + - .. include:: /includes/extracts/watch-option-startAfter.rst - The ``$options`` parameter supports the following options: + * - startAtOperationTime + - :php:`MongoDB\\BSON\\TimestampInterface ` + - .. include:: /includes/extracts/watch-option-startAtOperationTime.rst - .. include:: /includes/apiargs/MongoDBClient-method-watch-option.rst + * - typeMap + - array + - .. include:: /includes/extracts/client-option-typeMap.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBClient__construct.txt b/docs/reference/method/MongoDBClient__construct.txt index 07694c91e..1134df67b 100644 --- a/docs/reference/method/MongoDBClient__construct.txt +++ b/docs/reference/method/MongoDBClient__construct.txt @@ -19,15 +19,195 @@ Definition .. code-block:: php - function __construct(?string $uri = null, array $uriOptions = [], array $driverOptions = []) + function __construct( + ?string $uri = null, + array $uriOptions = [], + array $driverOptions = [] + ) - This constructor has the following parameters: +Parameters +---------- + +``$uri`` : string + The MongoDB connection string. Refer to + :manual:`Connection Strings ` 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 `_. 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() ` function may be used + to encode constituent parts of the URI. + +``$uriOptions`` : array + 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 `_. + + Refer to the :php:`MongoDB\\Driver\\Manager::__construct() + ` extension documentation for a list of + supported options. + +``$driverOptions`` : array + Specifies options specific to the PHP driver. In addition to driver options + supported by the :php:`extension `, the library + additionally supports specifying a default + :php:`type map ` + to apply to the cursors it creates. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - autoEncryption + - array + - Options to configure client-side field-level encryption in the driver. + Refer to the + :php:`extension documentation ` + for a list of supported encryption options. + + If a :phpclass:`MongoDB\\Client` is provided for the ``keyVaultClient`` + option, it will be unwrapped into a + :php:`MongoDB\\Driver\\Manager ` for the + extension. + + .. versionadded:: 1.6 + + * - driver + - array + - Additional driver metadata to be passed on to the server handshake. + This is an array containing ``name``, ``version``, and ``platform`` + string fields. For example: + + .. code-block:: php + + [ + 'name' => 'my-driver', + 'version' => '1.2.3-dev', + 'platform' => 'some-platform', + ] + + .. note:: + + This feature is primarily designed for custom drivers and ODMs, + which may want to identify themselves to the server for diagnostic + purposes. Applications wishing to identify themselves should use the + ``appName`` URI option instead of this option. + + .. versionadded:: 1.7 + + * - serverApi + - :php:`MongoDB\\Driver\\ServerApi ` + - Used to declare an API version on the client. Refer to + :manual:`Stable API tutorial ` for additional + information. + + .. versionadded:: 1.9 + + * - typeMap + - array + - Default :php:`type map ` + to apply to cursors, which determines how BSON documents are converted + to PHP values. The library uses the following type map by default: + + .. code-block:: php + + [ + 'array' => 'MongoDB\Model\BSONArray', + 'document' => 'MongoDB\Model\BSONDocument', + 'root' => 'MongoDB\Model\BSONDocument', + ] + + * - allow_invalid_hostname + - boolean + - Disables hostname validation if ``true``. Defaults to ``false``. + + Allowing invalid hostnames may expose the driver to a + `man-in-the-middle attack `__. + + .. deprecated:: 1.6 + + This option has been deprecated. Use the + ``tlsAllowInvalidHostnames`` URI option instead. + + * - ca_dir + - string + - 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. + + * - ca_file + - string + - 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. + + .. deprecated:: 1.6 + + This option has been deprecated. Use the ``tlsCAFile`` URI option + instead. + + * - crl_file + - string + - Path to a certificate revocation list file. + + * - pem_file + - string + - Path to a PEM encoded certificate to use for client authentication. + + Falls back to the deprecated ``local_cert`` SSL context option if not + specified. + + .. deprecated:: 1.6 + + This option has been deprecated. Use the ``tlsCertificateKeyFile`` + URI option instead. + + * - pem_pwd + - string + - Passphrase for the PEM encoded certificate (if applicable). + + Falls back to the deprecated ``passphrase`` SSL context option if not + specified. + + .. deprecated:: 1.6 + + This option has been deprecated. Use the + ``tlsCertificateKeyFilePassword`` URI option instead. + + * - weak_cert_validation + - boolean + - Disables certificate validation ``true``. Defaults to ``false``. + + Falls back to the deprecated ``allow_self_signed`` SSL context option + if not specified. + + .. deprecated:: 1.6 - .. include:: /includes/apiargs/MongoDBClient-method-construct-param.rst + This option has been deprecated. Use the + ``tlsAllowInvalidCertificates`` URI option instead. - The ``$driverOptions`` parameter supports the following options: + * - context + - resource + - :php:`SSL context options ` to be used as + fallbacks for other driver options (as specified). Note that the driver + does not consult the default stream context. - .. include:: /includes/apiargs/MongoDBClient-method-construct-driverOptions.rst + This option is supported for backwards compatibility, but should be + considered deprecated. Errors/Exceptions ----------------- diff --git a/docs/reference/method/MongoDBClient__get.txt b/docs/reference/method/MongoDBClient__get.txt index 5e4097b2d..88de4725f 100644 --- a/docs/reference/method/MongoDBClient__get.txt +++ b/docs/reference/method/MongoDBClient__get.txt @@ -23,9 +23,11 @@ Definition function __get(string $databaseName): MongoDB\Database - This method has the following parameters: +Parameters +---------- - .. include:: /includes/apiargs/MongoDBClient-method-get-param.rst +``$databaseName`` : string + The name of the database to select. Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-aggregate.txt b/docs/reference/method/MongoDBCollection-aggregate.txt index 6975098db..11f9d19b4 100644 --- a/docs/reference/method/MongoDBCollection-aggregate.txt +++ b/docs/reference/method/MongoDBCollection-aggregate.txt @@ -20,15 +20,120 @@ Definition .. code-block:: php - function aggregate(array $pipeline, array $options = []): Traversable + function aggregate( + array $pipeline, + array $options = [] + ): Traversable - This method has the following parameters: +Parameters +---------- + +``$pipeline`` : array + Specifies an :manual:`aggregation pipeline ` + operation. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - allowDiskUse + - boolean + - Enables writing to temporary files. When set to ``true``, aggregation + stages can write data to the ``_tmp`` sub-directory in the ``dbPath`` + directory. + + * - batchSize + - integer + - Specifies the batch size for the cursor, which will apply to both the + initial ``aggregate`` command and any subsequent ``getMore`` commands. + This determines the maximum number of documents to return in each + response from the server. + + A batchSize of ``0`` is special in that and will only apply to the + initial ``aggregate`` command; subsequent ``getMore`` commands will use + the server's default batch size. This may be useful for quickly + returning a cursor or failure from ``aggregate`` without doing + significant server-side work. + + * - bypassDocumentValidation + - boolean + - If ``true``, allows the write operation to circumvent document level + validation. Defaults to ``false``. + + This only applies when using the :ref:`$out ` and + :ref:`$out ` stages. + + * - collation + - array|object + - .. include:: /includes/extracts/collection-option-collation.rst + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + The comment can be any valid BSON type for server versions 4.4 and + above. Earlier server versions only support string values. + + .. versionadded:: 1.3 + + * - explain + - boolean + - Specifies whether or not to return the information on the processing of + the pipeline. + + .. versionadded:: 1.4 + + * - hint + - string|array|object + - .. include:: /includes/extracts/common-option-hint.rst + + .. versionadded:: 1.3 + + * - let + - array|object + - .. include:: /includes/extracts/common-option-let.rst + + .. versionadded:: 1.9 + + * - maxTimeMS + - integer + - .. include:: /includes/extracts/common-option-maxTimeMS.rst + + * - readConcern + - :php:`MongoDB\\Driver\\ReadConcern ` + - .. include:: /includes/extracts/collection-option-readConcern.rst + + .. include:: /includes/extracts/common-option-readConcern-transaction.rst + + * - readPreference + - :php:`MongoDB\\Driver\\ReadPreference ` + - .. include:: /includes/extracts/collection-option-readPreference.rst + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst + + .. versionadded:: 1.3 + + * - typeMap + - array + - .. include:: /includes/extracts/collection-option-typeMap.rst - .. include:: /includes/apiargs/MongoDBCollection-method-aggregate-param.rst + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - .. include:: /includes/extracts/collection-option-writeConcern.rst - The ``$options`` parameter supports the following options: + .. include:: /includes/extracts/common-option-writeConcern-transaction.rst - .. include:: /includes/apiargs/MongoDBCollection-method-aggregate-option.rst + This only applies when a :ref:`$out ` or + :ref:`$merge ` stage is specified. Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-bulkWrite.txt b/docs/reference/method/MongoDBCollection-bulkWrite.txt index e58688cbd..a86e9cc6f 100644 --- a/docs/reference/method/MongoDBCollection-bulkWrite.txt +++ b/docs/reference/method/MongoDBCollection-bulkWrite.txt @@ -19,15 +19,92 @@ Definition .. code-block:: php - function bulkWrite(array $operations, array $options = []): MongoDB\BulkWriteResult + function bulkWrite( + array $operations, + array $options = [] + ): MongoDB\BulkWriteResult - This method has the following parameters: +Parameters +---------- + +``$operations`` : array + An array containing the write operations to perform. + :phpmethod:`MongoDB\\Collection::bulkWrite()` supports + :phpmethod:`deleteMany() `, + :phpmethod:`deleteOne() `, + :phpmethod:`insertOne() `, + :phpmethod:`replaceOne() `, + :phpmethod:`updateMany() `, and + :phpmethod:`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. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - bypassDocumentValidation + - boolean + - If ``true``, allows the write operation to circumvent document level + validation. Defaults to ``false``. + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + .. include:: /includes/extracts/option-requires-4.4.rst + + .. versionadded:: 1.13 + + * - let + - array|object + - .. include:: /includes/extracts/common-option-let.rst + + .. versionadded:: 1.13 + + * - ordered + - boolean + - 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``. + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst - .. include:: /includes/apiargs/MongoDBCollection-method-bulkWrite-param.rst + .. versionadded:: 1.3 - The ``$options`` parameter supports the following options: + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - .. include:: /includes/extracts/collection-option-writeConcern.rst - .. include:: /includes/apiargs/MongoDBCollection-method-bulkWrite-option.rst + .. include:: /includes/extracts/common-option-writeConcern-transaction.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-count.txt b/docs/reference/method/MongoDBCollection-count.txt index 1673ed91d..0048703f4 100644 --- a/docs/reference/method/MongoDBCollection-count.txt +++ b/docs/reference/method/MongoDBCollection-count.txt @@ -21,15 +21,77 @@ Definition .. code-block:: php - function count(array|object $filter = [], array $options = []): integer + function count( + array|object $filter = [], + array $options = [] + ): integer - This method has the following parameters: +Parameters +---------- + +``$filter`` : array|object + The filter criteria that specifies the documents to count. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - collation + - array|object + - .. include:: /includes/extracts/collection-option-collation.rst + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + .. include:: /includes/extracts/option-requires-4.4.rst + + .. versionadded:: 1.13 + + * - hint + - string|array|object + - .. include:: /includes/extracts/common-option-hint.rst + + .. 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. + + * - limit + - integer + - The maximum number of matching documents to return. + + * - maxTimeMS + - integer + - .. include:: /includes/extracts/common-option-maxTimeMS.rst + + * - readConcern + - :php:`MongoDB\\Driver\\ReadConcern ` + - .. include:: /includes/extracts/collection-option-readConcern.rst + + .. include:: /includes/extracts/common-option-readConcern-transaction.rst + + * - readPreference + - :php:`MongoDB\\Driver\\ReadPreference ` + - .. include:: /includes/extracts/collection-option-readPreference.rst - .. include:: /includes/apiargs/MongoDBCollection-method-count-param.rst + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst - The ``$options`` parameter supports the following options: + .. versionadded:: 1.3 - .. include:: /includes/apiargs/MongoDBCollection-method-count-option.rst + * - skip + - integer + - The number of matching documents to skip before returning results. Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-countDocuments.txt b/docs/reference/method/MongoDBCollection-countDocuments.txt index 44b16c8e0..dc62b1d65 100644 --- a/docs/reference/method/MongoDBCollection-countDocuments.txt +++ b/docs/reference/method/MongoDBCollection-countDocuments.txt @@ -23,13 +23,62 @@ Definition function countDocuments(array|object $filter = [], array $options = []): integer - This method has the following parameters: +Parameters +---------- + +``$filter`` : array|object + The filter criteria that specifies the documents to count. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - collation + - array|object + - .. include:: /includes/extracts/collection-option-collation.rst + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + .. include:: /includes/extracts/common-option-comment-string-before-4.4.rst + + * - hint + - string|array|object + - .. include:: /includes/extracts/common-option-hint.rst + + * - limit + - integer + - The maximum number of matching documents to return. + + * - maxTimeMS + - integer + - .. include:: /includes/extracts/common-option-maxTimeMS.rst + + * - readConcern + - :php:`MongoDB\\Driver\\ReadConcern ` + - .. include:: /includes/extracts/collection-option-readConcern.rst + + .. include:: /includes/extracts/common-option-readConcern-transaction.rst - .. include:: /includes/apiargs/MongoDBCollection-method-countDocuments-param.rst + * - readPreference + - :php:`MongoDB\\Driver\\ReadPreference ` + - .. include:: /includes/extracts/collection-option-readPreference.rst - The ``$options`` parameter supports the following options: + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst - .. include:: /includes/apiargs/MongoDBCollection-method-countDocuments-option.rst + * - skip + - integer + - The number of matching documents to skip before returning results. Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-createIndex.txt b/docs/reference/method/MongoDBCollection-createIndex.txt index ceef2e7bc..7f8aca41d 100644 --- a/docs/reference/method/MongoDBCollection-createIndex.txt +++ b/docs/reference/method/MongoDBCollection-createIndex.txt @@ -19,20 +19,114 @@ Definition .. code-block:: php - function createIndex(array|object $key, array $options = []): string + function createIndex( + array|object $key, + array $options = [] + ): string - This method has the following parameters: +Parameters +---------- + +``$key`` : array|object + 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 ] + +``$options`` : array + An array specifying the desired options. + + The ``$options`` parameter accepts both index *and* command options. A + non-exhaustive list of index options follows. For a complete list of index + options, refer to the + :manual:`createIndexes ` command reference + in the MongoDB manual. + + **Index Options** (non-exhaustive) + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - collation + - array|object + - .. include:: /includes/extracts/collection-option-collation.rst + + * - expireAfterSeconds + - integer + - Creates a :manual:`TTL ` index. + + * - name + - string + - A name that uniquely identifies the index. By default, MongoDB creates + index names based on the key. + + * - partialFilterExpression + - array|object + - Creates a :manual:`partial ` index. + + * - sparse + - boolean + - Creates a :manual:`sparse ` index. + + * - unique + - boolean + - Creates a :manual:`unique ` index. + + **Command Options** + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + .. include:: /includes/extracts/option-requires-4.4.rst + + .. versionadded:: 1.13 + + * - commitQuorum + - string|integer + - Specifies how many data-bearing members of a replica set, including the + primary, must complete the index builds successfully before the primary + marks the indexes as ready. + + This option accepts the same values for the ``w`` field in a write + concern plus ``"votingMembers"``, which indicates all voting + data-bearing nodes. + + This is not supported for server versions prior to 4.4 and will result + in an exception at execution time if used. + + .. versionadded:: 1.7 + + * - maxTimeMS + - integer + - .. include:: /includes/extracts/common-option-maxTimeMS.rst + + .. versionadded:: 1.3 - .. include:: /includes/apiargs/MongoDBCollection-method-createIndex-param.rst + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst - The ``$options`` parameter accepts all index options that your MongoDB - version supports. MongoDB includes the following options: + .. versionadded:: 1.3 - .. include:: /includes/apiargs/MongoDBCollection-method-createIndex-option.rst + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - .. include:: /includes/extracts/collection-option-writeConcern.rst - For a full list of the supported index creation options, refer to the - :manual:`createIndexes ` command reference - in the MongoDB manual. + .. include:: /includes/extracts/common-option-writeConcern-transaction.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-createIndexes.txt b/docs/reference/method/MongoDBCollection-createIndexes.txt index 76705e9ba..efb740ea2 100644 --- a/docs/reference/method/MongoDBCollection-createIndexes.txt +++ b/docs/reference/method/MongoDBCollection-createIndexes.txt @@ -19,15 +19,78 @@ Definition .. code-block:: php - function createIndexes(array $indexes, array $options = []): string[] + function createIndexes( + array $indexes, + array $options = [] + ): string[] - This method has the following parameters: +Parameters +---------- + +``$indexes`` : array + 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 ] ], + ] + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + .. include:: /includes/extracts/option-requires-4.4.rst - .. include:: /includes/apiargs/MongoDBCollection-method-createIndexes-param.rst + .. versionadded:: 1.13 - The ``$options`` parameter supports the following options: + * - commitQuorum + - string|integer + - Specifies how many data-bearing members of a replica set, including the + primary, must complete the index builds successfully before the primary + marks the indexes as ready. - .. include:: /includes/apiargs/MongoDBCollection-method-createIndexes-option.rst + This option accepts the same values for the ``w`` field in a write + concern plus ``"votingMembers"``, which indicates all voting + data-bearing nodes. + + This is not supported for server versions prior to 4.4 and will result + in an exception at execution time if used. + + .. versionadded:: 1.7 + + * - maxTimeMS + - integer + - .. include:: /includes/extracts/common-option-maxTimeMS.rst + + .. versionadded:: 1.3 + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst + + .. versionadded:: 1.3 + + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - .. include:: /includes/extracts/collection-option-writeConcern.rst + + .. include:: /includes/extracts/common-option-writeConcern-transaction.rst Return Values ------------- @@ -41,15 +104,21 @@ Errors/Exceptions .. include:: /includes/extracts/error-invalidargumentexception.rst .. include:: /includes/extracts/error-driver-runtimeexception.rst +Behavior +-------- + ``$indexes`` parameter ----------------------- +~~~~~~~~~~~~~~~~~~~~~~ The ``$indexes`` parameter is an array of index specification documents. Each element in ``$indexes`` must itself be an array or object with a ``key`` field, which corresponds to the ``$key`` parameter of :phpmethod:`createIndex() `. The array or object may include other fields that correspond to index options accepted by :phpmethod:`createIndex() -` (excluding ``writeConcern``). +`. For a full list of the supported index +creation options, refer to the +:manual:`createIndexes ` command reference +in the MongoDB manual. For example, the following ``$indexes`` parameter creates two indexes. The first is an ascending unique index on the ``username`` field and the second is a diff --git a/docs/reference/method/MongoDBCollection-createSearchIndex.txt b/docs/reference/method/MongoDBCollection-createSearchIndex.txt index d3f63773a..df9474635 100644 --- a/docs/reference/method/MongoDBCollection-createSearchIndex.txt +++ b/docs/reference/method/MongoDBCollection-createSearchIndex.txt @@ -21,18 +21,41 @@ Definition .. code-block:: php - function createSearchIndex(array|object $definition, array $options = []): string + function createSearchIndex( + array|object $definition, + array $options = [] + ): string - This method has the following parameters: + .. include:: /includes/extracts/note-atlas-search-requirement.rst - .. include:: /includes/apiargs/MongoDBCollection-method-createSearchIndex-param.rst +Parameters +---------- - The ``$options`` parameter supports the following options: +``$definition`` : array|object + Document describing the index to create. For details on definition syntax, see + :manual:`Search Index Definition Syntax `. - .. include:: /includes/apiargs/MongoDBCollection-method-createSearchIndex-option.rst +``$options`` : array + An array specifying the desired options. - .. include:: /includes/extracts/note-atlas-search-requirement.rst - .. include:: /includes/extracts/note-atlas-search-async.rst + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + * - name + - string + - Name of the search index to create. + + You cannot create multiple indexes with the same name on a single + collection. If you do not specify a name, the index is named "default". Return Values ------------- @@ -46,6 +69,11 @@ Errors/Exceptions .. include:: /includes/extracts/error-invalidargumentexception.rst .. include:: /includes/extracts/error-driver-runtimeexception.rst +Behavior +-------- + +.. include:: /includes/extracts/note-atlas-search-async.rst + Examples -------- diff --git a/docs/reference/method/MongoDBCollection-createSearchIndexes.txt b/docs/reference/method/MongoDBCollection-createSearchIndexes.txt index 176dbf6a2..584d94b38 100644 --- a/docs/reference/method/MongoDBCollection-createSearchIndexes.txt +++ b/docs/reference/method/MongoDBCollection-createSearchIndexes.txt @@ -21,18 +21,41 @@ Definition .. code-block:: php - function createSearchIndexes(array $indexes, array $options = []): string + function createSearchIndexes( + array $indexes, + array $options = [] + ): string - This method has the following parameters: + .. include:: /includes/extracts/note-atlas-search-requirement.rst - .. include:: /includes/apiargs/MongoDBCollection-method-createSearchIndexes-param.rst +Parameters +---------- - The ``$options`` parameter supports the following options: +``$indexes`` : array + Array of documents describing the indexes to create. - .. include:: /includes/apiargs/MongoDBCollection-method-createSearchIndexes-option.rst + A required ``definition`` document field describes the index to create. For + details on definition syntax, see + :manual:`Search Index Definition Syntax `. - .. include:: /includes/extracts/note-atlas-search-requirement.rst - .. include:: /includes/extracts/note-atlas-search-async.rst + An optional ``name`` string field specifies the name of the search index to + create. You cannot create multiple indexes with the same name on a single + collection. If you do not specify a name, the index is named "default". + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst Return Values ------------- @@ -46,6 +69,11 @@ Errors/Exceptions .. include:: /includes/extracts/error-invalidargumentexception.rst .. include:: /includes/extracts/error-driver-runtimeexception.rst +Behavior +-------- + +.. include:: /includes/extracts/note-atlas-search-async.rst + Examples -------- diff --git a/docs/reference/method/MongoDBCollection-deleteMany.txt b/docs/reference/method/MongoDBCollection-deleteMany.txt index 29ad2e833..ccb5e37db 100644 --- a/docs/reference/method/MongoDBCollection-deleteMany.txt +++ b/docs/reference/method/MongoDBCollection-deleteMany.txt @@ -19,15 +19,65 @@ Definition .. code-block:: php - function deleteMany(array|object $filter, array $options = []): MongoDB\DeleteResult + function deleteMany( + array|object $filter, + array $options = [] + ): MongoDB\DeleteResult - This method has the following parameters: +Parameters +---------- + +``$filter`` : array|object + The filter criteria that specifies the documents to delete. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - collation + - array|object + - .. include:: /includes/extracts/collection-option-collation.rst + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + .. include:: /includes/extracts/option-requires-4.4.rst + + .. versionadded:: 1.13 + + * - hint + - string|array|object + - .. include:: /includes/extracts/common-option-hint.rst + + .. include:: /includes/extracts/option-requires-4.4.rst + + .. versionadded:: 1.7 + + * - let + - array|object + - .. include:: /includes/extracts/common-option-let.rst + + .. versionadded:: 1.13 + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst - .. include:: /includes/apiargs/MongoDBCollection-method-deleteMany-param.rst + .. versionadded:: 1.3 - The ``$options`` parameter supports the following options: + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - .. include:: /includes/extracts/collection-option-writeConcern.rst - .. include:: /includes/apiargs/MongoDBCollection-method-deleteMany-option.rst + .. include:: /includes/extracts/common-option-writeConcern-transaction.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-deleteOne.txt b/docs/reference/method/MongoDBCollection-deleteOne.txt index 6c888a961..0c6598914 100644 --- a/docs/reference/method/MongoDBCollection-deleteOne.txt +++ b/docs/reference/method/MongoDBCollection-deleteOne.txt @@ -21,15 +21,65 @@ Definition .. code-block:: php - function deleteOne(array|object $filter, array $options = []): MongoDB\DeleteResult + function deleteOne( + array|object $filter, + array $options = [] + ): MongoDB\DeleteResult - This method has the following parameters: +Parameters +---------- + +``$filter`` : array|object + The filter criteria that specifies the documents to delete. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - collation + - array|object + - .. include:: /includes/extracts/collection-option-collation.rst + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + .. include:: /includes/extracts/option-requires-4.4.rst + + .. versionadded:: 1.13 + + * - hint + - string|array|object + - .. include:: /includes/extracts/common-option-hint.rst + + .. include:: /includes/extracts/option-requires-4.4.rst + + .. versionadded:: 1.7 + + * - let + - array|object + - .. include:: /includes/extracts/common-option-let.rst + + .. versionadded:: 1.13 + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst - .. include:: /includes/apiargs/MongoDBCollection-method-deleteOne-param.rst + .. versionadded:: 1.3 - The ``$options`` parameter supports the following options: + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - .. include:: /includes/extracts/collection-option-writeConcern.rst - .. include:: /includes/apiargs/MongoDBCollection-method-deleteOne-option.rst + .. include:: /includes/extracts/common-option-writeConcern-transaction.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-distinct.txt b/docs/reference/method/MongoDBCollection-distinct.txt index 24fd6761a..42eae0681 100644 --- a/docs/reference/method/MongoDBCollection-distinct.txt +++ b/docs/reference/method/MongoDBCollection-distinct.txt @@ -19,15 +19,70 @@ Definition .. code-block:: php - function distinct(string $fieldName, array|object $filter = [], array $options = []): mixed[] + function distinct( + string $fieldName, + array|object $filter = [], + array $options = [] + ): mixed[] - This method has the following parameters: +Parameters +---------- + +``$fieldName`` : string + The field for which to return distinct values. + +``$filter`` : array|object + The filter criteria that specifies the documents from which to retrieve the + distinct values. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - collation + - array|object + - .. include:: /includes/extracts/collection-option-collation.rst + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + .. include:: /includes/extracts/option-requires-4.4.rst + + .. versionadded:: 1.13 + + * - maxTimeMS + - integer + - .. include:: /includes/extracts/common-option-maxTimeMS.rst + + * - readConcern + - :php:`MongoDB\\Driver\\ReadConcern ` + - .. include:: /includes/extracts/collection-option-readConcern.rst + + .. include:: /includes/extracts/common-option-readConcern-transaction.rst + + * - readPreference + - :php:`MongoDB\\Driver\\ReadPreference ` + - .. include:: /includes/extracts/collection-option-readPreference.rst + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst - .. include:: /includes/apiargs/MongoDBCollection-method-distinct-param.rst + .. versionadded:: 1.3 - The ``$options`` parameter supports the following options: + * - typeMap + - array + - .. include:: /includes/extracts/collection-option-typeMap.rst - .. include:: /includes/apiargs/MongoDBCollection-method-distinct-option.rst + .. versionadded:: 1.5 Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-drop.txt b/docs/reference/method/MongoDBCollection-drop.txt index a2cd9410b..0704ff6a8 100644 --- a/docs/reference/method/MongoDBCollection-drop.txt +++ b/docs/reference/method/MongoDBCollection-drop.txt @@ -21,13 +21,67 @@ Definition function drop(array $options = []): array|object - This method has the following parameters: +Parameters +---------- + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + .. include:: /includes/extracts/option-requires-4.4.rst + + .. versionadded:: 1.13 + + * - encryptedFields + - array|object + - A document describing encrypted fields for queryable encryption. If + omitted, the ``encryptedFieldsMap`` option within the + ``autoEncryption`` driver option will be consulted. If + ``encryptedFieldsMap`` was defined but does not specify this + collection, the library will make a final attempt to consult the + server-side value for ``encryptedFields``. See + `Field Encryption and Queryability `_ + in the MongoDB manual for more information. + + .. note:: + + This option is not passed to the + :manual:`drop ` command. The library uses + it to determine related metadata collections that should be dropped + in addition to an encrypted collection. + + .. versionadded:: 1.13 + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst + + .. versionadded:: 1.3 + + * - typeMap + - array + - .. include:: /includes/extracts/collection-option-typeMap.rst + + This will be used for the returned command result document. + + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - .. include:: /includes/extracts/collection-option-writeConcern.rst - .. include:: /includes/apiargs/MongoDBCollection-method-drop-param.rst + .. include:: /includes/extracts/common-option-writeConcern-transaction.rst - The ``$options`` parameter supports the following options: - .. include:: /includes/apiargs/MongoDBCollection-method-drop-option.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-dropIndex.txt b/docs/reference/method/MongoDBCollection-dropIndex.txt index 0a7fbb53f..07a181458 100644 --- a/docs/reference/method/MongoDBCollection-dropIndex.txt +++ b/docs/reference/method/MongoDBCollection-dropIndex.txt @@ -19,15 +19,61 @@ Definition .. code-block:: php - function dropIndex(string|MongoDB\Model\IndexInfo $indexName, array $options = []): array|object + function dropIndex( + string|MongoDB\Model\IndexInfo $indexName, + array $options = [] + ): array|object - This method has the following parameters: +Parameters +---------- + +``$indexName`` : string| :phpclass:`MongoDB\\Model\\IndexInfo` + The name or model object of the index to drop. View the existing indexes on + the collection using the :phpmethod:`listIndexes() + ` method. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + .. include:: /includes/extracts/option-requires-4.4.rst + + .. versionadded:: 1.13 + + * - maxTimeMS + - integer + - .. include:: /includes/extracts/common-option-maxTimeMS.rst + + .. versionadded:: 1.3 + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst + + .. versionadded:: 1.3 + + * - typeMap + - array + - .. include:: /includes/extracts/collection-option-typeMap.rst - .. include:: /includes/apiargs/MongoDBCollection-method-dropIndex-param.rst + This will be used for the returned command result document. - The ``$options`` parameter supports the following options: + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - .. include:: /includes/extracts/collection-option-writeConcern.rst - .. include:: /includes/apiargs/MongoDBCollection-method-dropIndex-option.rst + .. include:: /includes/extracts/common-option-writeConcern-transaction.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-dropIndexes.txt b/docs/reference/method/MongoDBCollection-dropIndexes.txt index ee48d493c..41fda6e40 100644 --- a/docs/reference/method/MongoDBCollection-dropIndexes.txt +++ b/docs/reference/method/MongoDBCollection-dropIndexes.txt @@ -22,13 +22,56 @@ Definition function dropIndexes(array $options = []): array|object - This method has the following parameters: +Parameters +---------- + +``$indexName`` : string| :phpclass:`MongoDB\\Model\\IndexInfo` + The name or model object of the index to drop. View the existing indexes on + the collection using the :phpmethod:`listIndexes() + ` method. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + .. include:: /includes/extracts/option-requires-4.4.rst + + .. versionadded:: 1.13 + + * - maxTimeMS + - integer + - .. include:: /includes/extracts/common-option-maxTimeMS.rst + + .. versionadded:: 1.3 + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst + + .. versionadded:: 1.3 + + * - typeMap + - array + - .. include:: /includes/extracts/collection-option-typeMap.rst - .. include:: /includes/apiargs/MongoDBCollection-method-dropIndex-param.rst + This will be used for the returned command result document. - The ``$options`` parameter supports the following options: + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - .. include:: /includes/extracts/collection-option-writeConcern.rst - .. include:: /includes/apiargs/MongoDBCollection-method-dropIndex-option.rst + .. include:: /includes/extracts/common-option-writeConcern-transaction.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-dropSearchIndex.txt b/docs/reference/method/MongoDBCollection-dropSearchIndex.txt index befd5bf03..f34992739 100644 --- a/docs/reference/method/MongoDBCollection-dropSearchIndex.txt +++ b/docs/reference/method/MongoDBCollection-dropSearchIndex.txt @@ -23,15 +23,28 @@ Definition function dropSearchIndex(string $name, array $options = []): void - This method has the following parameters: + .. include:: /includes/extracts/note-atlas-search-requirement.rst - .. include:: /includes/apiargs/MongoDBCollection-method-dropSearchIndex-param.rst +Parameters +---------- - The ``$options`` parameter supports the following options: +``$name`` : string + Name of the index to drop. - .. include:: /includes/apiargs/MongoDBCollection-method-dropSearchIndex-option.rst +``$options`` : array + An array specifying the desired options. - .. include:: /includes/extracts/note-atlas-search-requirement.rst + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst Errors/Exceptions ----------------- diff --git a/docs/reference/method/MongoDBCollection-estimatedDocumentCount.txt b/docs/reference/method/MongoDBCollection-estimatedDocumentCount.txt index 1a8316293..59a7b2124 100644 --- a/docs/reference/method/MongoDBCollection-estimatedDocumentCount.txt +++ b/docs/reference/method/MongoDBCollection-estimatedDocumentCount.txt @@ -23,13 +23,45 @@ Definition function countDocuments(array $options = []): integer - This method has the following parameters: +Parameters +---------- + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + .. include:: /includes/extracts/option-requires-4.4.rst + + .. versionadded:: 1.13 + + * - maxTimeMS + - integer + - .. include:: /includes/extracts/common-option-maxTimeMS.rst + + * - readConcern + - :php:`MongoDB\\Driver\\ReadConcern ` + - .. include:: /includes/extracts/collection-option-readConcern.rst - .. include:: /includes/apiargs/MongoDBCollection-method-estimateDocumentCount-param.rst + .. include:: /includes/extracts/common-option-readConcern-transaction.rst - The ``$options`` parameter supports the following options: + * - readPreference + - :php:`MongoDB\\Driver\\ReadPreference ` + - .. include:: /includes/extracts/collection-option-readPreference.rst - .. include:: /includes/apiargs/MongoDBCollection-method-estimateDocumentCount-option.rst + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-explain.txt b/docs/reference/method/MongoDBCollection-explain.txt index 600f203b8..ad63ec56a 100644 --- a/docs/reference/method/MongoDBCollection-explain.txt +++ b/docs/reference/method/MongoDBCollection-explain.txt @@ -21,15 +21,52 @@ Definition .. code-block:: php - function explain(MongoDB\Operation\Explainable $explainable, array $options = []): array|object + function explain( + MongoDB\Operation\Explainable $explainable, + array $options = [] + ): array|object - This method has the following parameters: +Parameters +---------- + +``$explainable`` : :phpclass:`MongoDB\\Operation\\Explainable` + The command to explain. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + .. include:: /includes/extracts/option-requires-4.4.rst + + Defaults to the ``comment`` of the explained operation (if any). + + .. versionadded:: 1.13 + + * - readPreference + - :php:`MongoDB\\Driver\\ReadPreference ` + - .. include:: /includes/extracts/collection-option-readPreference.rst - .. include:: /includes/apiargs/MongoDBCollection-method-explain-param.rst + * - typeMap + - array + - .. include:: /includes/extracts/collection-option-typeMap.rst - The ``$options`` parameter supports the following options: + This will be used for the returned command result document. - .. include:: /includes/apiargs/MongoDBCollection-method-explain-option.rst + * - verbosity + - string + - The verbosity level at which to run the command. See the :manual:`explain + ` command for more information. Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-find.txt b/docs/reference/method/MongoDBCollection-find.txt index 4fe923893..8c0ce7c22 100644 --- a/docs/reference/method/MongoDBCollection-find.txt +++ b/docs/reference/method/MongoDBCollection-find.txt @@ -19,15 +19,205 @@ Definition .. code-block:: php - function find(array|object $filter = [], array $options = []): MongoDB\Driver\Cursor + function find( + array|object $filter = [], + array $options = [] + ): MongoDB\Driver\Cursor - This method has the following parameters: +Parameters +---------- + +``$filter`` : array|object + The filter criteria that specifies the documents to query. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - allowDiskUse + - boolean + - Enables writing to temporary files. When set to ``true``, queries can + write data to the ``_tmp`` sub-directory in the ``dbPath`` directory. + + * - allowPartialResults + - boolean + - For queries against a sharded collection, returns partial results from + the :program:`mongos` if some shards are unavailable instead of + throwing an error. + + * - batchSize + - integer + - 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. + + * - collation + - array|object + - .. include:: /includes/extracts/collection-option-collation.rst + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + .. include:: /includes/extracts/common-option-comment-string-before-4.4.rst + + * - cursorType + - integer + - Indicates the type of cursor to use. ``cursorType`` supports the + following values: + + - ``MongoDB\Operation\Find::NON_TAILABLE`` (*default*) + - ``MongoDB\Operation\Find::TAILABLE`` + + * - hint + - string|array|object + - .. include:: /includes/extracts/common-option-hint.rst + + .. versionadded:: 1.2 + + * - let + - array|object + - .. include:: /includes/extracts/common-option-let.rst + + .. versionadded:: 1.13 + + * - limit + - integer + - 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. + + * - max + - array|object + - The exclusive upper bound for a specific index. + + .. versionadded:: 1.2 + + * - maxAwaitTimeMS + - integer + - 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 + + * - maxScan + - integer + - Maximum number of documents or index keys to scan when executing the + query. + + .. deprecated:: 1.4 + .. versionadded:: 1.2 + + * - maxTimeMS + - integer + - .. include:: /includes/extracts/common-option-maxTimeMS.rst + + * - min + - array|object + - The inclusive lower bound for a specific index. + + .. versionadded:: 1.2 + + * - modifiers + - array|object + - :manual:`Meta operators ` that + modify the output or behavior of a query. Use of these operators is + deprecated in favor of named options. + + * - noCursorTimeout + - boolean + - Prevents the server from timing out idle cursors after an inactivity + period (10 minutes). + + * - oplogReplay + - boolean + - Internal use for replica sets. To use ``oplogReplay``, you must include + the following condition in the filter: + + .. code-block:: javascript + + { ts: { $gte: } } + + The :php:`MongoDB\\BSON\\Timestamp ` + class reference describes how to represent MongoDB's BSON timestamp + type with PHP. + + .. deprecated:: 1.7 + + * - projection + - array|object + - The :ref:`projection specification ` to determine which + fields to include in the returned documents. See + :manual:`Project Fields to Return from Query ` + and :manual:`Projection Operators ` in + the MongoDB manual. + + * - readConcern + - :php:`MongoDB\\Driver\\ReadConcern ` + - .. include:: /includes/extracts/collection-option-readConcern.rst + + .. include:: /includes/extracts/common-option-readConcern-transaction.rst + + * - readPreference + - :php:`MongoDB\\Driver\\ReadPreference ` + - .. include:: /includes/extracts/collection-option-readPreference.rst + + * - returnKey + - boolean + - If true, returns only the index keys in the resulting documents. + + .. versionadded:: 1.2 + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst + + .. versionadded:: 1.3 + + * - showRecordId + - boolean + - Determines whether to return the record identifier for each document. + If true, adds a field ``$recordId`` to the returned documents. + + .. versionadded:: 1.2 + + * - skip + - integer + - Number of documents to skip. Defaults to ``0``. + + * - sort + - array|object + - The sort specification for the ordering of the results. - .. include:: /includes/apiargs/MongoDBCollection-method-find-param.rst + * - snapshot + - boolean + - Prevents the cursor from returning a document more than once because of + an intervening write operation. - The ``$options`` parameter supports the following options: + .. deprecated:: 1.4 + .. versionadded:: 1.2 - .. include:: /includes/apiargs/MongoDBCollection-method-find-option.rst + * - typeMap + - array + - .. include:: /includes/extracts/collection-option-typeMap.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-findOne.txt b/docs/reference/method/MongoDBCollection-findOne.txt index 44829db30..c5230c6cf 100644 --- a/docs/reference/method/MongoDBCollection-findOne.txt +++ b/docs/reference/method/MongoDBCollection-findOne.txt @@ -19,15 +19,156 @@ Definition .. code-block:: php - function findOne(array|object $filter = [], array $options = []): array|object|null + function findOne( + array|object $filter = [], + array $options = [] + ): array|object|null - This method has the following parameters: +Parameters +---------- + +``$filter`` : array|object + The filter criteria that specifies the documents to query. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - allowDiskUse + - boolean + - Enables writing to temporary files. When set to ``true``, queries can + write data to the ``_tmp`` sub-directory in the ``dbPath`` directory. + + * - allowPartialResults + - boolean + - For queries against a sharded collection, returns partial results from + the :program:`mongos` if some shards are unavailable instead of + throwing an error. + + * - collation + - array|object + - .. include:: /includes/extracts/collection-option-collation.rst + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + .. include:: /includes/extracts/common-option-comment-string-before-4.4.rst + + * - hint + - string|array|object + - .. include:: /includes/extracts/common-option-hint.rst + + .. versionadded:: 1.2 + + * - let + - array|object + - .. include:: /includes/extracts/common-option-let.rst + + .. versionadded:: 1.13 + + * - max + - array|object + - The exclusive upper bound for a specific index. + + .. versionadded:: 1.2 + + * - maxScan + - integer + - Maximum number of documents or index keys to scan when executing the + query. + + .. deprecated:: 1.4 + .. versionadded:: 1.2 + + * - maxTimeMS + - integer + - .. include:: /includes/extracts/common-option-maxTimeMS.rst + + * - min + - array|object + - The inclusive lower bound for a specific index. + + .. versionadded:: 1.2 + + * - modifiers + - array|object + - :manual:`Meta operators ` that + modify the output or behavior of a query. Use of these operators is + deprecated in favor of named options. + + * - oplogReplay + - boolean + - Internal use for replica sets. To use ``oplogReplay``, you must include + the following condition in the filter: + + .. code-block:: javascript + + { ts: { $gte: } } + + The :php:`MongoDB\\BSON\\Timestamp ` + class reference describes how to represent MongoDB's BSON timestamp + type with PHP. + + .. deprecated:: 1.7 + + * - projection + - array|object + - The :ref:`projection specification ` to determine which + fields to include in the returned documents. See + :manual:`Project Fields to Return from Query ` + and :manual:`Projection Operators ` in + the MongoDB manual. + + * - readConcern + - :php:`MongoDB\\Driver\\ReadConcern ` + - .. include:: /includes/extracts/collection-option-readConcern.rst + + .. include:: /includes/extracts/common-option-readConcern-transaction.rst + + * - readPreference + - :php:`MongoDB\\Driver\\ReadPreference ` + - .. include:: /includes/extracts/collection-option-readPreference.rst + + * - returnKey + - boolean + - If true, returns only the index keys in the resulting documents. + + .. versionadded:: 1.2 + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst + + .. versionadded:: 1.3 + + * - showRecordId + - boolean + - Determines whether to return the record identifier for each document. + If true, adds a field ``$recordId`` to the returned documents. + + .. versionadded:: 1.2 + + * - skip + - integer + - Number of documents to skip. Defaults to ``0``. - .. include:: /includes/apiargs/MongoDBCollection-method-findOne-param.rst + * - sort + - array|object + - The sort specification for the ordering of the results. - The ``$options`` parameter supports the following options: + * - typeMap + - array + - .. include:: /includes/extracts/collection-option-typeMap.rst - .. include:: /includes/apiargs/MongoDBCollection-method-findOne-option.rst + This will be used for the returned result document. Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-findOneAndDelete.txt b/docs/reference/method/MongoDBCollection-findOneAndDelete.txt index e5531f416..b34bd5788 100644 --- a/docs/reference/method/MongoDBCollection-findOneAndDelete.txt +++ b/docs/reference/method/MongoDBCollection-findOneAndDelete.txt @@ -19,15 +19,87 @@ Definition .. code-block:: php - function findOneAndDelete(array|object $filter = [], array $options = []): object|null + function findOneAndDelete( + array|object $filter = [], + array $options = [] + ): object|null - This method has the following parameters: +Parameters +---------- + +``$filter`` : array|object + The filter criteria that specifies the documents to delete. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - collation + - array|object + - .. include:: /includes/extracts/collection-option-collation.rst + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + .. include:: /includes/extracts/option-requires-4.4.rst + + .. versionadded:: 1.13 + + * - hint + - string|array|object + - .. include:: /includes/extracts/common-option-hint.rst + + .. include:: /includes/extracts/option-requires-4.4.rst + + .. versionadded:: 1.7 + + * - let + - array|object + - .. include:: /includes/extracts/common-option-let.rst + + .. versionadded:: 1.13 + + * - maxTimeMS + - integer + - .. include:: /includes/extracts/common-option-maxTimeMS.rst + + * - projection + - array|object + - The :ref:`projection specification ` to determine which + fields to include in the returned documents. See + :manual:`Project Fields to Return from Query ` + and :manual:`Projection Operators ` in + the MongoDB manual. + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst + + .. versionadded:: 1.3 + + * - sort + - array|object + - The sort specification for the ordering of the results. + + * - typeMap + - array + - .. include:: /includes/extracts/collection-option-typeMap.rst - .. include:: /includes/apiargs/MongoDBCollection-method-findOneAndDelete-param.rst + This will be used for the returned result document. - The ``$options`` parameter supports the following options: + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - .. include:: /includes/extracts/collection-option-writeConcern.rst - .. include:: /includes/apiargs/MongoDBCollection-method-findOneAndDelete-option.rst + .. include:: /includes/extracts/common-option-writeConcern-transaction.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-findOneAndReplace.txt b/docs/reference/method/MongoDBCollection-findOneAndReplace.txt index 66bd7f12f..697e73710 100644 --- a/docs/reference/method/MongoDBCollection-findOneAndReplace.txt +++ b/docs/reference/method/MongoDBCollection-findOneAndReplace.txt @@ -19,15 +19,110 @@ Definition .. code-block:: php - function findOneAndReplace(array|object $filter, array|object $replacement, array $options = []): object|null + function findOneAndReplace( + array|object $filter, + array|object $replacement, + array $options = [] + ): object|null - This method has the following parameters: +Parameters +---------- + +``$filter`` : array|object + The filter criteria that specifies the documents to replace. + +``$replacement`` : array|object + The replacement document. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - bypassDocumentValidation + - boolean + - If ``true``, allows the write operation to circumvent document level + validation. Defaults to ``false``. + + * - collation + - array|object + - .. include:: /includes/extracts/collection-option-collation.rst + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + .. include:: /includes/extracts/option-requires-4.4.rst + + .. versionadded:: 1.13 + + * - hint + - string|array|object + - .. include:: /includes/extracts/common-option-hint.rst + + .. include:: /includes/extracts/option-requires-4.4.rst + + .. versionadded:: 1.7 + + * - let + - array|object + - .. include:: /includes/extracts/common-option-let.rst + + .. versionadded:: 1.13 + + * - maxTimeMS + - integer + - .. include:: /includes/extracts/common-option-maxTimeMS.rst + + * - projection + - array|object + - The :ref:`projection specification ` to determine which + fields to include in the returned documents. See + :manual:`Project Fields to Return from Query ` + and :manual:`Projection Operators ` in + the MongoDB manual. + + * - returnDocument + - integer + - 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`` + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst + + .. versionadded:: 1.3 + + * - sort + - array|object + - The sort specification for the ordering of the results. + + * - typeMap + - array + - .. include:: /includes/extracts/collection-option-typeMap.rst + + This will be used for the returned result document. - .. include:: /includes/apiargs/MongoDBCollection-method-findOneAndReplace-param.rst + * - upsert + - boolean + - 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. - The ``$options`` parameter supports the following options: + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - .. include:: /includes/extracts/collection-option-writeConcern.rst - .. include:: /includes/apiargs/MongoDBCollection-method-findOneAndReplace-option.rst + .. include:: /includes/extracts/common-option-writeConcern-transaction.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-findOneAndUpdate.txt b/docs/reference/method/MongoDBCollection-findOneAndUpdate.txt index c903698b1..cbfbad16e 100644 --- a/docs/reference/method/MongoDBCollection-findOneAndUpdate.txt +++ b/docs/reference/method/MongoDBCollection-findOneAndUpdate.txt @@ -19,15 +19,121 @@ Definition .. code-block:: php - function findOneAndUpdate(array|object $filter, array|object $update, array $options = []): object|null + function findOneAndUpdate( + array|object $filter, + array|object $update, + array $options = [] + ): object|null - This method has the following parameters: +Parameters +---------- + +``$filter`` : array|object + The filter criteria that specifies the documents to update. + +``$update`` : array|object + Specifies the field and value combinations to update and any relevant update + operators. ``$update`` uses MongoDB's :method:`update operators + `. Starting with MongoDB 4.2, an `aggregation + pipeline `_ + can be passed as this parameter. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - bypassDocumentValidation + - boolean + - If ``true``, allows the write operation to circumvent document level + validation. Defaults to ``false``. + + * - arrayFilters + - array + - An array of filter documents that determines which array elements to + modify for an update operation on an array field. + + .. versionadded:: 1.3 + + * - collation + - array|object + - .. include:: /includes/extracts/collection-option-collation.rst + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + .. include:: /includes/extracts/option-requires-4.4.rst + + .. versionadded:: 1.13 + + * - hint + - string|array|object + - .. include:: /includes/extracts/common-option-hint.rst + + .. include:: /includes/extracts/option-requires-4.4.rst + + .. versionadded:: 1.7 + + * - maxTimeMS + - integer + - .. include:: /includes/extracts/common-option-maxTimeMS.rst + + * - let + - array|object + - .. include:: /includes/extracts/common-option-let.rst + + .. versionadded:: 1.13 + + * - projection + - array|object + - The :ref:`projection specification ` to determine which + fields to include in the returned documents. See + :manual:`Project Fields to Return from Query ` + and :manual:`Projection Operators ` in + the MongoDB manual. + + * - returnDocument + - integer + - 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`` + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst + + .. versionadded:: 1.3 + + * - sort + - array|object + - The sort specification for the ordering of the results. + + * - typeMap + - array + - .. include:: /includes/extracts/collection-option-typeMap.rst + + This will be used for the returned result document. - .. include:: /includes/apiargs/MongoDBCollection-method-findOneAndUpdate-param.rst + * - upsert + - boolean + - 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. - The ``$options`` parameter supports the following options: + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - .. include:: /includes/extracts/collection-option-writeConcern.rst - .. include:: /includes/apiargs/MongoDBCollection-method-findOneAndUpdate-option.rst + .. include:: /includes/extracts/common-option-writeConcern-transaction.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-insertMany.txt b/docs/reference/method/MongoDBCollection-insertMany.txt index 62b0858e6..6ff516e7e 100644 --- a/docs/reference/method/MongoDBCollection-insertMany.txt +++ b/docs/reference/method/MongoDBCollection-insertMany.txt @@ -19,15 +19,62 @@ Definition .. code-block:: php - function insertMany(array $documents, array $options = []): MongoDB\InsertManyResult + function insertMany( + array $documents, + array $options = [] + ): MongoDB\InsertManyResult - This method has the following parameters: +Parameters +---------- + +``$documents`` : array + The documents to insert into the collection. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - bypassDocumentValidation + - boolean + - If ``true``, allows the write operation to circumvent document level + validation. Defaults to ``false``. + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + .. include:: /includes/extracts/option-requires-4.4.rst + + .. versionadded:: 1.13 + + * - ordered + - boolean + - 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``. + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst - .. include:: /includes/apiargs/MongoDBCollection-method-insertMany-param.rst + .. versionadded:: 1.3 - The ``$options`` parameter supports the following options: + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - .. include:: /includes/extracts/collection-option-writeConcern.rst - .. include:: /includes/apiargs/MongoDBCollection-method-insertMany-option.rst + .. include:: /includes/extracts/common-option-writeConcern-transaction.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-insertOne.txt b/docs/reference/method/MongoDBCollection-insertOne.txt index dd6e2f220..ce6f04840 100644 --- a/docs/reference/method/MongoDBCollection-insertOne.txt +++ b/docs/reference/method/MongoDBCollection-insertOne.txt @@ -19,15 +19,52 @@ Definition .. code-block:: php - function insertOne(array|object $document, array $options = []): MongoDB\InsertOneResult + function insertOne( + array|object $document, + array $options = [] + ): MongoDB\InsertOneResult - This method has the following parameters: +Parameters +---------- + +``$document`` : array|object + The document to insert into the collection. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - bypassDocumentValidation + - boolean + - If ``true``, allows the write operation to circumvent document level + validation. Defaults to ``false``. + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + .. include:: /includes/extracts/option-requires-4.4.rst + + .. versionadded:: 1.13 + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst - .. include:: /includes/apiargs/MongoDBCollection-method-insertOne-param.rst + .. versionadded:: 1.3 - The ``$options`` parameter supports the following options: + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - .. include:: /includes/extracts/collection-option-writeConcern.rst - .. include:: /includes/apiargs/MongoDBCollection-method-insertOne-option.rst + .. include:: /includes/extracts/common-option-writeConcern-transaction.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-listIndexes.txt b/docs/reference/method/MongoDBCollection-listIndexes.txt index 2508b2828..84ee74b38 100644 --- a/docs/reference/method/MongoDBCollection-listIndexes.txt +++ b/docs/reference/method/MongoDBCollection-listIndexes.txt @@ -21,13 +21,37 @@ Definition function listIndexes(array $options = []): MongoDB\Model\IndexInfoIterator - This method has the following parameters: +Parameters +---------- + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + .. include:: /includes/extracts/option-requires-4.4.rst + + .. versionadded:: 1.13 - .. include:: /includes/apiargs/MongoDBCollection-method-listIndexes-param.rst + * - maxTimeMS + - integer + - .. include:: /includes/extracts/common-option-maxTimeMS.rst - The ``$options`` parameter supports the following options: + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst - .. include:: /includes/apiargs/MongoDBCollection-method-listIndexes-option.rst + .. versionadded:: 1.3 Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-listSearchIndexes.txt b/docs/reference/method/MongoDBCollection-listSearchIndexes.txt index 8dc986004..e8db9521c 100644 --- a/docs/reference/method/MongoDBCollection-listSearchIndexes.txt +++ b/docs/reference/method/MongoDBCollection-listSearchIndexes.txt @@ -23,15 +23,71 @@ Definition function listSearchIndexes(array $options = []): Countable&Iterator - This method has the following parameters: + .. include:: /includes/extracts/note-atlas-search-requirement.rst + +Parameters +---------- - .. include:: /includes/apiargs/MongoDBCollection-method-listSearchIndexes-param.rst +``$options`` : array + An array specifying the desired options. - The ``$options`` parameter supports the following options: + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 - .. include:: /includes/apiargs/MongoDBCollection-method-listSearchIndexes-option.rst + * - Name + - Type + - Description - .. include:: /includes/extracts/note-atlas-search-requirement.rst + * - batchSize + - integer + - Specifies the batch size for the cursor, which will apply to both the + initial ``aggregate`` command and any subsequent ``getMore`` commands. + This determines the maximum number of documents to return in each + response from the server. + + A batchSize of ``0`` is special in that and will only apply to the + initial ``aggregate`` command; subsequent ``getMore`` commands will use + the server's default batch size. This may be useful for quickly + returning a cursor or failure from ``aggregate`` without doing + significant server-side work. + + * - collation + - array|object + - .. include:: /includes/extracts/common-option-collation.rst + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + * - maxTimeMS + - integer + - .. include:: /includes/extracts/common-option-maxTimeMS.rst + + * - name + - string + - Name of the index to return information about. + + If name is not specified, information for all indexes on the collection + will be returned. + + * - readConcern + - :php:`MongoDB\\Driver\\ReadConcern ` + - .. include:: /includes/extracts/collection-option-readConcern.rst + + .. include:: /includes/extracts/common-option-readConcern-transaction.rst + + * - readPreference + - :php:`MongoDB\\Driver\\ReadPreference ` + - .. include:: /includes/extracts/collection-option-readPreference.rst + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst + + * - typeMap + - array + - .. include:: /includes/extracts/collection-option-typeMap.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-mapReduce.txt b/docs/reference/method/MongoDBCollection-mapReduce.txt index a38872bdc..1cb66f357 100644 --- a/docs/reference/method/MongoDBCollection-mapReduce.txt +++ b/docs/reference/method/MongoDBCollection-mapReduce.txt @@ -24,15 +24,139 @@ Definition .. code-block:: php - function mapReduce(MongoDB\BSON\JavascriptInterface $map, MongoDB\BSON\JavascriptInterface $reduce, string|array|object $out, array $options = []): MongoDB\MapReduceResult + function mapReduce( + MongoDB\BSON\JavascriptInterface $map, + MongoDB\BSON\JavascriptInterface $reduce, + string|array|object $out, + array $options = [] + ): MongoDB\MapReduceResult + +Parameters +---------- + +``$map`` : :php:`MongoDB\\BSON\\Javascript ` + A JavaScript function that associates or "maps" a value with a key and emits + the key and value pair. + + .. note:: + + Passing a Javascript instance with a scope is deprecated. Put all scope + variables in the ``scope`` option of the MapReduce operation. + +``$reduce`` : :php:`MongoDB\\BSON\\Javascript ` + A JavaScript function that "reduces" to a single object all the values + associated with a particular key. + + .. note:: + + Passing a Javascript instance with a scope is deprecated. Put all scope + variables in the ``scope`` option of the MapReduce operation. + +``$out`` : string|array|object + 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. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - bypassDocumentValidation + - boolean + - If ``true``, allows the write operation to circumvent document level + validation. Defaults to ``false``. + + This only applies when results are output to a collection. + + * - collation + - array|object + - .. include:: /includes/extracts/collection-option-collation.rst + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + .. include:: /includes/extracts/option-requires-4.4.rst + + .. versionadded:: 1.13 + + * - finalize + - :php:`MongoDB\\BSON\\Javascript ` + - Follows the reduce method and modifies the output. + + .. note:: + + Passing a Javascript instance with a scope is deprecated. Put all + scope variables in the ``scope`` option of the MapReduce operation. + + * - jsMode + - boolean + - Specifies whether to convert intermediate data into BSON format between + the execution of the map and reduce functions. + + * - limit + - integer + - Specifies a maximum number of documents for the input into the map + function. + + * - maxTimeMS + - integer + - .. include:: /includes/extracts/common-option-maxTimeMS.rst + + * - query + - array|object + - Specifies the selection criteria using query operators for determining + the documents input to the map function. + + * - readConcern + - :php:`MongoDB\\Driver\\ReadConcern ` + - .. include:: /includes/extracts/collection-option-readConcern.rst + + .. include:: /includes/extracts/common-option-readConcern-transaction.rst + + * - readPreference + - :php:`MongoDB\\Driver\\ReadPreference ` + - .. include:: /includes/extracts/collection-option-readPreference.rst + + This option will be ignored when results are output to a collection. + + * - scope + - array|object + - Specifies global variables that are accessible in the map, reduce, and + finalize functions. + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst + + .. versionadded:: 1.3 + + * - sort + - array|object + - The sort specification for the ordering of the results. - This method has the following parameters: + * - typeMap + - array + - .. include:: /includes/extracts/collection-option-typeMap.rst - .. include:: /includes/apiargs/MongoDBCollection-method-mapReduce-param.rst + * - verbose + - boolean + - Specifies whether to include the timing information in the result + information. - The ``$options`` parameter supports the following options: + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - .. include:: /includes/extracts/collection-option-writeConcern.rst - .. include:: /includes/apiargs/MongoDBCollection-method-mapReduce-option.rst + .. include:: /includes/extracts/common-option-writeConcern-transaction.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-rename.txt b/docs/reference/method/MongoDBCollection-rename.txt index a40555f21..2b617de94 100644 --- a/docs/reference/method/MongoDBCollection-rename.txt +++ b/docs/reference/method/MongoDBCollection-rename.txt @@ -21,15 +21,63 @@ Definition .. code-block:: php - function rename(string $toCollectionName, ?string $toDatabaseName = null, array $options = []): array|object + function rename( + string $toCollectionName, + ?string $toDatabaseName = null, + array $options = [] + ): array|object - This method has the following parameters: +Parameters +---------- + +``$toCollectionName`` : string + The new name of the collection. + +``$toDatabaseName`` : string + The new database name of the collection. If a new database name is not + specified, the database of the original collection will be used. If the new + name specifies a different database, the command copies the collection + to the new database and drops the source collection. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - dropTarget + - boolean + - If ``true``, MongoDB will drop the target before renaming the + collection. The default value is ``false``. + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + .. include:: /includes/extracts/option-requires-4.4.rst + + .. versionadded:: 1.13 + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst + + * - typeMap + - array + - .. include:: /includes/extracts/collection-option-typeMap.rst - .. include:: /includes/apiargs/MongoDBCollection-method-rename-param.rst + This will be used for the returned command result document. - The ``$options`` parameter supports the following options: + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - .. include:: /includes/extracts/collection-option-writeConcern.rst - .. include:: /includes/apiargs/MongoDBCollection-method-rename-option.rst + .. include:: /includes/extracts/common-option-writeConcern-transaction.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-replaceOne.txt b/docs/reference/method/MongoDBCollection-replaceOne.txt index e42f993e9..94395eff0 100644 --- a/docs/reference/method/MongoDBCollection-replaceOne.txt +++ b/docs/reference/method/MongoDBCollection-replaceOne.txt @@ -21,15 +21,80 @@ Definition .. code-block:: php - function replaceOne(array|object $filter, array|object $replacement, array $options = []): MongoDB\UpdateResult + function replaceOne( + array|object $filter, + array|object $replacement, + array $options = [] + ): MongoDB\UpdateResult - This method has the following parameters: +Parameters +---------- + +``$filter`` : array|object + The filter criteria that specifies the documents to replace. + +``$replacement`` : array|object + The replacement document. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - bypassDocumentValidation + - boolean + - If ``true``, allows the write operation to circumvent document level + validation. Defaults to ``false``. + + * - collation + - array|object + - .. include:: /includes/extracts/collection-option-collation.rst + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + .. include:: /includes/extracts/option-requires-4.4.rst + + .. versionadded:: 1.13 + + * - hint + - string|array|object + - .. include:: /includes/extracts/common-option-hint.rst + + .. include:: /includes/extracts/option-requires-4.2.rst + + .. versionadded:: 1.6 + + * - let + - array|object + - .. include:: /includes/extracts/common-option-let.rst + + .. versionadded:: 1.13 + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst + + .. versionadded:: 1.3 - .. include:: /includes/apiargs/MongoDBCollection-method-replaceOne-param.rst + * - upsert + - boolean + - 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. - The ``$options`` parameter supports the following options: + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - .. include:: /includes/extracts/collection-option-writeConcern.rst - .. include:: /includes/apiargs/MongoDBCollection-method-replaceOne-option.rst + .. include:: /includes/extracts/common-option-writeConcern-transaction.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-updateMany.txt b/docs/reference/method/MongoDBCollection-updateMany.txt index 0e5f22b9d..07f29211e 100644 --- a/docs/reference/method/MongoDBCollection-updateMany.txt +++ b/docs/reference/method/MongoDBCollection-updateMany.txt @@ -19,15 +19,91 @@ Definition .. code-block:: php - function updateMany(array|object $filter, array|object $update, array $options = []): MongoDB\UpdateResult + function updateMany( + array|object $filter, + array|object $update, + array $options = [] + ): MongoDB\UpdateResult - This method has the following parameters: +Parameters +---------- + +``$filter`` : array|object + The filter criteria that specifies the documents to update. + +``$update`` : array|object + Specifies the field and value combinations to update and any relevant update + operators. ``$update`` uses MongoDB's :method:`update operators + `. Starting with MongoDB 4.2, an `aggregation + pipeline `_ + can be passed as this parameter. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - arrayFilters + - array + - An array of filter documents that determines which array elements to + modify for an update operation on an array field. + + .. versionadded:: 1.3 + + * - bypassDocumentValidation + - boolean + - If ``true``, allows the write operation to circumvent document level + validation. Defaults to ``false``. + + * - collation + - array|object + - .. include:: /includes/extracts/collection-option-collation.rst + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + .. include:: /includes/extracts/option-requires-4.4.rst + + .. versionadded:: 1.13 + + * - hint + - string|array|object + - .. include:: /includes/extracts/common-option-hint.rst + + .. include:: /includes/extracts/option-requires-4.2.rst + + .. versionadded:: 1.6 + + * - let + - array|object + - .. include:: /includes/extracts/common-option-let.rst + + .. versionadded:: 1.13 + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst + + .. versionadded:: 1.3 - .. include:: /includes/apiargs/MongoDBCollection-method-updateMany-param.rst + * - upsert + - boolean + - 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. - The ``$options`` parameter supports the following options: + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - .. include:: /includes/extracts/collection-option-writeConcern.rst - .. include:: /includes/apiargs/MongoDBCollection-method-updateMany-option.rst + .. include:: /includes/extracts/common-option-writeConcern-transaction.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-updateOne.txt b/docs/reference/method/MongoDBCollection-updateOne.txt index 2b930e232..2a981cb2b 100644 --- a/docs/reference/method/MongoDBCollection-updateOne.txt +++ b/docs/reference/method/MongoDBCollection-updateOne.txt @@ -21,15 +21,91 @@ Definition .. code-block:: php - function updateOne(array|object $filter, array|object $update, array $options = []): MongoDB\UpdateResult + function updateOne( + array|object $filter, + array|object $update, + array $options = [] + ): MongoDB\UpdateResult - This method has the following parameters: +Parameters +---------- + +``$filter`` : array|object + The filter criteria that specifies the documents to update. + +``$update`` : array|object + Specifies the field and value combinations to update and any relevant update + operators. ``$update`` uses MongoDB's :method:`update operators + `. Starting with MongoDB 4.2, an `aggregation + pipeline `_ + can be passed as this parameter. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - arrayFilters + - array + - An array of filter documents that determines which array elements to modify + for an update operation on an array field. + + .. versionadded:: 1.3 + + * - bypassDocumentValidation + - boolean + - If ``true``, allows the write operation to circumvent document level + validation. Defaults to ``false``. + + * - collation + - array|object + - .. include:: /includes/extracts/collection-option-collation.rst + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + .. include:: /includes/extracts/option-requires-4.4.rst + + .. versionadded:: 1.13 + + * - hint + - string|array|object + - .. include:: /includes/extracts/common-option-hint.rst + + .. include:: /includes/extracts/option-requires-4.2.rst + + .. versionadded:: 1.6 + + * - let + - array|object + - .. include:: /includes/extracts/common-option-let.rst + + .. versionadded:: 1.13 + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst + + .. versionadded:: 1.3 - .. include:: /includes/apiargs/MongoDBCollection-method-updateOne-param.rst + * - upsert + - boolean + - 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. - The ``$options`` parameter supports the following options: + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - .. include:: /includes/extracts/collection-option-writeConcern.rst - .. include:: /includes/apiargs/MongoDBCollection-method-updateOne-option.rst + .. include:: /includes/extracts/common-option-writeConcern-transaction.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-updateSearchIndex.txt b/docs/reference/method/MongoDBCollection-updateSearchIndex.txt index 2633d3798..bf1659107 100644 --- a/docs/reference/method/MongoDBCollection-updateSearchIndex.txt +++ b/docs/reference/method/MongoDBCollection-updateSearchIndex.txt @@ -21,18 +21,40 @@ Definition .. code-block:: php - function updateSearchIndex(string $name, array|object $definition, array $options = []): void + function updateSearchIndex( + string $name, + array|object $definition, + array $options = [] + ): void - This method has the following parameters: + .. include:: /includes/extracts/note-atlas-search-requirement.rst - .. include:: /includes/apiargs/MongoDBCollection-method-updateSearchIndex-param.rst +Parameters +---------- - The ``$options`` parameter supports the following options: +``$name`` : string + Name of the index to update. - .. include:: /includes/apiargs/MongoDBCollection-method-updateSearchIndex-option.rst +``$definition`` : array|object + Document describing the updated search index definition. The specified + definition replaces the prior definition in the search index. For details on + definition syntax, see + :manual:`Search Index Definition Syntax `. - .. include:: /includes/extracts/note-atlas-search-requirement.rst - .. include:: /includes/extracts/note-atlas-search-async.rst +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst Errors/Exceptions ----------------- @@ -41,6 +63,11 @@ Errors/Exceptions .. include:: /includes/extracts/error-invalidargumentexception.rst .. include:: /includes/extracts/error-driver-runtimeexception.rst +Behavior +-------- + +.. include:: /includes/extracts/note-atlas-search-async.rst + See Also -------- diff --git a/docs/reference/method/MongoDBCollection-watch.txt b/docs/reference/method/MongoDBCollection-watch.txt index 50ef408dc..c54123bd3 100644 --- a/docs/reference/method/MongoDBCollection-watch.txt +++ b/docs/reference/method/MongoDBCollection-watch.txt @@ -22,15 +22,94 @@ Definition .. code-block:: php - function watch(array $pipeline = [], array $options = []): MongoDB\ChangeStream + function watch( + array $pipeline = [], + array $options = [] + ): MongoDB\ChangeStream - This method has the following parameters: +Parameters +---------- + +``$pipeline`` : array|object + The pipeline of stages to append to an initial ``$changeStream`` stage. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - batchSize + - integer + - .. include:: /includes/extracts/watch-option-batchSize.rst + + * - collation + - array|object + - .. include:: /includes/extracts/common-option-collation.rst + + Starting in MongoDB 4.2, defaults to simple binary comparison if + omitted. In earlier versions, change streams opened on a single + collection would inherit the collection's default collation. + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + .. include:: /includes/extracts/common-option-comment-string-before-4.4.rst + + .. versionadded:: 1.13 + + * - fullDocument + - string + - .. include:: /includes/extracts/watch-option-fullDocument.rst + + * - fullDocumentBeforeChange + - string + - .. include:: /includes/extracts/watch-option-fullDocumentBeforeChange.rst + + * - maxAwaitTimeMS + - integer + - .. include:: /includes/extracts/watch-option-maxAwaitTimeMS.rst + + * - readConcern + - :php:`MongoDB\\Driver\\ReadConcern ` + - .. include:: /includes/extracts/collection-option-readConcern.rst + + * - readPreference + - :php:`MongoDB\\Driver\\ReadPreference ` + - .. include:: /includes/extracts/collection-option-readPreference.rst + + This is used for both the initial change stream aggregation and for + server selection during an automatic resume. + + * - resumeAfter + - array|object + - .. include:: /includes/extracts/watch-option-resumeAfter.rst + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst + + * - showExpandedEvents + - boolean + - .. include:: /includes/extracts/watch-option-showExpandedEvents.rst - .. include:: /includes/apiargs/MongoDBCollection-method-watch-param.rst + * - startAfter + - array|object + - .. include:: /includes/extracts/watch-option-startAfter.rst - The ``$options`` parameter supports the following options: + * - startAtOperationTime + - :php:`MongoDB\\BSON\\TimestampInterface ` + - .. include:: /includes/extracts/watch-option-startAtOperationTime.rst - .. include:: /includes/apiargs/MongoDBCollection-method-watch-option.rst + * - typeMap + - array + - .. include:: /includes/extracts/collection-option-typeMap.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-withOptions.txt b/docs/reference/method/MongoDBCollection-withOptions.txt index a68a5fec0..293b093ae 100644 --- a/docs/reference/method/MongoDBCollection-withOptions.txt +++ b/docs/reference/method/MongoDBCollection-withOptions.txt @@ -21,13 +21,41 @@ Definition function withOptions(array $options = []): MongoDB\Collection - This method has the following parameters: - - .. include:: /includes/apiargs/MongoDBCollection-method-withOptions-param.rst - - The ``$options`` parameter supports the following options: +Parameters +---------- - .. include:: /includes/apiargs/MongoDBCollection-method-withOptions-option.rst +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - readConcern + - :php:`MongoDB\\Driver\\ReadConcern ` + - The default read concern to use for collection operations. Defaults to + the original collection's read concern. + + * - readPreference + - :php:`MongoDB\\Driver\\ReadPreference ` + - The default read preference to use for collection operations. Defaults + to the original collection's read preference. + + * - typeMap + - array + - The :php:`type map + ` + to apply to cursors, which determines how BSON documents are converted + to PHP values. Defaults to the original collection's type map. + + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - The default write concern to use for collection operations. Defaults to + the original collection's write concern. Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection__construct.txt b/docs/reference/method/MongoDBCollection__construct.txt index e8077c73f..091735006 100644 --- a/docs/reference/method/MongoDBCollection__construct.txt +++ b/docs/reference/method/MongoDBCollection__construct.txt @@ -19,15 +19,65 @@ Definition .. code-block:: php - function __construct(MongoDB\Driver\Manager $manager, string $databaseName, string $collectionName, array $options = []) + function __construct( + MongoDB\Driver\Manager $manager, + string $databaseName, + string $collectionName, + array $options = [] + ) This constructor has the following parameters: - .. include:: /includes/apiargs/MongoDBCollection-method-construct-param.rst +``$manager`` : :php:`MongoDB\\Driver\\Manager ` + The :php:`Manager ` instance from the driver. The + manager maintains connections between the driver and your MongoDB instances. - The ``$options`` parameter supports the following options: +``$databaseName`` : string + The name of the database. - .. include:: /includes/apiargs/MongoDBCollection-method-construct-option.rst +``$collectionName`` : string + The name of the collection. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - readConcern + - :php:`MongoDB\\Driver\\ReadConcern ` + - The default read concern to use for collection operations. Defaults to + the manager's read concern. + + * - readPreference + - :php:`MongoDB\\Driver\\ReadPreference ` + - The default read preference to use for collection operations. Defaults + to the manager's read preference. + + * - typeMap + - array + - Default :php:`type map + ` + to apply to cursors, which determines how BSON documents are converted + to PHP values. The library uses the following type map by default: + + .. code-block:: php + + [ + 'array' => 'MongoDB\Model\BSONArray', + 'document' => 'MongoDB\Model\BSONDocument', + 'root' => 'MongoDB\Model\BSONDocument', + ] + + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - The default write concern to use for collection operations. Defaults + to the manager's write concern. Errors/Exceptions ----------------- diff --git a/docs/reference/method/MongoDBDatabase-aggregate.txt b/docs/reference/method/MongoDBDatabase-aggregate.txt index a7884bfe1..96d409aea 100644 --- a/docs/reference/method/MongoDBDatabase-aggregate.txt +++ b/docs/reference/method/MongoDBDatabase-aggregate.txt @@ -24,15 +24,105 @@ Definition .. code-block:: php - function aggregate(array $pipeline, array $options = []): Traversable + function aggregate( + array $pipeline, + array $options = [] + ): Traversable - This method has the following parameters: - - .. include:: /includes/apiargs/MongoDBDatabase-method-aggregate-param.rst - - The ``$options`` parameter supports the following options: +Parameters +---------- - .. include:: /includes/apiargs/MongoDBDatabase-method-aggregate-option.rst +``$pipeline`` : array + Specifies an :manual:`aggregation pipeline ` + operation. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - allowDiskUse + - boolean + - Enables writing to temporary files. When set to ``true``, aggregation + stages can write data to the ``_tmp`` sub-directory in the ``dbPath`` + directory. + + * - batchSize + - integer + - Specifies the batch size for the cursor, which will apply to both the + initial ``aggregate`` command and any subsequent ``getMore`` commands. + This determines the maximum number of documents to return in each + response from the server. + + A batchSize of ``0`` is special in that and will only apply to the + initial ``aggregate`` command; subsequent ``getMore`` commands will use + the server's default batch size. This may be useful for quickly + returning a cursor or failure from ``aggregate`` without doing + significant server-side work. + + * - bypassDocumentValidation + - boolean + - If ``true``, allows the write operation to circumvent document level + validation. Defaults to ``false``. + + This only applies when using the :ref:`$out ` and + :ref:`$out ` stages. + + * - collation + - array|object + - .. include:: /includes/extracts/common-option-collation.rst + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + The comment can be any valid BSON type for server versions 4.4 and + above. Earlier server versions only support string values. + + * - explain + - boolean + - Specifies whether or not to return the information on the processing of + the pipeline. + + * - hint + - string|array|object + - .. include:: /includes/extracts/common-option-hint.rst + + * - let + - array|object + - .. include:: /includes/extracts/common-option-let.rst + + .. versionadded:: 1.9 + + * - maxTimeMS + - integer + - .. include:: /includes/extracts/common-option-maxTimeMS.rst + + * - readConcern + - :php:`MongoDB\\Driver\\ReadConcern ` + - .. include:: /includes/extracts/database-option-readConcern.rst + + * - readPreference + - :php:`MongoDB\\Driver\\ReadPreference ` + - .. include:: /includes/extracts/database-option-readPreference.rst + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst + + * - typeMap + - array + - .. include:: /includes/extracts/database-option-typeMap.rst + + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - .. include:: /includes/extracts/database-option-writeConcern.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBDatabase-command.txt b/docs/reference/method/MongoDBDatabase-command.txt index 6853daad8..50ebfe794 100644 --- a/docs/reference/method/MongoDBDatabase-command.txt +++ b/docs/reference/method/MongoDBDatabase-command.txt @@ -21,15 +21,41 @@ Definition .. code-block:: php - function command(array|object $command, array $options = []): MongoDB\Driver\Cursor + function command( + array|object $command, + array $options = [] + ): MongoDB\Driver\Cursor - This method has the following parameters: +Parameters +---------- + +``$command`` : array|object + The :manual:`database command ` document. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - readPreference + - :php:`MongoDB\\Driver\\ReadPreference ` + - .. include:: /includes/extracts/database-option-readPreference.rst - .. include:: /includes/apiargs/MongoDBDatabase-method-command-param.rst + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst - The ``$options`` parameter supports the following options: + .. versionadded:: 1.3 - .. include:: /includes/apiargs/MongoDBDatabase-method-command-option.rst + * - typeMap + - array + - .. include:: /includes/extracts/database-option-typeMap.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBDatabase-createCollection.txt b/docs/reference/method/MongoDBDatabase-createCollection.txt index 56129b975..2351f5d37 100644 --- a/docs/reference/method/MongoDBDatabase-createCollection.txt +++ b/docs/reference/method/MongoDBDatabase-createCollection.txt @@ -19,7 +19,10 @@ Definition .. code-block:: php - function createCollection(string $collectionName, array $options = []): array|object + function createCollection( + string $collectionName, + array $options = [] + ): array|object MongoDB creates collections implicitly when you first reference the collection in a command, such as when inserting a document into a new @@ -33,17 +36,294 @@ Definition :manual:`document validation criteria `, or configure your storage engine or indexing options. - This method has the following parameters: +Parameters +---------- + +``$collectionName`` : string + The name of the collection to create. + +``$options`` : array + An array specifying the desired options. + + .. note:: + + Not all options are available on all versions of MongoDB. Refer to the + :manual:`create ` command reference in the + MongoDB manual for compatibility considerations. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - autoIndexId + - boolean + - 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:: 1.4 + This option has been deprecated since MongoDB 3.2. As of MongoDB + 4.0, this option cannot be ``false`` when creating a replicated + collection (i.e. a collection outside of the ``local`` database in + any mongod mode). + + * - capped + - boolean + - To create a capped collection, specify ``true``. If you specify + ``true``, you must also set a maximum size in the ``size`` option. + + * - changeStreamPreAndPostImages + - document + - Used to configure support for pre- and post-images in change streams. + See the :manual:`create ` command + documentation for more information. + + .. include:: /includes/extracts/option-requires-6.0.rst + + .. versionadded:: 1.13 + + * - clusteredIndex + - document + - A clustered index specification. See + :manual:`Clustered Collections ` or the + :manual:`create ` command documentation for + more information. + + .. include:: /includes/extracts/option-requires-5.3.rst + + .. versionadded:: 1.13 + + * - collation + - array|object + - .. include:: /includes/extracts/common-option-collation.rst + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + .. include:: /includes/extracts/option-requires-4.4.rst + + .. versionadded:: 1.13 + + * - encryptedFields + - document + - A document describing encrypted fields for queryable encryption. If + omitted, the ``encryptedFieldsMap`` option within the + ``autoEncryption`` driver option will be consulted. See + `Field Encryption and Queryability `_ + in the MongoDB manual for more information. + + .. include:: /includes/extracts/option-requires-7.0.rst + + .. versionadded:: 1.13 + + * - expireAfterSeconds + - integer + - Used to automatically delete documents in time series collections. See + the :manual:`create ` command documentation + for more information. + + .. include:: /includes/extracts/option-requires-5.0.rst + + .. versionadded:: 1.9 + + * - flags + - integer + - Available for the MMAPv1 storage engine only to set the + ``usePowerOf2Sizes`` and ``noPadding`` flags. + + The library provides constants that you can combine with a + :php:`bitwise OR operator ` 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 ` and + :manual:`db.createCollection() + ` for more information. + + * - indexOptionDefaults + - array|object + - 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: + + .. code-block:: none + + { : } + + 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. + + * - max + - integer + - 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. + + * - maxTimeMS + - integer + - .. include:: /includes/extracts/common-option-maxTimeMS.rst + + * - pipeline + - array + - An array that consists of the aggregation pipeline stage(s), which will + be applied to the collection or view specified by ``viewOn``. See the + :manual:`create ` command documentation for + more information. + + .. versionadded:: 1.13 + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst + + .. versionadded:: 1.3 + + * - size + - integer + - 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. + + * - storageEngine + - array|object + - 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: + + .. code-block:: none + + { : } + + 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. + + * - timeseries + - array|object + - An object containing options for creating time series collections. See + the :manual:`create ` command documentation + for supported options. + + .. include:: /includes/extracts/option-requires-5.0.rst + + .. versionadded:: 1.9 + + * - typeMap + - array + - .. include:: /includes/extracts/database-option-typeMap.rst + + This will be used for the returned command result document. + + * - validationAction + - string + - 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. + + * - validationLevel + - string + - 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. + + * - validator + - array|object + - Allows users to specify :manual:`validation rules or expressions + ` for the collection. For more information, + see :manual:`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 ` 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. + + * - viewOn + - string + - The name of the source collection or view from which to create the view. - .. include:: /includes/apiargs/MongoDBDatabase-method-createCollection-param.rst + .. note:: - The ``$options`` parameter supports the following options: + The name is not the full namespace of the collection or view (i.e. + it does not include the database name). Views must be created in the + same databases as the source collection or view. - .. include:: /includes/apiargs/MongoDBDatabase-method-createCollection-option.rst + .. versionadded:: 1.13 - Note that not all options are available on all versions of MongoDB. Refer to - the :manual:`create ` command reference in the - MongoDB manual for compatibility considerations. + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - .. include:: /includes/extracts/database-option-writeConcern.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBDatabase-createEncryptedCollection.txt b/docs/reference/method/MongoDBDatabase-createEncryptedCollection.txt index 64c643f03..390f99c68 100644 --- a/docs/reference/method/MongoDBDatabase-createEncryptedCollection.txt +++ b/docs/reference/method/MongoDBDatabase-createEncryptedCollection.txt @@ -21,7 +21,13 @@ Definition .. code-block:: php - function createEncryptedCollection(string $collectionName, MongoDB\Driver\ClientEncryption $clientEncryption, string $kmsProvider, ?array $masterKey, array $options): array + function createEncryptedCollection( + string $collectionName, + MongoDB\Driver\ClientEncryption $clientEncryption, + string $kmsProvider, + ?array $masterKey, + array $options + ): array This method will automatically create data keys for any encrypted fields where ``keyId`` is ``null``. Data keys will be created using @@ -34,13 +40,33 @@ Definition :phpclass:`MongoDB\\Client` objects. Users must configure auto encryption after creating the encrypted collection with ``createEncryptedCollection()``. - This method has the following parameters: +Parameters +---------- + +``$collectionName`` : string + The name of the encrypted collection to create. + +``$clientEncryption`` : :php:`MongoDB\\Driver\\ClientEncryption ` + The ClientEncryption object used to create data keys. + +``$kmsProvider`` : string + KMS provider (e.g. "local", "aws") that will be used to encrypt new data keys. + This corresponds to the ``$kmsProvider`` parameter for + :php:`MongoDB\\Driver\\ClientEncryption::createDataKey() `. + +``$masterKey`` : array|null + KMS-specific key options that will be used to encrypt new data keys. This + corresponds to the ``masterKey`` option for + :php:`MongoDB\\Driver\\ClientEncryption::createDataKey() `. + + If ``$kmsProvider`` is "local", this should be ``null``. - .. include:: /includes/apiargs/MongoDBDatabase-method-createEncryptedCollection-param.rst +``$options`` : array + An array specifying the desired options. - The ``$options`` parameter supports the same options as - :phpmethod:`MongoDB\\Database::createCollection()`. The ``encryptedFields`` - option is required. + The ``$options`` parameter supports the same options as + :phpmethod:`MongoDB\\Database::createCollection()`. The ``encryptedFields`` + option is required. Return Values ------------- diff --git a/docs/reference/method/MongoDBDatabase-drop.txt b/docs/reference/method/MongoDBDatabase-drop.txt index eae1bb6b8..457fad1ae 100644 --- a/docs/reference/method/MongoDBDatabase-drop.txt +++ b/docs/reference/method/MongoDBDatabase-drop.txt @@ -21,13 +21,43 @@ Definition function drop(array $options = []): array|object - This method has the following parameters: +Parameters +---------- + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + .. include:: /includes/extracts/option-requires-4.4.rst + + .. versionadded:: 1.13 + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst + + .. versionadded:: 1.3 - .. include:: /includes/apiargs/MongoDBDatabase-method-drop-param.rst + * - typeMap + - array + - .. include:: /includes/extracts/database-option-typeMap.rst - The ``$options`` parameter supports the following options: + This will be used for the returned command result document. - .. include:: /includes/apiargs/MongoDBDatabase-method-drop-option.rst + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - .. include:: /includes/extracts/database-option-writeConcern.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBDatabase-dropCollection.txt b/docs/reference/method/MongoDBDatabase-dropCollection.txt index 028e63f00..018f3ccaf 100644 --- a/docs/reference/method/MongoDBDatabase-dropCollection.txt +++ b/docs/reference/method/MongoDBDatabase-dropCollection.txt @@ -19,15 +19,71 @@ Definition .. code-block:: php - function dropCollection(string $collectionName, array $options = []): array|object + function dropCollection( + string $collectionName, + array $options = [] + ): array|object - This method has the following parameters: +Parameters +---------- + +``$collectionName`` : string + The name of the collection to drop. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + .. include:: /includes/extracts/option-requires-4.4.rst + + .. versionadded:: 1.13 + + * - encryptedFields + - array|object + - A document describing encrypted fields for queryable encryption. If + omitted, the ``encryptedFieldsMap`` option within the + ``autoEncryption`` driver option will be consulted. If + ``encryptedFieldsMap`` was defined but does not specify this + collection, the library will make a final attempt to consult the + server-side value for ``encryptedFields``. See + `Field Encryption and Queryability `_ + in the MongoDB manual for more information. + + .. note:: + + This option is not passed to the + :manual:`drop ` command. The library uses + it to determine related metadata collections that should be dropped + in addition to an encrypted collection. + + .. versionadded:: 1.13 + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst + + .. versionadded:: 1.3 - .. include:: /includes/apiargs/MongoDBDatabase-method-dropCollection-param.rst + * - typeMap + - array + - .. include:: /includes/extracts/database-option-typeMap.rst - The ``$options`` parameter supports the following options: + This will be used for the returned command result document. - .. include:: /includes/apiargs/MongoDBDatabase-method-dropCollection-option.rst + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - .. include:: /includes/extracts/database-option-writeConcern.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBDatabase-listCollectionNames.txt b/docs/reference/method/MongoDBDatabase-listCollectionNames.txt index b6eaa4ce5..53814f729 100644 --- a/docs/reference/method/MongoDBDatabase-listCollectionNames.txt +++ b/docs/reference/method/MongoDBDatabase-listCollectionNames.txt @@ -23,13 +23,53 @@ Definition function listCollectionNames(array $options = []): Iterator - This method has the following parameters: +Parameters +---------- + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - authorizedCollections + - boolean + - A flag that determines which collections are returned based on the user + privileges when access control is enabled. For more information, see + the :manual:`listCollections ` + command documentation. + + For servers < 4.0, this option is ignored. + + .. versionadded:: 1.12 + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + .. include:: /includes/extracts/option-requires-4.4.rst + + .. versionadded:: 1.13 + + * - filter + - array|object + - A query expression to filter the list of collections. - .. include:: /includes/apiargs/MongoDBDatabase-method-listCollections-param.rst + You can specify a query expression for collection fields (e.g. + ``name``, ``options``). - The ``$options`` parameter supports the following options: + * - maxTimeMS + - integer + - .. include:: /includes/extracts/common-option-maxTimeMS.rst - .. include:: /includes/apiargs/MongoDBDatabase-method-listCollections-option.rst + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBDatabase-listCollections.txt b/docs/reference/method/MongoDBDatabase-listCollections.txt index 421b6cab4..d66b6a5f3 100644 --- a/docs/reference/method/MongoDBDatabase-listCollections.txt +++ b/docs/reference/method/MongoDBDatabase-listCollections.txt @@ -21,13 +21,55 @@ Definition function listCollections(array $options = []): MongoDB\Model\CollectionInfoIterator - This method has the following parameters: +Parameters +---------- + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - authorizedCollections + - boolean + - A flag that determines which collections are returned based on the user + privileges when access control is enabled. For more information, see + the :manual:`listCollections ` + command documentation. + + For servers < 4.0, this option is ignored. + + .. versionadded:: 1.12 + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + .. include:: /includes/extracts/option-requires-4.4.rst + + .. versionadded:: 1.13 + + * - filter + - array|object + - A query expression to filter the list of collections. + + You can specify a query expression for collection fields (e.g. + ``name``, ``options``). - .. include:: /includes/apiargs/MongoDBDatabase-method-listCollections-param.rst + * - maxTimeMS + - integer + - .. include:: /includes/extracts/common-option-maxTimeMS.rst - The ``$options`` parameter supports the following options: + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst - .. include:: /includes/apiargs/MongoDBDatabase-method-listCollections-option.rst + .. versionadded:: 1.3 Return Values ------------- diff --git a/docs/reference/method/MongoDBDatabase-modifyCollection.txt b/docs/reference/method/MongoDBDatabase-modifyCollection.txt index 86c1ff523..0a756b015 100644 --- a/docs/reference/method/MongoDBDatabase-modifyCollection.txt +++ b/docs/reference/method/MongoDBDatabase-modifyCollection.txt @@ -22,15 +22,53 @@ Definition .. code-block:: php - function modifyCollection(string $collectionName, array $collectionOptions, array $options = []): array|object + function modifyCollection( + string $collectionName, + array $collectionOptions, + array $options = [] + ): array|object - This method has the following parameters: +Parameters +---------- + +``$collectionName`` : string + The name of the collection or view to modify. + +``$collectionOptions`` : array + Collection or view options to assign. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + .. include:: /includes/extracts/option-requires-4.4.rst + + .. versionadded:: 1.13 + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst - .. include:: /includes/apiargs/MongoDBDatabase-method-modifyCollection-param.rst + * - typeMap + - array + - .. include:: /includes/extracts/database-option-typeMap.rst - The ``$options`` parameter supports the following options: + This will be used for the returned command result document. - .. include:: /includes/apiargs/MongoDBDatabase-method-modifyCollection-option.rst + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - .. include:: /includes/extracts/database-option-writeConcern.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBDatabase-renameCollection.txt b/docs/reference/method/MongoDBDatabase-renameCollection.txt index 8bbe5b8e9..778dc10ad 100644 --- a/docs/reference/method/MongoDBDatabase-renameCollection.txt +++ b/docs/reference/method/MongoDBDatabase-renameCollection.txt @@ -21,15 +21,65 @@ Definition .. code-block:: php - function renameCollection(string $fromCollectionName, string $toCollectionName, ?string $toDatabaseName = null, array $options = []): array|object + function renameCollection( + string $fromCollectionName, + string $toCollectionName, + ?string $toDatabaseName = null, + array $options = [] + ): array|object + +Parameters +---------- + +``$fromCollectionName`` : string + The name of the collection to rename. + +``$toCollectionName`` : string + The new name of the collection. + +``$toDatabaseName`` : string + The new database name of the collection. If a new database name is not + specified, the current database will be used. If the new name specifies a + different database, the command copies the collection to the new database + and drops the source collection. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + .. include:: /includes/extracts/option-requires-4.4.rst + + .. versionadded:: 1.13 + + * - dropTarget + - boolean + - If ``true``, MongoDB will drop the target before renaming the + collection. The default value is ``false``. - This method has the following parameters: + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst - .. include:: /includes/apiargs/MongoDBDatabase-method-renameCollection-param.rst + * - typeMap + - array + - .. include:: /includes/extracts/database-option-typeMap.rst - The ``$options`` parameter supports the following options: + This will be used for the returned command result document. - .. include:: /includes/apiargs/MongoDBDatabase-method-renameCollection-option.rst + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - .. include:: /includes/extracts/database-option-writeConcern.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBDatabase-selectCollection.txt b/docs/reference/method/MongoDBDatabase-selectCollection.txt index 148854100..887d4a4d7 100644 --- a/docs/reference/method/MongoDBDatabase-selectCollection.txt +++ b/docs/reference/method/MongoDBDatabase-selectCollection.txt @@ -19,15 +19,47 @@ Definition .. code-block:: php - function selectCollection(string $collectionName, array $options = []): MongoDB\Collection + function selectCollection( + string $collectionName, + array $options = [] + ): MongoDB\Collection - This method has the following parameters: +Parameters +---------- + +``$collectionName`` : string + The name of the collection to select. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - readConcern + - :php:`MongoDB\\Driver\\ReadConcern ` + - The default read concern to use for collection operations. Defaults to + the database's read concern. - .. include:: /includes/apiargs/MongoDBDatabase-method-selectCollection-param.rst + * - readPreference + - :php:`MongoDB\\Driver\\ReadPreference ` + - The default read preference to use for collection operations. Defaults + to the database's read preference. - The ``$options`` parameter supports the following options: + * - typeMap + - array + - The default type map to use for collection operations. Defaults to the + database's type map. - .. include:: /includes/apiargs/MongoDBDatabase-method-selectCollection-option.rst + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - The default write concern to use for collection operations. Defaults to + the database's write concern. Return Values ------------- diff --git a/docs/reference/method/MongoDBDatabase-selectGridFSBucket.txt b/docs/reference/method/MongoDBDatabase-selectGridFSBucket.txt index f93906276..0d115d9b9 100644 --- a/docs/reference/method/MongoDBDatabase-selectGridFSBucket.txt +++ b/docs/reference/method/MongoDBDatabase-selectGridFSBucket.txt @@ -21,13 +21,56 @@ Definition function selectGridFSBucket(array $options = []): MongoDB\GridFS\Bucket - This method has the following parameters: +Parameters +---------- + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - bucketName + - string + - The bucket name, which will be used as a prefix for the files and + chunks collections. Defaults to ``"fs"``. + + * - chunkSizeBytes + - integer + - The chunk size in bytes. Defaults to ``261120`` (i.e. 255 KiB). + + * - disableMD5 + - boolean + - Whether to disable automatic MD5 generation when storing files. + + Defaults to ``false``. + + .. versionadded: 1.4 + + * - readConcern + - :php:`MongoDB\\Driver\\ReadConcern ` + - The default read concern to use for bucket operations. Defaults to the + database's read concern. - .. include:: /includes/apiargs/MongoDBDatabase-method-selectGridFSBucket-param.rst + * - readPreference + - :php:`MongoDB\\Driver\\ReadPreference ` + - The default read preference to use for bucket operations. Defaults to + the database's read concern. - The ``$options`` parameter supports the following options: + * - typeMap + - array + - The default type map to use for bucket operations. Defaults to the + database's type map. - .. include:: /includes/apiargs/MongoDBDatabase-method-selectGridFSBucket-option.rst + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - The default write concern to use for bucket operations. Defaults to the + database's write concern. Return Values ------------- diff --git a/docs/reference/method/MongoDBDatabase-watch.txt b/docs/reference/method/MongoDBDatabase-watch.txt index 7ff19b73a..c79656ecb 100644 --- a/docs/reference/method/MongoDBDatabase-watch.txt +++ b/docs/reference/method/MongoDBDatabase-watch.txt @@ -22,15 +22,90 @@ Definition .. code-block:: php - function watch(array $pipeline = [], array $options = []): MongoDB\ChangeStream + function watch( + array $pipeline = [], + array $options = [] + ): MongoDB\ChangeStream - This method has the following parameters: +Parameters +---------- + +``$pipeline`` : array|object + The pipeline of stages to append to an initial ``$changeStream`` stage. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - batchSize + - integer + - .. include:: /includes/extracts/watch-option-batchSize.rst + + * - collation + - array|object + - .. include:: /includes/extracts/common-option-collation.rst + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + .. include:: /includes/extracts/common-option-comment-string-before-4.4.rst + + .. versionadded:: 1.13 + + * - fullDocument + - string + - .. include:: /includes/extracts/watch-option-fullDocument.rst + + * - fullDocumentBeforeChange + - string + - .. include:: /includes/extracts/watch-option-fullDocumentBeforeChange.rst + + * - maxAwaitTimeMS + - integer + - .. include:: /includes/extracts/watch-option-maxAwaitTimeMS.rst + + * - readConcern + - :php:`MongoDB\\Driver\\ReadConcern ` + - .. include:: /includes/extracts/database-option-readConcern.rst + + * - readPreference + - :php:`MongoDB\\Driver\\ReadPreference ` + - .. include:: /includes/extracts/database-option-readPreference.rst + + This is used for both the initial change stream aggregation and for + server selection during an automatic resume. + + * - resumeAfter + - array|object + - .. include:: /includes/extracts/watch-option-resumeAfter.rst + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst + + * - showExpandedEvents + - boolean + - .. include:: /includes/extracts/watch-option-showExpandedEvents.rst - .. include:: /includes/apiargs/MongoDBDatabase-method-watch-param.rst + * - startAfter + - array|object + - .. include:: /includes/extracts/watch-option-startAfter.rst - The ``$options`` parameter supports the following options: + * - startAtOperationTime + - :php:`MongoDB\\BSON\\TimestampInterface ` + - .. include:: /includes/extracts/watch-option-startAtOperationTime.rst - .. include:: /includes/apiargs/MongoDBDatabase-method-watch-option.rst + * - typeMap + - array + - .. include:: /includes/extracts/database-option-typeMap.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBDatabase-withOptions.txt b/docs/reference/method/MongoDBDatabase-withOptions.txt index 6f732eacc..fc5d88ec8 100644 --- a/docs/reference/method/MongoDBDatabase-withOptions.txt +++ b/docs/reference/method/MongoDBDatabase-withOptions.txt @@ -21,13 +21,41 @@ Definition function withOptions(array $options = []): MongoDB\Database - This method has the following parameters: - - .. include:: /includes/apiargs/MongoDBDatabase-method-withOptions-param.rst - - The ``$options`` parameter supports the following options: +Parameters +---------- - .. include:: /includes/apiargs/MongoDBDatabase-method-withOptions-option.rst +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - readConcern + - :php:`MongoDB\\Driver\\ReadConcern ` + - The default read concern to use for database operations. Defaults to + the original database's read concern. + + * - readPreference + - :php:`MongoDB\\Driver\\ReadPreference ` + - The default read preference to use for database operations. Defaults to + the original database's read preference. + + * - typeMap + - array + - The :php:`type map + ` + to apply to cursors, which determines how BSON documents are converted + to PHP values. Defaults to the original database's type map. + + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - The default write concern to use for database operations. Defaults to + the original database's write concern. Return Values ------------- diff --git a/docs/reference/method/MongoDBDatabase__construct.txt b/docs/reference/method/MongoDBDatabase__construct.txt index 2d3e7f57b..0a715e994 100644 --- a/docs/reference/method/MongoDBDatabase__construct.txt +++ b/docs/reference/method/MongoDBDatabase__construct.txt @@ -19,15 +19,62 @@ Definition .. code-block:: php - function __construct(MongoDB\Driver\Manager $manager, $databaseName, array $options = []) + function __construct( + MongoDB\Driver\Manager $manager, + string $databaseName, + array $options = [] + ) - This constructor has the following parameters: - - .. include:: /includes/apiargs/MongoDBDatabase-method-construct-param.rst - - The ``$options`` parameter supports the following options: +Parameters +---------- - .. include:: /includes/apiargs/MongoDBDatabase-method-construct-option.rst +``$manager`` : :php:`MongoDB\\Driver\\Manager ` + The :php:`Manager ` instance from the driver. The + manager maintains connections between the driver and your MongoDB instances. + +``$databaseName`` : string + The name of the database. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - readConcern + - :php:`MongoDB\\Driver\\ReadConcern ` + - The default read concern to use for database operations. Defaults to + the manager's read concern. + + * - readPreference + - :php:`MongoDB\\Driver\\ReadPreference ` + - The default read preference to use for database operations. Defaults to + the manager's read preference. + + * - typeMap + - array + - Default :php:`type map + ` + to apply to cursors, which determines how BSON documents are converted + to PHP values. The library uses the following type map by default: + + .. code-block:: php + + [ + 'array' => 'MongoDB\Model\BSONArray', + 'document' => 'MongoDB\Model\BSONDocument', + 'root' => 'MongoDB\Model\BSONDocument', + ] + + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - The default write concern to use for database operations. Defaults to + the manager's write concern. Errors/Exceptions ----------------- diff --git a/docs/reference/method/MongoDBDatabase__get.txt b/docs/reference/method/MongoDBDatabase__get.txt index 53cef6f9d..c888a7161 100644 --- a/docs/reference/method/MongoDBDatabase__get.txt +++ b/docs/reference/method/MongoDBDatabase__get.txt @@ -21,9 +21,11 @@ Definition function __get(string $collectionName): MongoDB\Collection - This method has the following parameters: +Parameters +---------- - .. include:: /includes/apiargs/MongoDBDatabase-method-get-param.rst +``$collectionName`` : string + The name of the database to select. Return Values ------------- diff --git a/docs/reference/method/MongoDBGridFSBucket-delete.txt b/docs/reference/method/MongoDBGridFSBucket-delete.txt index b063337e7..731fb4e4d 100644 --- a/docs/reference/method/MongoDBGridFSBucket-delete.txt +++ b/docs/reference/method/MongoDBGridFSBucket-delete.txt @@ -21,9 +21,11 @@ Definition function delete($id): void - This method has the following parameters: +Parameters +---------- - .. include:: /includes/apiargs/MongoDBGridFSBucket-method-delete-param.rst +``$id`` : mixed + The ``_id`` of the file to delete. Errors/Exceptions ----------------- diff --git a/docs/reference/method/MongoDBGridFSBucket-downloadToStream.txt b/docs/reference/method/MongoDBGridFSBucket-downloadToStream.txt index 2f2aa5da1..917f03b55 100644 --- a/docs/reference/method/MongoDBGridFSBucket-downloadToStream.txt +++ b/docs/reference/method/MongoDBGridFSBucket-downloadToStream.txt @@ -22,9 +22,14 @@ Definition function downloadToStream($id, $destination): void - This method has the following parameters: +Parameters +---------- + +``$id`` : mixed + The ``_id`` of the file to download. - .. include:: /includes/apiargs/MongoDBGridFSBucket-method-downloadToStream-param.rst +``$destination`` : resource + Writable stream, to which the GridFS file's contents will be written. Errors/Exceptions ----------------- diff --git a/docs/reference/method/MongoDBGridFSBucket-downloadToStreamByName.txt b/docs/reference/method/MongoDBGridFSBucket-downloadToStreamByName.txt index acc236f57..8bd4a1d65 100644 --- a/docs/reference/method/MongoDBGridFSBucket-downloadToStreamByName.txt +++ b/docs/reference/method/MongoDBGridFSBucket-downloadToStreamByName.txt @@ -20,15 +20,47 @@ Definition .. code-block:: php - function downloadToStreamByName(string $filename, resource $destination, array $options = []): void + function downloadToStreamByName( + string $filename, + resource $destination, + array $options = [] + ): void - This method has the following parameters: +Parameters +---------- + +``$filename`` : string + The ``filename`` of the file to download. + +``$destination`` : resource + Writable stream, to which the GridFS file's contents will be written. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - revision + - integer + - The revision of the file to retrieve. Files with the same ``filename`` + will be differentiated by their ``uploadDate`` field. - .. include:: /includes/apiargs/MongoDBGridFSBucket-method-downloadToStreamByName-param.rst + Revision numbers are defined as follows: - The ``$options`` parameter supports the following options: + - 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 - .. include:: /includes/apiargs/MongoDBGridFSBucket-method-downloadToStreamByName-option.rst + Defaults to -1 (i.e. the most recent revision). Errors/Exceptions ----------------- diff --git a/docs/reference/method/MongoDBGridFSBucket-find.txt b/docs/reference/method/MongoDBGridFSBucket-find.txt index e0a4e6621..d112dd668 100644 --- a/docs/reference/method/MongoDBGridFSBucket-find.txt +++ b/docs/reference/method/MongoDBGridFSBucket-find.txt @@ -19,15 +19,205 @@ Definition .. code-block:: php - function find(array|object $filter = [], array $options = []): MongoDB\Driver\Cursor + function find( + array|object $filter = [], + array $options = [] + ): MongoDB\Driver\Cursor - This method has the following parameters: +Parameters +---------- + +``$filter`` : array|object + The filter criteria that specifies the documents to query. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - allowDiskUse + - boolean + - Enables writing to temporary files. When set to ``true``, queries can + write data to the ``_tmp`` sub-directory in the ``dbPath`` directory. + + * - allowPartialResults + - boolean + - For queries against a sharded collection, returns partial results from + the :program:`mongos` if some shards are unavailable instead of + throwing an error. + + * - batchSize + - integer + - 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. + + * - collation + - array|object + - .. include:: /includes/extracts/common-option-collation.rst + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + .. include:: /includes/extracts/common-option-comment-string-before-4.4.rst + + * - cursorType + - integer + - Indicates the type of cursor to use. ``cursorType`` supports the + following values: + + - ``MongoDB\Operation\Find::NON_TAILABLE`` (*default*) + - ``MongoDB\Operation\Find::TAILABLE`` + + * - hint + - string|array|object + - .. include:: /includes/extracts/common-option-hint.rst + + .. versionadded:: 1.2 + + * - let + - array|object + - .. include:: /includes/extracts/common-option-let.rst + + .. versionadded:: 1.13 + + * - limit + - integer + - 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. + + * - max + - array|object + - The exclusive upper bound for a specific index. + + .. versionadded:: 1.2 + + * - maxAwaitTimeMS + - integer + - 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 + + * - maxScan + - integer + - Maximum number of documents or index keys to scan when executing the + query. + + .. deprecated:: 1.4 + .. versionadded:: 1.2 + + * - maxTimeMS + - integer + - .. include:: /includes/extracts/common-option-maxTimeMS.rst + + * - min + - array|object + - The inclusive lower bound for a specific index. + + .. versionadded:: 1.2 + + * - modifiers + - array|object + - :manual:`Meta operators ` that + modify the output or behavior of a query. Use of these operators is + deprecated in favor of named options. + + * - noCursorTimeout + - boolean + - Prevents the server from timing out idle cursors after an inactivity + period (10 minutes). + + * - oplogReplay + - boolean + - Internal use for replica sets. To use ``oplogReplay``, you must include + the following condition in the filter: + + .. code-block:: javascript + + { ts: { $gte: } } + + The :php:`MongoDB\\BSON\\Timestamp ` + class reference describes how to represent MongoDB's BSON timestamp + type with PHP. + + .. deprecated:: 1.7 + + * - projection + - array|object + - The :ref:`projection specification ` to determine which + fields to include in the returned documents. See + :manual:`Project Fields to Return from Query ` + and :manual:`Projection Operators ` in + the MongoDB manual. + + * - readConcern + - :php:`MongoDB\\Driver\\ReadConcern ` + - .. include:: /includes/extracts/bucket-option-readConcern.rst + + .. include:: /includes/extracts/common-option-readConcern-transaction.rst + + * - readPreference + - :php:`MongoDB\\Driver\\ReadPreference ` + - .. include:: /includes/extracts/bucket-option-readPreference.rst + + * - returnKey + - boolean + - If true, returns only the index keys in the resulting documents. + + .. versionadded:: 1.2 + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst + + .. versionadded:: 1.3 + + * - showRecordId + - boolean + - Determines whether to return the record identifier for each document. + If true, adds a field ``$recordId`` to the returned documents. + + .. versionadded:: 1.2 + + * - skip + - integer + - Number of documents to skip. Defaults to ``0``. + + * - sort + - array|object + - The sort specification for the ordering of the results. - .. include:: /includes/apiargs/MongoDBCollection-method-find-param.rst + * - snapshot + - boolean + - Prevents the cursor from returning a document more than once because of + an intervening write operation. - The ``$options`` parameter supports the following options: + .. deprecated:: 1.4 + .. versionadded:: 1.2 - .. include:: /includes/apiargs/MongoDBGridFSBucket-method-find-option.rst + * - typeMap + - array + - .. include:: /includes/extracts/bucket-option-typeMap.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBGridFSBucket-findOne.txt b/docs/reference/method/MongoDBGridFSBucket-findOne.txt index f126448d9..1ff9f2588 100644 --- a/docs/reference/method/MongoDBGridFSBucket-findOne.txt +++ b/docs/reference/method/MongoDBGridFSBucket-findOne.txt @@ -20,15 +20,156 @@ Definition .. code-block:: php - function findOne(array|object $filter = [], array $options = []): array|object|null + function findOne( + array|object $filter = [], + array $options = [] + ): array|object|null - This method has the following parameters: +Parameters +---------- + +``$filter`` : array|object + The filter criteria that specifies the documents to query. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - allowDiskUse + - boolean + - Enables writing to temporary files. When set to ``true``, queries can + write data to the ``_tmp`` sub-directory in the ``dbPath`` directory. + + * - allowPartialResults + - boolean + - For queries against a sharded collection, returns partial results from + the :program:`mongos` if some shards are unavailable instead of + throwing an error. + + * - collation + - array|object + - .. include:: /includes/extracts/common-option-collation.rst + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + .. include:: /includes/extracts/common-option-comment-string-before-4.4.rst + + * - hint + - string|array|object + - .. include:: /includes/extracts/common-option-hint.rst + + .. versionadded:: 1.2 + + * - let + - array|object + - .. include:: /includes/extracts/common-option-let.rst + + .. versionadded:: 1.13 + + * - max + - array|object + - The exclusive upper bound for a specific index. + + .. versionadded:: 1.2 + + * - maxScan + - integer + - Maximum number of documents or index keys to scan when executing the + query. + + .. deprecated:: 1.4 + .. versionadded:: 1.2 + + * - maxTimeMS + - integer + - .. include:: /includes/extracts/common-option-maxTimeMS.rst + + * - min + - array|object + - The inclusive lower bound for a specific index. + + .. versionadded:: 1.2 + + * - modifiers + - array|object + - :manual:`Meta operators ` that + modify the output or behavior of a query. Use of these operators is + deprecated in favor of named options. + + * - oplogReplay + - boolean + - Internal use for replica sets. To use ``oplogReplay``, you must include + the following condition in the filter: + + .. code-block:: javascript + + { ts: { $gte: } } + + The :php:`MongoDB\\BSON\\Timestamp ` + class reference describes how to represent MongoDB's BSON timestamp + type with PHP. + + .. deprecated:: 1.7 + + * - projection + - array|object + - The :ref:`projection specification ` to determine which + fields to include in the returned documents. See + :manual:`Project Fields to Return from Query ` + and :manual:`Projection Operators ` in + the MongoDB manual. + + * - readConcern + - :php:`MongoDB\\Driver\\ReadConcern ` + - .. include:: /includes/extracts/bucket-option-readConcern.rst + + .. include:: /includes/extracts/common-option-readConcern-transaction.rst + + * - readPreference + - :php:`MongoDB\\Driver\\ReadPreference ` + - .. include:: /includes/extracts/bucket-option-readPreference.rst + + * - returnKey + - boolean + - If true, returns only the index keys in the resulting documents. + + .. versionadded:: 1.2 + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst + + .. versionadded:: 1.3 + + * - showRecordId + - boolean + - Determines whether to return the record identifier for each document. + If true, adds a field ``$recordId`` to the returned documents. + + .. versionadded:: 1.2 + + * - skip + - integer + - Number of documents to skip. Defaults to ``0``. - .. include:: /includes/apiargs/MongoDBCollection-method-findOne-param.rst + * - sort + - array|object + - The sort specification for the ordering of the results. - The ``$options`` parameter supports the following options: + * - typeMap + - array + - .. include:: /includes/extracts/bucket-option-typeMap.rst - .. include:: /includes/apiargs/MongoDBGridFSBucket-method-findOne-option.rst + This will be used for the returned result document. Return Values ------------- diff --git a/docs/reference/method/MongoDBGridFSBucket-getFileDocumentForStream.txt b/docs/reference/method/MongoDBGridFSBucket-getFileDocumentForStream.txt index f8d633ed2..fa8625f9d 100644 --- a/docs/reference/method/MongoDBGridFSBucket-getFileDocumentForStream.txt +++ b/docs/reference/method/MongoDBGridFSBucket-getFileDocumentForStream.txt @@ -21,9 +21,11 @@ Definition function getFileDocumentForStream(resource $stream): array|object - This method has the following parameters: +Parameters +---------- - .. include:: /includes/apiargs/MongoDBGridFSBucket-method-getFileDocumentForStream-param.rst +``$stream`` : resource + The GridFS stream resource. Return Values ------------- diff --git a/docs/reference/method/MongoDBGridFSBucket-getFileIdForStream.txt b/docs/reference/method/MongoDBGridFSBucket-getFileIdForStream.txt index f88dc885a..b42ab19b3 100644 --- a/docs/reference/method/MongoDBGridFSBucket-getFileIdForStream.txt +++ b/docs/reference/method/MongoDBGridFSBucket-getFileIdForStream.txt @@ -21,9 +21,11 @@ Definition function getFileIdForStream(resource $stream): mixed - This method has the following parameters: +Parameters +---------- - .. include:: /includes/apiargs/MongoDBGridFSBucket-method-getFileIdForStream-param.rst +``$stream`` : resource + The GridFS stream resource. Return Values ------------- diff --git a/docs/reference/method/MongoDBGridFSBucket-openDownloadStream.txt b/docs/reference/method/MongoDBGridFSBucket-openDownloadStream.txt index 85f2150a3..9118cecc7 100644 --- a/docs/reference/method/MongoDBGridFSBucket-openDownloadStream.txt +++ b/docs/reference/method/MongoDBGridFSBucket-openDownloadStream.txt @@ -21,9 +21,11 @@ Definition function openDownloadStream($id): resource - This method has the following parameters: +Parameters +---------- - .. include:: /includes/apiargs/MongoDBGridFSBucket-method-openDownloadStream-param.rst +``$id`` : mixed + The ``_id`` of the file to download. Return Values ------------- diff --git a/docs/reference/method/MongoDBGridFSBucket-openDownloadStreamByName.txt b/docs/reference/method/MongoDBGridFSBucket-openDownloadStreamByName.txt index cb3a336ee..4c0b525dd 100644 --- a/docs/reference/method/MongoDBGridFSBucket-openDownloadStreamByName.txt +++ b/docs/reference/method/MongoDBGridFSBucket-openDownloadStreamByName.txt @@ -19,15 +19,43 @@ Definition .. code-block:: php - function openDownloadStreamByName(string $filename, array $options = []): resource + function openDownloadStreamByName( + string $filename, + array $options = [] + ): resource - This method has the following parameters: +Parameters +---------- + +``$filename`` : string + The ``filename`` of the file to download. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - revision + - integer + - The revision of the file to retrieve. Files with the same ``filename`` + will be differentiated by their ``uploadDate`` field. - .. include:: /includes/apiargs/MongoDBGridFSBucket-method-openDownloadStreamByName-param.rst + Revision numbers are defined as follows: - The ``$options`` parameter supports the following options: + - 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 - .. include:: /includes/apiargs/MongoDBGridFSBucket-method-openDownloadStreamByName-option.rst + Defaults to -1 (i.e. the most recent revision). Return Values ------------- diff --git a/docs/reference/method/MongoDBGridFSBucket-openUploadStream.txt b/docs/reference/method/MongoDBGridFSBucket-openUploadStream.txt index 348b325f4..2870b5445 100644 --- a/docs/reference/method/MongoDBGridFSBucket-openUploadStream.txt +++ b/docs/reference/method/MongoDBGridFSBucket-openUploadStream.txt @@ -19,15 +19,50 @@ Definition .. code-block:: php - function openUploadStream(string $filename, array $options = []): resource + function openUploadStream( + string $filename, + array $options = [] + ): resource - This method has the following parameters: +Parameters +---------- + +``$filename`` : string + The ``filename`` of the file to create. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - _id + - mixed + - Value to use as the file document identifier. Defaults to a new + :php:`MongoDB\\BSON\\ObjectId ` object. + + * - chunkSizeBytes + - integer + - The chunk size in bytes. Defaults to the bucket's ``chunkSizeBytes`` + option. + + * - disableMD5 + - boolean + - Whether to disable automatic MD5 generation when storing files. - .. include:: /includes/apiargs/MongoDBGridFSBucket-method-openUploadStream-param.rst + Defaults to ``false``. - The ``$options`` parameter supports the following options: + .. versionadded: 1.4 - .. include:: /includes/apiargs/MongoDBGridFSBucket-method-openUploadStream-option.rst + * - metadata + - array|object + - User data for the ``metadata`` field of the file document. If not + specified, the ``metadata`` field will not be set on the file document. Return Values ------------- diff --git a/docs/reference/method/MongoDBGridFSBucket-rename.txt b/docs/reference/method/MongoDBGridFSBucket-rename.txt index 888d1ae3f..20d9c1d7f 100644 --- a/docs/reference/method/MongoDBGridFSBucket-rename.txt +++ b/docs/reference/method/MongoDBGridFSBucket-rename.txt @@ -21,9 +21,14 @@ Definition function rename($id, string $newFilename): void - This method has the following parameters: +Parameters +---------- + +``$id`` : mixed + The ``_id`` of the file to rename. - .. include:: /includes/apiargs/MongoDBGridFSBucket-method-rename-param.rst +``$newFilename`` : string + The new ``filename`` value. Errors/Exceptions ----------------- diff --git a/docs/reference/method/MongoDBGridFSBucket-uploadFromStream.txt b/docs/reference/method/MongoDBGridFSBucket-uploadFromStream.txt index 18e5944b6..89cb8d2f3 100644 --- a/docs/reference/method/MongoDBGridFSBucket-uploadFromStream.txt +++ b/docs/reference/method/MongoDBGridFSBucket-uploadFromStream.txt @@ -19,15 +19,54 @@ Definition .. code-block:: php - function uploadFromStream(string $filename, resource $source, array $options = []): mixed + function uploadFromStream( + string $filename, + resource $source, + array $options = [] + ): mixed - This method has the following parameters: +Parameters +---------- + +``$filename`` : string + The ``filename`` of the file to create. + +``$source`` : resource + Readable stream, from which the new GridFS file's contents will be read. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - _id + - mixed + - Value to use as the file document identifier. Defaults to a new + :php:`MongoDB\\BSON\\ObjectId ` object. + + * - chunkSizeBytes + - integer + - The chunk size in bytes. Defaults to the bucket's ``chunkSizeBytes`` + option. + + * - disableMD5 + - boolean + - Whether to disable automatic MD5 generation when storing files. - .. include:: /includes/apiargs/MongoDBGridFSBucket-method-uploadFromStream-param.rst + Defaults to ``false``. - The ``$options`` parameter supports the following options: + .. versionadded: 1.4 - .. include:: /includes/apiargs/MongoDBGridFSBucket-method-uploadFromStream-option.rst + * - metadata + - array|object + - User data for the ``metadata`` field of the file document. If not + specified, the ``metadata`` field will not be set on the file document. Return Values ------------- diff --git a/docs/reference/method/MongoDBGridFSBucket__construct.txt b/docs/reference/method/MongoDBGridFSBucket__construct.txt index c6c309bb3..25271e0cb 100644 --- a/docs/reference/method/MongoDBGridFSBucket__construct.txt +++ b/docs/reference/method/MongoDBGridFSBucket__construct.txt @@ -19,15 +19,79 @@ Definition .. code-block:: php - function __construct(MongoDB\Driver\Manager $manager, string $databaseName, array $options = []) + function __construct( + MongoDB\Driver\Manager $manager, + string $databaseName, + array $options = [] + ) - This constructor has the following parameters: +Parameters +---------- + +``$manager`` : :php:`MongoDB\\Driver\\Manager ` + The :php:`Manager ` instance from the driver. The + manager maintains connections between the driver and your MongoDB instances. + +``$databaseName`` : string + The name of the database. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - bucketName + - string + - The bucket name, which will be used as a prefix for the files and + chunks collections. Defaults to ``"fs"``. + + * - chunkSizeBytes + - integer + - The chunk size in bytes. Defaults to ``261120`` (i.e. 255 KiB). + + * - disableMD5 + - boolean + - Whether to disable automatic MD5 generation when storing files. + + Defaults to ``false``. + + .. versionadded: 1.4 + + * - readConcern + - :php:`MongoDB\\Driver\\ReadConcern ` + - The default read concern to use for bucket operations. Defaults to the + manager's read concern. + + * - readPreference + - :php:`MongoDB\\Driver\\ReadPreference ` + - The default read preference to use for bucket operations. Defaults to + the manager's read preference. + + * - typeMap + - array + - Default :php:`type map + ` + to apply to cursors, which determines how BSON documents are converted + to PHP values. The library uses the following type map by default: - .. include:: /includes/apiargs/MongoDBGridFSBucket-method-construct-param.rst + .. code-block:: php - The ``$options`` parameter supports the following options: + [ + 'array' => 'MongoDB\Model\BSONArray', + 'document' => 'MongoDB\Model\BSONDocument', + 'root' => 'MongoDB\Model\BSONDocument', + ] - .. include:: /includes/apiargs/MongoDBGridFSBucket-method-construct-option.rst + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - The default write concern to use for bucket operations. Defaults to the + manager's write concern. Errors/Exceptions ----------------- diff --git a/docs/tutorial/modeling-bson-data.txt b/docs/tutorial/modeling-bson-data.txt index 24486d1e1..5cf09197a 100644 --- a/docs/tutorial/modeling-bson-data.txt +++ b/docs/tutorial/modeling-bson-data.txt @@ -10,6 +10,7 @@ Modeling BSON Data :depth: 2 :class: singlecol +.. _php-type-map: Type Maps --------- @@ -155,7 +156,6 @@ The same document in the MongoDB shell might display as: :php:`MongoDB\\BSON\\Persistable ` may only be used for root and embedded BSON documents. It may not be used for BSON arrays. -.. _php-type-map: Working with Enums ------------------