From f8efcffffbe97535c38665ed21c9f1c3aa67071c Mon Sep 17 00:00:00 2001 From: rustagir Date: Wed, 2 Jul 2025 10:34:44 -0400 Subject: [PATCH 1/2] DOCSP-50772: isView() --- .../class/MongoDBModelCollectionInfo.txt | 4 +- .../MongoDBModelCollectionInfo-isView.txt | 53 +++++++++++++++++++ source/references/release-notes.txt | 34 ++++++++++++ 3 files changed, 90 insertions(+), 1 deletion(-) create mode 100644 source/reference/method/MongoDBModelCollectionInfo-isView.txt diff --git a/source/reference/class/MongoDBModelCollectionInfo.txt b/source/reference/class/MongoDBModelCollectionInfo.txt index a869b322..21b2dbb9 100644 --- a/source/reference/class/MongoDBModelCollectionInfo.txt +++ b/source/reference/class/MongoDBModelCollectionInfo.txt @@ -39,6 +39,7 @@ Methods getOptions() getType() isCapped() + isView() - :phpmethod:`MongoDB\Model\CollectionInfo::getCappedMax()` - :phpmethod:`MongoDB\Model\CollectionInfo::getCappedSize()` @@ -47,4 +48,5 @@ Methods - :phpmethod:`MongoDB\Model\CollectionInfo::getName()` - :phpmethod:`MongoDB\Model\CollectionInfo::getOptions()` - :phpmethod:`MongoDB\Model\CollectionInfo::getType()` -- :phpmethod:`MongoDB\Model\CollectionInfo::isCapped()` \ No newline at end of file +- :phpmethod:`MongoDB\Model\CollectionInfo::isCapped()` +- :phpmethod:`MongoDB\Model\CollectionInfo::isView()` diff --git a/source/reference/method/MongoDBModelCollectionInfo-isView.txt b/source/reference/method/MongoDBModelCollectionInfo-isView.txt new file mode 100644 index 00000000..2ab93a66 --- /dev/null +++ b/source/reference/method/MongoDBModelCollectionInfo-isView.txt @@ -0,0 +1,53 @@ +======================================== +MongoDB\\Model\\CollectionInfo::isView() +======================================== + +.. contents:: On this page + :local: + :backlinks: none + :depth: 1 + :class: singlecol + +Definition +---------- + +.. phpmethod:: MongoDB\Model\CollectionInfo::isView() + + Return whether the collection is a :manual:`view `. + + .. code-block:: php + + function isView(): boolean + +Return Values +------------- + +A boolean indicating whether the collection is a view. + +Examples +-------- + +.. code-block:: php + + 'foo', + 'type' => 'view', + 'info' => ['readOnly' => true], + ]); + + var_dump($info->isView()); + +The output resembles the following: + +.. code-block:: none + + bool(true) + +See Also +-------- + +- :manual:`Views ` in the {+mdb-server+} manual +- :manual:`Create and Query a View ` in the + {+mdb-server+} manual diff --git a/source/references/release-notes.txt b/source/references/release-notes.txt index 286f3991..cab0afe1 100644 --- a/source/references/release-notes.txt +++ b/source/references/release-notes.txt @@ -21,6 +21,8 @@ Release Notes Learn about new features, improvements, and fixes introduced in the following versions of the {+php-library+}: +* :ref:`Version 2.2 ` +* :ref:`Version 2.1 ` * :ref:`Version 2.0 ` * :ref:`Version 1.21 ` * :ref:`Version 1.20 ` @@ -28,6 +30,38 @@ following versions of the {+php-library+}: * :ref:`Version 1.18 ` * :ref:`Version 1.17 ` +.. _php-lib-version-2.2: + +What's New in 2.2 +----------------- + +The {+library-short+} v2.2 release includes the following features, +improvements, and fixes: + +- Adds the :phpmethod:`MongoDB\Model\CollectionInfo::isView()` method to + determine whether a collection is a :manual:`view `. + +.. _php-lib-version-2.1: + +What's New in 2.1 +----------------- + +.. important:: Breaking Changes + + The {+library-short+} v2.1 release introduces the following breaking + changes: + + - Drops support for {+mdb-server+} 4.0. The minimum supported + {+mdb-server+} version is 4.2. + +The {+library-short+} v2.1 release includes the following features, +improvements, and fixes: + +- Adds a *client* bulk write API to perform write + operations on multiple databases and collections in the same call. To learn + more about this feature, see the :ref:`php-client-bulk-write` + section of the Bulk Write Operations guide. + .. _php-lib-version-2.0: What's New in 2.0 From 5763d68f42677f64825718f98fc20dda3eaeafbd Mon Sep 17 00:00:00 2001 From: Rea Rustagi <85902999+rustagir@users.noreply.github.com> Date: Wed, 2 Jul 2025 11:07:36 -0400 Subject: [PATCH 2/2] fix manual link Co-authored-by: Nora Reidy --- source/reference/method/MongoDBModelCollectionInfo-isView.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/reference/method/MongoDBModelCollectionInfo-isView.txt b/source/reference/method/MongoDBModelCollectionInfo-isView.txt index 2ab93a66..074aa1a9 100644 --- a/source/reference/method/MongoDBModelCollectionInfo-isView.txt +++ b/source/reference/method/MongoDBModelCollectionInfo-isView.txt @@ -49,5 +49,5 @@ See Also -------- - :manual:`Views ` in the {+mdb-server+} manual -- :manual:`Create and Query a View ` in the +- :manual:`Create and Query a View ` in the {+mdb-server+} manual