Definição
MongoDB\Model\CollectionInfo::isCapped()Return whether the collection is a capped collection.
function isCapped(): boolean
Return Values
Um booleano que indica se a collection é uma collection limitada.
Exemplos
$db = (new MongoDB\Client)->test; // Creates a capped collection $db->createCollection( 'myCappedCollection', ['capped' => true, 'size' => 1048576] ); // Retrieves whether the collection is capped foreach ($db->listCollections(['filter' => ['name' => 'myCappedCollection']]) as $info) { var_dump($info->isCapped()); }
A saÃda seria então semelhante a:
bool(true)
Veja também
Capped Collections in the MongoDB manual
listCollections command reference in the MongoDB manual