Docs Menu

MongoDB\Model\DatabaseInfo::getName()

MongoDB\Model\DatabaseInfo::getName()

Return the database name.

function getName(): string

The database name.

<?php
$info = new DatabaseInfo(['name' => 'foo']);
echo $info->getName();

The output would then resemble:

foo