バージョン1.9の新機能。
定義
Return Values
コレクションの種類。 これは、 listCollectionsコマンドの応答で返されるtypeフィールドに対応します。
例
$db = (new MongoDB\Client)->test;
$db->createCollection('myCollection');
// Retrieves the collection typeforeach ($db->listCollections(['filter' => ['name' => 'myCollection']]) as $info) { echo $info->getType();}出力は次のようになります。
collectionその他の参照
MongoDB マニュアルのlistCollectionsコマンド参照