Skip to content

Commit 0b44e31

Browse files
committed
DOCSP-43953: v2 iterator changes
1 parent f39e694 commit 0b44e31

11 files changed

+30
-86
lines changed

source/reference/class/MongoDBModelCollectionInfo.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ Definition
88
.. phpclass:: MongoDB\Model\CollectionInfo
99

1010
This class models information about a collection. Instances of this class are
11-
returned by traversing a :phpclass:`MongoDB\Model\CollectionInfoIterator`,
12-
which is returned by :phpmethod:`MongoDB\Database::listCollections()`.
11+
returned in an `Iterator <{+php-manual}/class.iterator.php>`__
12+
returned by :phpmethod:`MongoDB\Database::listCollections()`.
1313

1414
.. versionchanged:: 1.4
1515

source/reference/class/MongoDBModelCollectionInfoIterator.txt

Lines changed: 0 additions & 20 deletions
This file was deleted.

source/reference/class/MongoDBModelDatabaseInfo.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ Definition
88
.. phpclass:: MongoDB\Model\DatabaseInfo
99

1010
This class models information about a database. Instances of this class are
11-
returned by traversing a :phpclass:`MongoDB\Model\DatabaseInfoIterator`,
12-
which is returned by :phpmethod:`MongoDB\Client::listDatabases()`.
11+
returned in an `Iterator <{+php-manual}/class.iterator.php>`__
12+
returned by :phpmethod:`MongoDB\Client::listDatabases()`.
1313

1414
.. versionchanged:: 1.4
1515

source/reference/class/MongoDBModelDatabaseInfoIterator.txt

Lines changed: 0 additions & 20 deletions
This file was deleted.

source/reference/class/MongoDBModelIndexInfo.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ Definition
88
.. phpclass:: MongoDB\Model\IndexInfo
99

1010
This class models information about an index. Instances of this class are
11-
returned by traversing a :phpclass:`MongoDB\Model\IndexInfoIterator`,
12-
which is returned by :phpmethod:`MongoDB\Collection::listIndexes()`.
11+
returned in an `Iterator <{+php-manual}/class.iterator.php>`__
12+
returned by :phpmethod:`MongoDB\Collection::listIndexes()`.
1313

1414
This class implements PHP's :php:`ArrayAccess <arrayaccess>` interface. This
1515
provides a mechanism for accessing index fields for which there exists no

source/reference/class/MongoDBModelIndexInfoIterator.txt

Lines changed: 0 additions & 20 deletions
This file was deleted.

source/reference/method/MongoDBClient-listDatabases.txt

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
MongoDB\\Client::listDatabases()
33
================================
44

5-
.. default-domain:: mongodb
6-
75
.. contents:: On this page
86
:local:
97
:backlinks: none
@@ -19,7 +17,7 @@ Definition
1917

2018
.. code-block:: php
2119

22-
function listDatabases(array $options = []): MongoDB\Model\DatabaseInfoIterator
20+
function listDatabases(array $options = []): Iterator
2321

2422
Parameters
2523
----------
@@ -77,9 +75,9 @@ Parameters
7775
Return Values
7876
-------------
7977

80-
A traversable :phpclass:`MongoDB\Model\DatabaseInfoIterator`, which contains
81-
a :phpclass:`MongoDB\Model\DatabaseInfo` object for each database on the
82-
server.
78+
An `Iterator <{+php-manual}/class.iterator.php>`__
79+
instance, which contains a :phpclass:`MongoDB\Model\DatabaseInfo` object
80+
for each database on the server.
8381

8482
Errors/Exceptions
8583
-----------------

source/reference/method/MongoDBCollection-listIndexes.txt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
MongoDB\\Collection::listIndexes()
33
==================================
44

5-
.. default-domain:: mongodb
6-
75
.. contents:: On this page
86
:local:
97
:backlinks: none
@@ -19,7 +17,7 @@ Definition
1917

2018
.. code-block:: php
2119

22-
function listIndexes(array $options = []): MongoDB\Model\IndexInfoIterator
20+
function listIndexes(array $options = []): Iterator
2321

2422
Parameters
2523
----------
@@ -56,8 +54,9 @@ Parameters
5654
Return Values
5755
-------------
5856

59-
A traversable :phpclass:`MongoDB\Model\IndexInfoIterator`, which contains a
60-
:phpclass:`MongoDB\Model\IndexInfo` object for each index for the collection.
57+
An `Iterator <{+php-manual}/class.iterator.php>`__
58+
instance, which contains a :phpclass:`MongoDB\Model\IndexInfo` object
59+
for each index for the collection.
6160

6261
Errors/Exceptions
6362
-----------------

source/reference/method/MongoDBDatabase-listCollections.txt

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
MongoDB\\Database::listCollections()
33
====================================
44

5-
.. default-domain:: mongodb
6-
75
.. contents:: On this page
86
:local:
97
:backlinks: none
@@ -19,7 +17,7 @@ Definition
1917

2018
.. code-block:: php
2119

22-
function listCollections(array $options = []): MongoDB\Model\CollectionInfoIterator
20+
function listCollections(array $options = []): Iterator
2321

2422
Parameters
2523
----------
@@ -74,9 +72,9 @@ Parameters
7472
Return Values
7573
-------------
7674

77-
A traversable :phpclass:`MongoDB\Model\CollectionInfoIterator`, which contains
78-
a :phpclass:`MongoDB\Model\CollectionInfo` object for each collection in the
79-
database.
75+
An `Iterator <{+php-manual}/class.iterator.php>`__
76+
instance, which contains a :phpclass:`MongoDB\Model\CollectionInfo`
77+
object for each collection in the database.
8078

8179
Example
8280
-------

source/reference/result-classes.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,5 @@ Result Classes
1212
UpdateResult Class </reference/class/MongoDBUpdateResult>
1313
ChangeStream Class </reference/class/MongoDBChangeStream>
1414
CollectionInfo Class </reference/class/MongoDBModelCollectionInfo>
15-
CollectionInfoIterator Class </reference/class/MongoDBModelCollectionInfoIterator>
1615
DatabaseInfo Class </reference/class/MongoDBModelDatabaseInfo>
17-
DatabaseInfoIterator Class </reference/class/MongoDBModelDatabaseInfoIterator>
1816
IndexInfo Class </reference/class/MongoDBModelIndexInfo>
19-
IndexInfoIterator Class </reference/class/MongoDBModelIndexInfoIterator>

source/whats-new.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,18 @@ improvements, and fixes:
9696
</reference/map-reduce-to-aggregation-pipeline/>` in the
9797
{+mdb-server+} manual.
9898

99+
- Removes the following ``Iterator`` implementations:
100+
101+
- ``MongoDB\\Model\\CollectionInfoIterator``
102+
- ``MongoDB\\Model\\DatabaseInfoIterator``
103+
- ``MongoDB\\Model\\IndexInfoIterator``
104+
105+
The :phpmethod:`MongoDB\Client::listDatabases()`,
106+
:phpmethod:`MongoDB\Database::listCollections()`, and
107+
:phpmethod:`MongoDB\Collection::listIndexes()` methods return a
108+
general traversable ``Iterator`` instance that contains the corresponding
109+
results.
110+
99111
.. _php-lib-version-1.20:
100112

101113
What's New in 1.20

0 commit comments

Comments
 (0)