Methods summary
public
|
|
public
static
|
#
setName( string $name )
Sets the name of the command.
Sets the name of the command.
Contrary to the base implementation, the name of an option command must
contain at least two characters.
Parameters
- $name
- The name of the command.
Returns
static The current instance.
Overrides
|
public
string
|
|
public
static
|
|
public
string
|
#
getShortName( )
Returns the short option name of the command.
Returns the short option name of the command.
Returns
string The short option name.
|
public
static
|
#
setShortName( string $shortName )
Sets the short option name of the command.
Sets the short option name of the command.
The short name must consist of a single letter. The short name is
preceded by a single dash "-" when calling the command:
$ server -d localhost
In the example above, "d" is the short name of the "server --delete"
command.
Parameters
- $shortName
- The short option name.
Returns
static The current instance.
|
public
static
|
#
setPreferLongName( )
Marks the long name to be preferred over the short name.
Marks the long name to be preferred over the short name.
This information is mainly used in the help where the preferred name is
listed before alternative names.
Returns
static The current instance.
See
|
public
static
|
#
setPreferShortName( )
Marks the short name to be preferred over the long name.
Marks the short name to be preferred over the long name.
This information is mainly used in the help where the preferred name is
listed before alternative names.
Returns
static The current instance.
See
|
public
boolean
|
#
isLongNamePreferred( )
Returns whether the long name should be preferred over the short name.
Returns whether the long name should be preferred over the short name.
If no preference was set, the short name is preferred by default if one
is set. If no short name is set, the long name is preferred by default.
Returns
boolean Returns true if the long name should be preferred over the
short name.
See
|
public
boolean
|
#
isShortNamePreferred( )
Returns whether the short name should be preferred over the long name.
Returns whether the short name should be preferred over the long name.
If no preference was set, the short name is preferred by default if one
is set. If no short name is set, the long name is preferred by default.
Returns
boolean Returns true if the short name should be preferred over
the long name.
See
|
public
Webmozart\Console\Api\Args\Format\ArgsFormat
|
|