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

Definition

MongoDB\Model\DatabaseInfo::getName

Return the database name.

function getName(): string

Return Values

The database name.

Examples

<?php

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

echo $info->getName();

The output would then resemble:

foo

See Also