New in version 2.2.
Definition
MongoDB\Model\CollectionInfo::isView()Return whether the collection is a view.
function isView(): boolean
Return Values
A boolean indicating whether the collection is a view.
Examples
$db = (new MongoDB\Client)->test;
$db->createCollection( 'myView', ['viewOn' => 'restaurants'],);
foreach ($db->listCollections(['filter' => ['name' => 'myView']]) as $info) { var_dump($info->isView());}The output resembles the following:
bool(true)See Also
Views in the MongoDB Server manual
Create and Query a View in the MongoDB Server manual