Symfony\Installer\DownloadCommand::getExecutedCommand PHP Method

getExecutedCommand() protected method

Returns the executed command with all its arguments (e.g. "symfony new blog 2.8.1").
protected getExecutedCommand ( ) : string
return string The executed command with all its arguments
    protected function getExecutedCommand()
    {
        $commandBinary = $_SERVER['PHP_SELF'];
        $commandBinaryDir = dirname($commandBinary);
        $pathDirs = explode(PATH_SEPARATOR, $_SERVER['PATH']);
        if (in_array($commandBinaryDir, $pathDirs)) {
            $commandBinary = basename($commandBinary);
        }
        $commandName = $this->getName();
        if ('new' === $commandName) {
            $commandArguments = sprintf('%s %s', $this->projectName, 'latest' !== $this->version ? $this->version : '');
        } elseif ('demo' === $commandName) {
            $commandArguments = '';
        }
        return sprintf('%s %s %s', $commandBinary, $commandName, $commandArguments);
    }