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::getName()

Definition

MongoDB\Model\CollectionInfo::getName

Return the collection name.

function getName(): string

Return Values

The collection name.

Examples

<?php

$info = new CollectionInfo(['name' => 'foo']);

echo $info->getName();

The output would then resemble:

foo

See Also