芝麻web文件管理V1.00
编辑当前文件:/home/mgatv524/giga.mgaplay.com.br/vendor/mongodb/mongodb/src/Command/ListCollections.php
databaseName = (string) $databaseName; $this->options = $options; } /** * Execute the operation. * * @see Executable::execute() * @param Server $server * @return CachingIterator * @throws DriverRuntimeException for other driver errors (e.g. connection errors) */ public function execute(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']; } if (isset($this->options['nameOnly'])) { $cmd['nameOnly'] = $this->options['nameOnly']; } $cursor = $server->executeReadCommand($this->databaseName, new Command($cmd), $this->createOptions()); $cursor->setTypeMap(['root' => 'array', 'document' => 'array']); return new CachingIterator($cursor); } /** * Create options for executing the command. * * Note: read preference is intentionally omitted, as the spec requires that * the command be executed on the primary. * * @see http://php.net/manual/en/mongodb-driver-server.executecommand.php * @return array */ private function createOptions() { $options = []; if (isset($this->options['session'])) { $options['session'] = $this->options['session']; } return $options; } }