private function Command::validateName in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/console/Command/Command.php \Symfony\Component\Console\Command\Command::validateName()
Validates a command name.
It must be non-empty and parts can optionally be separated by ":".
Parameters
string $name:
Throws
\InvalidArgumentException When the name is invalid
2 calls to Command::validateName()
- Command::setAliases in vendor/
symfony/ console/ Command/ Command.php - Sets the aliases for the command.
- Command::setName in vendor/
symfony/ console/ Command/ Command.php - Sets the name of the command.
File
- vendor/
symfony/ console/ Command/ Command.php, line 660
Class
- Command
- Base class for all commands.
Namespace
Symfony\Component\Console\CommandCode
private function validateName($name) {
if (!preg_match('/^[^\\:]++(\\:[^\\:]++)*$/', $name)) {
throw new \InvalidArgumentException(sprintf('Command name "%s" is invalid.', $name));
}
}