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\IndexInfo::getNamespace()

Definition

MongoDB\Model\IndexInfo::getNamespace

Return the index namespace, which is the namespace of the collection containing the index.

function getNamespace(): string

Return Values

The index namespace.

Examples

<?php

$info = new IndexInfo([
    'ns' => 'foo.bar',
]);

echo $info->getNamespace();

The output would then resemble:

foo.bar

See Also