Returns the string to execute on the command line.

@return string
173345
public function getCommand() : string
    {
        return $this->cmd
        . (count($this->options)   ? ' ' . implode(' ', $this->options)   : '')
        . ($this->isSilent         ? ' 2> /dev/null'                      : '');
    }
936295
public function getCommandLine()
    {
        if (\Yii::$app === null || !$this->getIsConsoleRequest()) {
            return null;
        }

        $params = [];
        if (isset($_SERVER['argv'])) {
            $params = $_SERVER['argv'];
        }
        return implode(' ', $params);
    }
126137
public function getCommand()
    {
        $options = $this->getOptions();
        $arguments = $this->getArguments();

        $to = null;
        $from = $arguments['from'];

        if (true === isset($arguments['to'])) {
            $to = $arguments['to'];
        }

        array_walk($options, function (&$option) {
            $option = '--' . $option;
        });

        array_walk($arguments, function (&$value, $argument) {
            $value = '--' . $argument . '=' . $value;
        });

        return trim(sprintf('%s %s %s', $this->getBaseCommand(), $this->getRange($from, $to), join(' ', $options)));
    }
852499
private function getExecutedCommand()
    {
        $pathDirs = explode(PATH_SEPARATOR, $_SERVER['PATH']);
        $executedCommand = $_SERVER['PHP_SELF'];
        $executedCommandDir = dirname($executedCommand);

        if (in_array($executedCommandDir, $pathDirs)) {
            $executedCommand = basename($executedCommand);
        }

        return $executedCommand;
    }
846140
public function toString()
    {
        $uses = $this->getIterator();
        $string = '';
        foreach ($uses as $use) {
            $string .= $use->toString();
        }

        return $string;
    }
1031149
public function getAsString(): string
    {
        return implode(
            '_',
            array_filter([
                (string) $this->getLanguage(),
                (string) $this->getRegion(),
                (string) $this->getScript(),
            ])
        );
    }
943060
public function getCommand()
    {
        $path    = $this->getPath();
        $options = $this->getOptions();

        $this->validateExecutable($path);

        if ($this->cache) {
            array_push($options, '--disk-cache=true');
        }

        if ($this->debug) {
            array_push($options, '--debug=true');
        }

        return sprintf('%s %s', $path, implode(' ', $options));
    }
796456
public function execute(string $command): string
    {
        $result = shell_exec($command);
        if ($result === null) {
            $result = '';
        }
        return $result;
    }
1313130
public function getCommand() {

        // Initialize the command.
        $command = $this->getBinaryPath();
        $command .= true === OSHelper::isWindows() ? ".exe" : "";

        // Return the command.
        return realpath($command);
    }
650526
protected function constructCommand()
    {
        $command = array();
        $command[] = $this->executable;

        if (!empty($this->options)) {
            $command[] = "-".implode($this->options);
        }

        foreach ($this->arguments as $argument => $values) {
            foreach ($values as $value) {
                if (strlen($argument) == 1) {
                    $command[] = "-".$argument." '".$value."'";
                } else {
                    $command[] = "--".(is_string($value) || is_int($value) ? $argument." '".$value."'" : $argument);
                }
            }
        }

        if (!empty($this->parameters)) {
            $command[] = implode(" ", $this->parameters);
        }

        $stringCommand = implode(" ", $command);

        return $stringCommand;
    }
706744
private function getCommand()
    {
        $php = array(PHP_BINARY);
        $args = array_slice($_SERVER['argv'], 1);

        if (!$this->persistent) {
            // Use command-line options
            array_push($php, '-n', '-c', $this->tmpIni);
        }

        if (defined('STDOUT') && Process::supportsColor(STDOUT)) {
            $args = Process::addColorOption($args, $this->colorOption);
        }

        $args = array_merge($php, array($this->script), $args);

        $cmd = Process::escape(array_shift($args), true, true);
        foreach ($args as $arg) {
            $cmd .= ' '.Process::escape($arg);
        }

        return $cmd;
    }
1337169
public function execute(string $command): string
    {
        return $this->shellFacade->runCommand($this->command . ' ' . $command);
    }
145779
protected function prepareCommand(): string
    {
        return sprintf(
            (($this->isWindows() ? '' : 'exec ') .'%s -S %s:%s %s'),
            (new PhpExecutableFinder())->find(false),
            $this->host,
            $this->port,
            __DIR__.'/server.php'
        );
    }
225956
public function getAsString(): string
    {
        $text = $this->source->getAsString();

        $stripAll = new StripAllFilter();
        $htmlFilter = new HtmlFilter();

        /* Removing CDATA tags */
        $text = preg_replace_callback(
            '#<!\[CDATA\[(.*?)\]\]>#ums',
            function ($match) use ($htmlFilter) {
                $string = $htmlFilter->filter($match[1]);

                //      <![CDATA[               ]]
                return '         ' . $string . '  ';
            },
            $text
        );

        /* Processing bottom level tags */
        $text = preg_replace_callback(
            '#(<(\w+)(\s[^>]*?)?>)([^<>]*)(</\w+\s*>)#um',
            function ($match) use ($stripAll) {
                if (strtolower($match[2]) === 'target') {
                    $replace = $stripAll->filter($match[1]) . $match[4]
                        . $stripAll->filter($match[5]);
                } else {
                    $replace = $stripAll->filter($match[0]);
                }

                return $replace;
            },
            $text
        );

        /* Other replacements */
        foreach ($this->filters as $pattern => $filter) {
            if (null === $filter) {
                $filter = $stripAll;
            }
            $text = preg_replace_callback(
                $pattern,
                function ($match) use ($filter) {
                    return $filter->filter($match[0]);
                },
                $text
            );
        }

        return $text;
    }
434786
public function string(): string
    {
        return implode("\n",
            array_map(
                function (PEM $pem) {
                    return $pem->string();
                }, $this->_pems));
    }
560960
public function getCommand()
    {
        return sprintf(
            "put %d %d %d %d",
            $this->_priority,
            $this->_delay,
            $this->_ttr,
            strlen($this->_message)
        );
    }
759882
protected function serverCommand()
    {
        return sprintf('%s -S %s:%s %s',
            ProcessUtils::escapeArgument((new PhpExecutableFinder)->find(false)),
            $this->host(),
            $this->port(),
            ProcessUtils::escapeArgument(base_path('server.php'))
        );
    }