定義
- MongoDB\Model\IndexInfo::getKey()
- インデックス仕様( インデックス フィールドと順序)。 これは、 - MongoDB\Collection::createIndex()の- $keyパラメータと相関します。- function getKey(): array 
Return Values
連想配列としてのインデックス仕様。
例
$info = new IndexInfo([     'key' => ['x' => 1], ]); var_dump($info->getKey()); 
出力は次のようになります。
array(1) {   ["x"]=>   int(1) } 
その他の参照
- MongoDB マニュアルのlistIndexesコマンド参照