For AI agents: a documentation index is available at https://www.mongodb.com/docs/llms.txt — markdown versions of all pages are available by appending .md to any URL path.

MongoDB\GridFS\Bucket::getTypeMap()

New in version 1.2.

MongoDB\GridFS\Bucket::getTypeMap()

Returns the type map for this GridFS bucket.

function getTypeMap(): array

A type map array.

<?php $database = (new MongoDB\Client)->getDatabase('test');$bucket = $database->getGridFSBucket([ 'typeMap' => [ 'root' => 'array', 'document' => 'array', 'array' => 'array', ],]); var_dump($bucket->getTypeMap());

The output would then resemble:

array(3) { ["root"]=> string(5) "array" ["document"]=> string(5) "array" ["array"]=> string(5) "array"}