New in version 1.9.
Definition
Return Values
The collection type. This corresponds to the type field returned in the listCollections command reply.
Examples
$db = (new MongoDB\Client)->test;
$db->createCollection('myCollection');
// Retrieves the collection typeforeach ($db->listCollections(['filter' => ['name' => 'myCollection']]) as $info) { echo $info->getType();}The output would then resemble:
collectionSee Also
listCollections command reference in the MongoDB manual