PHP Class Webmozart\Console\Api\Args\Format\CommandName
The command name determines which command should be executed. The console
input may contain one or several command names.
In the example below, the console arguments contain the two command names
"server" and "add":
$ console server add localhost
The last part "localhost" is the argument to the "server add" command.
Afficher le fichier
Open project: webmozart/console
Class Usage Examples
Méthodes publiques
Method Details
__construct()
public méthode
Creates a new command name.
__toString()
public méthode
Casts the command name to a string.
getAliases()
public méthode
public getAliases ( ) : string[] |
Résultat |
string[] |
The aliases of the command name. |
Returns whether a string matches the command name or one of its aliases.
public match ( string $string ) : boolean |
$string |
string |
The string to test. |
Résultat |
boolean |
Returns `true` if the given string matches the command name
or one of its aliases and `false` otherwise. |
toString()
public méthode
Returns the command name as string.