Create options for executing the command.

@see http://php.net/manual/en/mongodb-driver-server.executecommand.php
@return array
510102
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;
    }
212440
private function createOptions() {

		$default = [

			CURLOPT_RETURNTRANSFER 	=> true,
			CURLOPT_HEADER 			=> true,
			CURLOPT_TIMEOUT			=> 30,
			CURLOPT_URL 			=> $this -> formatUrl(),
			CURLOPT_COOKIE			=> $this -> formatCookies(),
			CURLOPT_HTTPHEADER		=> $this -> headers
		];

		if('get' !== $this -> method) {
			$this -> options[CURLOPT_POSTFIELDS] = $this -> formatParams();
		}

		return $default + $this -> options;
	}
935587
private function createFromCommand()
    {
        $command = LsTreeCommand::getInstance($this->getRepository())->tree($this->ref, $this->subject);
        $outputLines = $this->getCaller()->execute($command)->getOutputLines(true);
        $this->parseOutputLines($outputLines);
    }
981923
protected function executeCommand()
    {
        $process = new SymfonyProcess(
            $this->makeCommand(),
            $this->target->workingDir
        );

        $process->run();

        $output = $this->outputToCollection($process->getOutput());

        if ($output->count() == 0) {
            return $output;
        }

        if ($rootItem = $this->target->resource->rootItem) {
            return collect($output[$rootItem]);
        }

        return $output;
    }
1313073
public function execute()
    {
        list($ignore, $standard, $suffixes) = $this->getFlags();

        $phpcs = $this->phpci->findBinary('phpcs');

        $this->phpci->logExecOutput(false);

        $cmd = $phpcs . ' --report=json %s %s %s %s %s "%s"';
        $this->phpci->executeCommand(
            $cmd,
            $standard,
            $suffixes,
            $ignore,
            $this->tab_width,
            $this->encoding,
            $this->phpci->buildPath . $this->path
        );

        $output = $this->phpci->getLastOutput();
        list($errors, $warnings) = $this->processReport($output);

        $this->phpci->logExecOutput(true);

        $success = true;
        $this->build->storeMeta('phpcs-warnings', $warnings);
        $this->build->storeMeta('phpcs-errors', $errors);

        if ($this->allowed_warnings != -1 && $warnings > $this->allowed_warnings) {
            $success = false;
        }

        if ($this->allowed_errors != -1 && $errors > $this->allowed_errors) {
            $success = false;
        }

        return $success;
    }
624896
public function options()
    {
        $commandName = $subCommandName = '';
        if (!empty($this->args[0])) {
            $commandName = $this->args[0];
        }
        if (!empty($this->args[1])) {
            $subCommandName = $this->args[1];
        }
        $options = $this->Command->options($commandName, $subCommandName);

        return $this->_output($options);
    }
1046153
public function execute()
    {
        $values = '';

        foreach ($this->values as $value) {
            $values .= $value;
        }

        return $this->replaceTokens([
            ':options' => $this->buildOptions(),
            ':values' => $values
        ]);
    }
889707
protected function buildOptions(): array
    {
        if (is_string($this->options)) {
            $this->loadRemoteOptions($this->options);
        }

        if ($this->options instanceof \Closure) {
            $this->options = $this->options->call($this->filter, $this->filter->getValue());
        }

        if ($this->options instanceof Arrayable) {
            $this->options = $this->options->toArray();
        }

        if (empty($this->script)) {
            $placeholder = trans('admin.choose');

            $this->script = <<<SCRIPT
$(".{$this->getElementClass()}").select2({
  placeholder: "$placeholder"
});

SCRIPT;
        }

        Admin::script($this->script);

        return is_array($this->options) ? $this->options : [];
    }
909964
public function execute()
    {
        $composerLocation = $this->phpci->findBinary(array('composer', 'composer.phar'));

        $cmd = '';

        if (IS_WIN) {
            $cmd = 'php ';
        }

        $cmd .= $composerLocation . ' --no-ansi --no-interaction ';

        if ($this->preferDist) {
            $this->phpci->log('Using --prefer-dist flag');
            $cmd .= ' --prefer-dist';
        }

        if ($this->preferSource) {
            $this->phpci->log('Using --prefer-source flag');
            $cmd .= ' --prefer-source';
        }

        if ($this->nodev) {
            $this->phpci->log('Using --no-dev flag');
            $cmd .= ' --no-dev';
        }

        $cmd .= ' --working-dir="%s" %s';

        return $this->phpci->executeCommand($cmd, $this->directory, $this->action);
    }
1106507
public function options()
    {
        $required = $this->requiredOptions();

        if ($required) {
            $missing = array_diff($required, array_keys($this->options));
            if ($missing) {
                throw CommandException::missingOptions($missing);
            }
        }

        $this->options += $this->defaultOptions();

        return $this->options;
    }
556952
protected function executeCommand($command)
    {

        $process = new Process($command);
        $process->run();

        return array(
            $process->getExitCode(),
            $process->getOutput(),
            $process->getErrorOutput(),
        );
    }
636222
public function buildCommands()
    {
        $result = [];
        $pluginsCollection = $this->pluginManager->getPluginCollection();

        foreach ($pluginsCollection as $plugin) {
            if ($this->isValidCommandPlugin($plugin) === true) {
                $result[] = $this->buildCommand($plugin);
            }
        }

        return $result;
    }
889273
@SuppressWarnings("static-access")
    private Options createCommandLineOptions() {
        final Options options = new Options();
        addStandardOptions(options);
        addAdvancedOptions(options);
        addDeprecatedOptions(options);
        return options;
    }
1651
private function createQueryOptions()
    {
        $options = [];

        if (isset($this->options['cursorType'])) {
            if ($this->options['cursorType'] === self::TAILABLE) {
                $options['tailable'] = true;
            }
            if ($this->options['cursorType'] === self::TAILABLE_AWAIT) {
                $options['tailable'] = true;
                $options['awaitData'] = true;
            }
        }

        foreach (['allowPartialResults', 'batchSize', 'comment', 'hint', 'limit', 'maxAwaitTimeMS', 'maxScan', 'maxTimeMS', 'noCursorTimeout', 'oplogReplay', 'projection', 'readConcern', 'returnKey', 'showRecordId', 'skip', 'snapshot', 'sort'] as $option) {
            if (isset($this->options[$option])) {
                $options[$option] = $this->options[$option];
            }
        }

        foreach (['collation', 'max', 'min'] as $option) {
            if (isset($this->options[$option])) {
                $options[$option] = (object) $this->options[$option];
            }
        }

        $modifiers = empty($this->options['modifiers']) ? [] : (array) $this->options['modifiers'];

        if ( ! empty($modifiers)) {
            $options['modifiers'] = $modifiers;
        }

        return $options;
    }
1114019
private function createFromCommand()
    {
        $command = MainCommand::getInstance($this->repository)->status(true);
        $lines = $this->repository->getCaller()->execute($command)->getOutputLines(true);
        $this->parseOutputLines($lines);
    }
511835
private function createCommandList()
    {
        $list = [];

        // read all core commands
        $this->listCommands($list, __DIR__ . '/../Commands', 'Core\Commands');

        // merge all plugin commands (plugin overrides the core)
        if (file_exists($this->pluginManifestOfCommands)) {
            /** @noinspection PhpIncludeInspection */
            $list = array_merge($list, include $this->pluginManifestOfCommands);
        }

        // merge all commands defined by application (application overrides all other)
        $this->listCommands($list, app_path('Commands'), 'App\Commands');

        // save the new command list
        ksort($list);

        return $list;
    }
682218
public function execute()
    {
        $groups = array();
        $results = array();
        $currentOperation = null;
        $currentGroup = array();

        foreach ($this->commands as $command) {
            if ($currentOperation !== $command[0]) {
                $groups[] = array($currentOperation, $currentGroup);
                $currentOperation = $command[0];
                $currentGroup = array();
            }
            if ($currentOperation === 'get') {
                $currentGroup[] = $command[1];
            } else {
                $currentGroup[$command[1]] = $command[2];
            }
        }
        $groups[] = array($currentOperation, $currentGroup);
        array_shift($groups);

        foreach ($groups as $group) {
            list($op, $args) = $group;
            if ($op === 'set') {
                $result = $this->backend->setMulti($args, $this->ttl);
                $results = array_merge($results, array_fill(0, count($args), $result));
            } else {
                $results = array_merge($results, $this->backend->getMulti($args));
            }
        }

        $this->commands = array();
        return $results;
    }