Méthode | Description | |
---|---|---|
__construct ( $parent, $name, $docparser, $when_invoked ) | ||
can_have_subcommands ( ) : boolean | Subcommands can't have subcommands because they represent code to be executed. | |
get_alias ( ) : string | If an alias is set, grant access to it. | |
get_synopsis ( ) : string | Get the synopsis string for this subcommand. | |
get_usage ( string $prefix ) : string | Get the usage of the subcommand as a formatted string. | |
invoke ( array $args, array $assoc_args, $extra_args ) | Invoke the subcommand with the supplied arguments. | |
set_synopsis ( $synopsis ) | Set the synopsis string for this subcommand. | |
show_usage ( string $prefix = 'usage: ' ) | Print the usage details to the end user. |
Méthode | Description | |
---|---|---|
extract_synopsis ( string $longdesc ) : string | Extract the synopsis from PHPdoc string. | |
prompt ( string $question, string $default ) : string | false | Wrapper for CLI Tools' prompt() method. | |
prompt_args ( array $args, array $assoc_args ) : array | Interactively prompt the user for input based on defined synopsis and passed arguments. | |
validate_args ( array $args, array $assoc_args, array $extra_args ) : array | Validate the supplied arguments to the command. |
public can_have_subcommands ( ) : boolean | ||
Résultat | boolean |
public get_synopsis ( ) : string | ||
Résultat | string |
public set_synopsis ( $synopsis ) |
public show_usage ( string $prefix = 'usage: ' ) | ||
$prefix | string |