diff --git a/source/reference/class/MongoDBModelCollectionInfo.txt b/source/reference/class/MongoDBModelCollectionInfo.txt index 76b9af35..780231cf 100644 --- a/source/reference/class/MongoDBModelCollectionInfo.txt +++ b/source/reference/class/MongoDBModelCollectionInfo.txt @@ -8,8 +8,8 @@ Definition .. phpclass:: MongoDB\Model\CollectionInfo This class models information about a collection. Instances of this class are - returned by traversing a :phpclass:`MongoDB\Model\CollectionInfoIterator`, - which is returned by :phpmethod:`MongoDB\Database::listCollections()`. + stored in an :php:`Iterator ` + returned by :phpmethod:`MongoDB\Database::listCollections()`. .. versionchanged:: 1.4 diff --git a/source/reference/class/MongoDBModelCollectionInfoIterator.txt b/source/reference/class/MongoDBModelCollectionInfoIterator.txt deleted file mode 100644 index fca6da62..00000000 --- a/source/reference/class/MongoDBModelCollectionInfoIterator.txt +++ /dev/null @@ -1,20 +0,0 @@ -============================================ -MongoDB\\Model\\CollectionInfoIterator Class -============================================ - -Definition ----------- - -.. phpclass:: MongoDB\Model\CollectionInfoIterator - - This interface extends PHP's :php:`Iterator ` - interface. An instance of this interface is returned by - :phpmethod:`MongoDB\Database::listCollections()`. - -Methods -------- - -This interface adds no new methods to :php:`Iterator -`, but specifies that :php:`current() -` will return an instance of -:phpclass:`MongoDB\Model\CollectionInfo`. \ No newline at end of file diff --git a/source/reference/class/MongoDBModelDatabaseInfo.txt b/source/reference/class/MongoDBModelDatabaseInfo.txt index a8d18cd6..76268dd0 100644 --- a/source/reference/class/MongoDBModelDatabaseInfo.txt +++ b/source/reference/class/MongoDBModelDatabaseInfo.txt @@ -8,8 +8,8 @@ Definition .. phpclass:: MongoDB\Model\DatabaseInfo This class models information about a database. Instances of this class are - returned by traversing a :phpclass:`MongoDB\Model\DatabaseInfoIterator`, - which is returned by :phpmethod:`MongoDB\Client::listDatabases()`. + stored in an :php:`Iterator ` + returned by :phpmethod:`MongoDB\Client::listDatabases()`. .. versionchanged:: 1.4 diff --git a/source/reference/class/MongoDBModelDatabaseInfoIterator.txt b/source/reference/class/MongoDBModelDatabaseInfoIterator.txt deleted file mode 100644 index ba36ef2e..00000000 --- a/source/reference/class/MongoDBModelDatabaseInfoIterator.txt +++ /dev/null @@ -1,20 +0,0 @@ -========================================== -MongoDB\\Model\\DatabaseInfoIterator Class -========================================== - -Definition ----------- - -.. phpclass:: MongoDB\Model\DatabaseInfoIterator - - This interface extends PHP's :php:`Iterator ` - interface. An instance of this interface is returned by - :phpmethod:`MongoDB\Client::listDatabases()`. - -Methods -------- - -This interface adds no new methods to :php:`Iterator -`, but specifies that :php:`current() -` will return an instance of -:phpclass:`MongoDB\Model\DatabaseInfo`. \ No newline at end of file diff --git a/source/reference/class/MongoDBModelIndexInfo.txt b/source/reference/class/MongoDBModelIndexInfo.txt index 257694d8..14f69312 100644 --- a/source/reference/class/MongoDBModelIndexInfo.txt +++ b/source/reference/class/MongoDBModelIndexInfo.txt @@ -8,8 +8,8 @@ Definition .. phpclass:: MongoDB\Model\IndexInfo This class models information about an index. Instances of this class are - returned by traversing a :phpclass:`MongoDB\Model\IndexInfoIterator`, - which is returned by :phpmethod:`MongoDB\Collection::listIndexes()`. + stored in an :php:`Iterator ` + returned by :phpmethod:`MongoDB\Collection::listIndexes()`. This class implements PHP's :php:`ArrayAccess ` interface. This provides a mechanism for accessing index fields for which there exists no diff --git a/source/reference/class/MongoDBModelIndexInfoIterator.txt b/source/reference/class/MongoDBModelIndexInfoIterator.txt deleted file mode 100644 index 0fae59c2..00000000 --- a/source/reference/class/MongoDBModelIndexInfoIterator.txt +++ /dev/null @@ -1,20 +0,0 @@ -======================================= -MongoDB\\Model\\IndexInfoIterator Class -======================================= - -Definition ----------- - -.. phpclass:: MongoDB\Model\IndexInfoIterator - - This interface extends PHP's :php:`Iterator ` - interface. An instance of this interface is returned by - :phpmethod:`MongoDB\Collection::listIndexes()`. - -Methods -------- - -This interface adds no new methods to :php:`Iterator -`, but specifies that :php:`current() -` will return an instance of -:phpclass:`MongoDB\Model\IndexInfo`. \ No newline at end of file diff --git a/source/reference/method/MongoDBClient-listDatabaseNames.txt b/source/reference/method/MongoDBClient-listDatabaseNames.txt index bdb7e095..7a3baad6 100644 --- a/source/reference/method/MongoDBClient-listDatabaseNames.txt +++ b/source/reference/method/MongoDBClient-listDatabaseNames.txt @@ -77,8 +77,8 @@ Parameters Return Values ------------- -An :php:`Iterator `, which provides the name of each -database on the server. +An :php:`Iterator `, which provides the +name of each database on the server. Errors/Exceptions ----------------- diff --git a/source/reference/method/MongoDBClient-listDatabases.txt b/source/reference/method/MongoDBClient-listDatabases.txt index 93a4d65a..2fa477ec 100644 --- a/source/reference/method/MongoDBClient-listDatabases.txt +++ b/source/reference/method/MongoDBClient-listDatabases.txt @@ -2,8 +2,6 @@ MongoDB\\Client::listDatabases() ================================ -.. default-domain:: mongodb - .. contents:: On this page :local: :backlinks: none @@ -19,7 +17,7 @@ Definition .. code-block:: php - function listDatabases(array $options = []): MongoDB\Model\DatabaseInfoIterator + function listDatabases(array $options = []): Iterator Parameters ---------- @@ -77,9 +75,9 @@ Parameters Return Values ------------- -A traversable :phpclass:`MongoDB\Model\DatabaseInfoIterator`, which contains -a :phpclass:`MongoDB\Model\DatabaseInfo` object for each database on the -server. +An :php:`Iterator ` +instance, which contains a :phpclass:`MongoDB\Model\DatabaseInfo` object +for each database on the server. Errors/Exceptions ----------------- diff --git a/source/reference/method/MongoDBCollection-listIndexes.txt b/source/reference/method/MongoDBCollection-listIndexes.txt index c6d9d474..f463e518 100644 --- a/source/reference/method/MongoDBCollection-listIndexes.txt +++ b/source/reference/method/MongoDBCollection-listIndexes.txt @@ -2,8 +2,6 @@ MongoDB\\Collection::listIndexes() ================================== -.. default-domain:: mongodb - .. contents:: On this page :local: :backlinks: none @@ -19,7 +17,7 @@ Definition .. code-block:: php - function listIndexes(array $options = []): MongoDB\Model\IndexInfoIterator + function listIndexes(array $options = []): Iterator Parameters ---------- @@ -56,8 +54,9 @@ Parameters Return Values ------------- -A traversable :phpclass:`MongoDB\Model\IndexInfoIterator`, which contains a -:phpclass:`MongoDB\Model\IndexInfo` object for each index for the collection. +An :php:`Iterator ` +instance, which contains a :phpclass:`MongoDB\Model\IndexInfo` object +for each index for the collection. Errors/Exceptions ----------------- diff --git a/source/reference/method/MongoDBDatabase-listCollectionNames.txt b/source/reference/method/MongoDBDatabase-listCollectionNames.txt index d094028d..6ae0a3af 100644 --- a/source/reference/method/MongoDBDatabase-listCollectionNames.txt +++ b/source/reference/method/MongoDBDatabase-listCollectionNames.txt @@ -74,8 +74,8 @@ Parameters Return Values ------------- -An :php:`Iterator `, which provides the name of each -collection in the database. +An :php:`Iterator `, which provides the +name of each collection in the database. Example ------- diff --git a/source/reference/method/MongoDBDatabase-listCollections.txt b/source/reference/method/MongoDBDatabase-listCollections.txt index 511b8995..5c796145 100644 --- a/source/reference/method/MongoDBDatabase-listCollections.txt +++ b/source/reference/method/MongoDBDatabase-listCollections.txt @@ -2,8 +2,6 @@ MongoDB\\Database::listCollections() ==================================== -.. default-domain:: mongodb - .. contents:: On this page :local: :backlinks: none @@ -19,7 +17,7 @@ Definition .. code-block:: php - function listCollections(array $options = []): MongoDB\Model\CollectionInfoIterator + function listCollections(array $options = []): Iterator Parameters ---------- @@ -74,9 +72,9 @@ Parameters Return Values ------------- -A traversable :phpclass:`MongoDB\Model\CollectionInfoIterator`, which contains -a :phpclass:`MongoDB\Model\CollectionInfo` object for each collection in the -database. +An :php:`Iterator ` +instance, which contains a :phpclass:`MongoDB\Model\CollectionInfo` +object for each collection in the database. Example ------- diff --git a/source/reference/result-classes.txt b/source/reference/result-classes.txt index 8fb92ec2..7836b48f 100644 --- a/source/reference/result-classes.txt +++ b/source/reference/result-classes.txt @@ -12,8 +12,5 @@ Result Classes UpdateResult Class ChangeStream Class CollectionInfo Class - CollectionInfoIterator Class DatabaseInfo Class - DatabaseInfoIterator Class IndexInfo Class - IndexInfoIterator Class \ No newline at end of file diff --git a/source/whats-new.txt b/source/whats-new.txt index bbfd088d..9744fb5a 100644 --- a/source/whats-new.txt +++ b/source/whats-new.txt @@ -42,11 +42,11 @@ What's New in 2.0 - The following methods return ``void`` instead of the raw command response: - - - ``MongoDB\\Client``: ``dropDatabase()`` - - ``MongoDB\\Collection``: ``drop()``, ``dropIndex()``, + + - ``MongoDB\Client``: ``dropDatabase()`` + - ``MongoDB\Collection``: ``drop()``, ``dropIndex()``, ``dropIndexes()``, ``dropSearchIndex()``, ``rename()`` - - ``MongoDB\\Database``: ``createCollection()``, ``drop()``, + - ``MongoDB\Database``: ``createCollection()``, ``drop()``, ``dropCollection()``, ``renameCollection()`` To learn more about breaking changes in this release, see the @@ -82,13 +82,13 @@ improvements, and fixes: - Removes the deprecated ``IndexInfo::isGeoHaystack()`` method. - Removes the deprecated ``autoIndexId`` and ``flags`` options for the - ``MongoDB\\Database::createCollection()`` method. + ``MongoDB\Database::createCollection()`` method. - Drops support for map-reduce functionality by removing the following deprecated methods and types: - - ``MongoDB\\Collection::mapReduce()`` - - ``MongoDB\\MapReduceResult`` + - ``MongoDB\Collection::mapReduce()`` + - ``MongoDB\MapReduceResult`` You can rewrite map-reduce operations by using aggregation pipeline stages such as ``$group`` and ``$merge``. To learn more, see @@ -96,6 +96,18 @@ improvements, and fixes: ` in the {+mdb-server+} manual. +- Removes the following ``Iterator`` implementations: + + - ``MongoDB\Model\CollectionInfoIterator`` + - ``MongoDB\Model\DatabaseInfoIterator`` + - ``MongoDB\Model\IndexInfoIterator`` + + The :phpmethod:`MongoDB\Client::listDatabases()`, + :phpmethod:`MongoDB\Database::listCollections()`, and + :phpmethod:`MongoDB\Collection::listIndexes()` methods return a + general traversable ``Iterator`` instance that contains the corresponding + results. + .. _php-lib-version-1.20: What's New in 1.20