original_string: private function executeCommand(Server $server)
      {
          $cmd = ['listCollections' => 1];
  
          if ( ! empty($this->options['filter'])) {
              $cmd['filter'] = (object) $this->options['filter'];
          }
  
          if (isset($this->options['maxTimeMS'])) {
              $cmd['maxTimeMS'] = $this->options['maxTimeMS'];
          }
  
          $cursor = $server->executeCommand($this->databaseName, new Command($cmd), $this->createOptions());
          $cursor->setTypeMap(['root' => 'array', 'document' => 'array']);
  
          return new CollectionInfoCommandIterator(new CachingIterator($cursor));
      }
code: private function executeCommand(Server $server)
      {
          $cmd = ['listCollections' => 1];
  
          if ( ! empty($this->options['filter'])) {
              $cmd['filter'] = (object) $this->options['filter'];
          }
  
          if (isset($this->options['maxTimeMS'])) {
              $cmd['maxTimeMS'] = $this->options['maxTimeMS'];
          }
  
          $cursor = $server->executeCommand($this->databaseName, new Command($cmd), $this->createOptions());
          $cursor->setTypeMap(['root' => 'array', 'document' => 'array']);
  
          return new CollectionInfoCommandIterator(new CachingIterator($cursor));
      }
code_tokens: private function executeCommand ( Server $ server ) { $ cmd = [ 'listCollections' => 1 ] ; if ( ! empty ( $ this -> options [ 'filter' ] ) ) { $ cmd [ 'filter' ] = ( object ) $ this -> options [ 'filter' ] ; } if ( isset ( $ this -> options [ 'maxTimeMS' ] ) ) { $ cmd [ 'maxTimeMS' ] = $ this -> options [ 'maxTimeMS' ] ; } $ cursor = $ server -> executeCommand ( $ this -> databaseName , new Command ( $ cmd ) , $ this -> createOptions ( ) ) ; $ cursor -> setTypeMap ( [ 'root' => 'array' , 'document' => 'array' ] ) ; return new CollectionInfoCommandIterator ( new CachingIterator ( $ cursor ) ) ; }
docstring: Returns information for all collections in this database using the
  listCollections command.
  
  @param Server $server
  @return CollectionInfoCommandIterator
  @throws DriverRuntimeException for other driver errors (e.g. connection errors)
docstring_tokens: Returns information for all collections in this database using the listCollections command .