public function listIndexes(array $options = [])
    {
        $operation = new ListIndexes($this->databaseName, $this->collectionName, $options);
        $server = $this->manager->selectServer(new ReadPreference(ReadPreference::RP_PRIMARY));

        return $operation->execute($server);
    }
public function listIndexes(array $options = [])
    {
        $operation = new ListIndexes($this->databaseName, $this->collectionName, $options);
        $server = $this->manager->selectServer(new ReadPreference(ReadPreference::RP_PRIMARY));

        return $operation->execute($server);
    }
public function listIndexes ( array $ options = [ ] ) { $ operation = new ListIndexes ( $ this -> databaseName , $ this -> collectionName , $ options ) ; $ server = $ this -> manager -> selectServer ( new ReadPreference ( ReadPreference :: RP_PRIMARY ) ) ; return $ operation -> execute ( $ server ) ; }
Returns information for all indexes for the collection.

@see ListIndexes::__construct() for supported options
@return IndexInfoIterator
@throws InvalidArgumentException for parameter/option parsing errors
@throws DriverRuntimeException for other driver errors (e.g. connection errors)
Returns information for all indexes for the collection .