function Input::escapeToken
Escapes a token through escapeshellarg if it contains unsafe chars.
2 calls to Input::escapeToken()
- ArgvInput::__toString in vendor/
symfony/ console/ Input/ ArgvInput.php - Returns a stringified representation of the args passed to the command.
- ArrayInput::__toString in vendor/
symfony/ console/ Input/ ArrayInput.php - Returns a stringified representation of the args passed to the command.
File
-
vendor/
symfony/ console/ Input/ Input.php, line 154
Class
- Input
- Input is the base class for all concrete Input classes.
Namespace
Symfony\Component\Console\InputCode
public function escapeToken(string $token) : string {
return preg_match('{^[\\w-]+$}', $token) ? $token : escapeshellarg($token);
}