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

Definition

MongoDB\Model\IndexInfo::getKey

Return the index specification (i.e. indexed field(s) and order). This correlates with the $key parameter for MongoDB\Collection::createIndex().

function getKey(): array

Return Values

The index specification as an associative array.

See Also