Navigation
This version of the documentation is archived and no longer supported. To learn how to upgrade your version of PHP Library Manual, refer to the upgrade documentation.

MongoDB\Model\CollectionInfo::isCapped()

Definition

MongoDB\Model\CollectionInfo::isCapped

Return whether the collection is a capped collection.

function isCapped(): boolean

Return Values

A boolean indicating whether the collection is a capped collection.

Examples

<?php

$info = new CollectionInfo([
    'name' => 'foo',
    'options' => [
        'capped' => true,
        'size' => 1048576,
   ]
]);

var_dump($info->isCapped());

The output would then resemble:

bool(true)