메소드 | 설명 | |
---|---|---|
__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. |
메소드 | 설명 | |
---|---|---|
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 | ||
리턴 | boolean |
public get_synopsis ( ) : string | ||
리턴 | string |
public set_synopsis ( $synopsis ) |
public show_usage ( string $prefix = 'usage: ' ) | ||
$prefix | string |