private function executeCommand(Server $server)
    {
        $cmd = [
            'createIndexes' => $this->collectionName,
            'indexes' => $this->indexes,
        ];

        if (isset($this->options['maxTimeMS'])) {
            $cmd['maxTimeMS'] = $this->options['maxTimeMS'];
        }

        $server->executeWriteCommand($this->databaseName, new Command($cmd), $this->createOptions());
    }
private function executeCommand(Server $server)
    {
        $cmd = [
            'createIndexes' => $this->collectionName,
            'indexes' => $this->indexes,
        ];

        if (isset($this->options['maxTimeMS'])) {
            $cmd['maxTimeMS'] = $this->options['maxTimeMS'];
        }

        $server->executeWriteCommand($this->databaseName, new Command($cmd), $this->createOptions());
    }
private function executeCommand ( Server $ server ) { $ cmd = [ 'createIndexes' => $ this -> collectionName , 'indexes' => $ this -> indexes , ] ; if ( isset ( $ this -> options [ 'maxTimeMS' ] ) ) { $ cmd [ 'maxTimeMS' ] = $ this -> options [ 'maxTimeMS' ] ; } $ server -> executeWriteCommand ( $ this -> databaseName , new Command ( $ cmd ) , $ this -> createOptions ( ) ) ; }
Create one or more indexes for the collection using the createIndexes
command.

@param Server $server
@throws DriverRuntimeException for other driver errors (e.g. connection errors)
Create one or more indexes for the collection using the createIndexes command .