Skip to content

DOCSP-50772: isView() #281

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion source/reference/class/MongoDBModelCollectionInfo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ Methods
getOptions() </reference/method/MongoDBModelCollectionInfo-getOptions>
getType() </reference/method/MongoDBModelCollectionInfo-getType>
isCapped() </reference/method/MongoDBModelCollectionInfo-isCapped>
isView() </reference/method/MongoDBModelCollectionInfo-isView>

- :phpmethod:`MongoDB\Model\CollectionInfo::getCappedMax()`
- :phpmethod:`MongoDB\Model\CollectionInfo::getCappedSize()`
Expand All @@ -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()`
- :phpmethod:`MongoDB\Model\CollectionInfo::isCapped()`
- :phpmethod:`MongoDB\Model\CollectionInfo::isView()`
53 changes: 53 additions & 0 deletions source/reference/method/MongoDBModelCollectionInfo-isView.txt
Original file line number Diff line number Diff line change
@@ -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 </core/views/>`.

.. code-block:: php

function isView(): boolean

Return Values
-------------

A boolean indicating whether the collection is a view.

Examples
--------

.. code-block:: php

<?php

$info = new CollectionInfo([
'name' => 'foo',
'type' => 'view',
'info' => ['readOnly' => true],
]);

var_dump($info->isView());

The output resembles the following:

.. code-block:: none

bool(true)

See Also
--------

- :manual:`Views </core/views/>` in the {+mdb-server+} manual
- :manual:`Create and Query a View </core/views/create-view/>` in the
{+mdb-server+} manual
34 changes: 34 additions & 0 deletions source/references/release-notes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,47 @@ Release Notes
Learn about new features, improvements, and fixes introduced in the
following versions of the {+php-library+}:

* :ref:`Version 2.2 <php-lib-version-2.2>`
* :ref:`Version 2.1 <php-lib-version-2.1>`
* :ref:`Version 2.0 <php-lib-version-2.0>`
* :ref:`Version 1.21 <php-lib-version-1.21>`
* :ref:`Version 1.20 <php-lib-version-1.20>`
* :ref:`Version 1.19 <php-lib-version-1.19>`
* :ref:`Version 1.18 <php-lib-version-1.18>`
* :ref:`Version 1.17 <php-lib-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 </core/views/>`.

.. _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`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this link will work once comp-cov is merged into master so you can leave it as is

section of the Bulk Write Operations guide.

.. _php-lib-version-2.0:

What's New in 2.0
Expand Down
Loading