芝麻web文件管理V1.00
编辑当前文件:/home/mgatv524/giga.mgaplay.com.br/vendor/mongodb/mongodb/src/Operation/DatabaseCommand.php
databaseName = (string) $databaseName; $this->command = $command instanceof Command ? $command : new Command($command); $this->options = $options; } /** * Execute the operation. * * @see Executable::execute() * @param Server $server * @return Cursor */ public function execute(Server $server) { $cursor = $server->executeCommand($this->databaseName, $this->command, $this->createOptions()); if (isset($this->options['typeMap'])) { $cursor->setTypeMap($this->options['typeMap']); } return $cursor; } /** * Create options for executing the command. * * @see http://php.net/manual/en/mongodb-driver-server.executecommand.php * @return array */ private function createOptions() { $options = []; if (isset($this->options['readPreference'])) { $options['readPreference'] = $this->options['readPreference']; } if (isset($this->options['session'])) { $options['session'] = $this->options['session']; } return $options; } }