function ArgvInput::__toString
Returns a stringified representation of the args passed to the command.
Overrides InputInterface::__toString
1 method overrides ArgvInput::__toString()
- CompletionInput::__toString in vendor/
symfony/ console/ Completion/ CompletionInput.php - Returns a stringified representation of the args passed to the command.
File
-
vendor/
symfony/ console/ Input/ ArgvInput.php, line 386
Class
- ArgvInput
- ArgvInput represents an input coming from the CLI arguments.
Namespace
Symfony\Component\Console\InputCode
public function __toString() : string {
$tokens = array_map(function ($token) {
if (preg_match('{^(-[^=]+=)(.+)}', $token, $match)) {
return $match[1] . $this->escapeToken($match[2]);
}
if ($token && '-' !== $token[0]) {
return $this->escapeToken($token);
}
return $token;
}, $this->tokens);
return implode(' ', $tokens);
}