![]() |
Bearsampp 2026.9.23
|
Static Public Member Functions | |
| static & | factory ($command, &$config) |
| static | getCommands () |
| static | getDescription ($command) |
| static & | getFrontendObject () |
| static | getGetoptArgs ($command, &$short_args, &$long_args) |
| static | getHelp ($command) |
| static & | getObject ($command) |
| static | getShortcuts () |
| static | registerCommands ($merge=false, $dir=null) |
| static & | setFrontendClass ($uiclass) |
| static | setFrontendType ($uitype) |
Definition at line 100 of file Command.php.
|
static |
Get the right object for executing a command.
| string | $command | The name of the command |
| object | $config | Instance of PEAR_Config object |
Definition at line 112 of file Command.php.
References $command, $config, $GLOBALS, $ui, getFrontendObject(), and registerCommands().
Referenced by PEAR_Command_Mirror\factory().
|
static |
Get the list of currently supported commands, and what classes implement them.
Definition at line 299 of file Command.php.
References $GLOBALS, and registerCommands().
Referenced by getHelp().
|
static |
Get description for a command.
| string | $command | Name of the command |
Definition at line 360 of file Command.php.
References $command, and $GLOBALS.
Referenced by usage().
|
static |
Get instance of frontend object.
Definition at line 162 of file Command.php.
References PEAR_Frontend\singleton().
Referenced by factory(), and getObject().
|
static |
Compiles arguments for getopt.
| string | $command | command to get optstring for |
| string | $short_args | (reference) short getopt format |
| array | $long_args | (reference) long getopt format |
Definition at line 335 of file Command.php.
References $command, $GLOBALS, getObject(), and registerCommands().
|
static |
Get help for command.
| string | $command | Name of the command to return help for |
Definition at line 376 of file Command.php.
References $command, $GLOBALS, getCommands(), and getObject().
Referenced by cmdHelp().
|
static |
Definition at line 139 of file Command.php.
References $command, $config, $GLOBALS, $ui, and getFrontendObject().
Referenced by getGetoptArgs(), and getHelp().
|
static |
Get the list of command shortcuts.
Definition at line 315 of file Command.php.
References $GLOBALS, and registerCommands().
Referenced by cmdHelp().
|
static |
Scan through the Command directory looking for classes and see what commands they implement.
| bool | (optional) if FALSE (default), the new list of commands should replace the current one. If TRUE, new entries will be merged with old. |
| string | (optional) where (what directory) to look for classes, defaults to the Command subdirectory of the directory from where this file (FILE) is included. |
Definition at line 218 of file Command.php.
References $command, and $GLOBALS.
Referenced by factory(), getCommands(), getGetoptArgs(), and getShortcuts().
|
static |
Load current frontend class.
| string | $uiclass | Name of class implementing the frontend |
Definition at line 178 of file Command.php.
References PEAR_Frontend\setFrontendClass().
Referenced by setFrontendType().
|
static |
Set current frontend.
| string | $uitype | Name of the frontend type (for example "CLI") |
Definition at line 194 of file Command.php.
References setFrontendClass().