Docs Menu
Docs Home
/
PHP Library Manual
/ / /

MongoDB\Model\CollectionInfo::isView()

MongoDB\Model\CollectionInfo::isView()

Return whether the collection is a view.

function isView(): boolean

A boolean indicating whether the collection is a view.

<?php
$info = new CollectionInfo([
'name' => 'foo',
'type' => 'view',
'info' => ['readOnly' => true],
]);
var_dump($info->isView());

The output resembles the following:

bool(true)
  • Views in the MongoDB Server manual

  • Create and Query a View in the MongoDB Server manual

Back

isCapped()

On this page