Property | Type | Description | |
---|---|---|---|
$BOOTSTRAP_CONFIG | set CLI_SCRIPT, ABORT_AFTER_CONFIG and include config.php | ||
$BOOTSTRAP_FULL | set CLI_SCRIPT and include config.php | ||
$BOOTSTRAP_FULL_NOCLI | no CLI_SCRIPT, include config.php | ||
$BOOTSTRAP_NONE | Do not include config.php at all | ||
$arguments | |||
$cwd | string | Current working directory | |
$defaults | array | Default global options | |
$expandedOptions | array | After expanding | |
$finalOptions | array | Before expanding | |
$mooshDir | string | moosh installation directory. | |
$options | |||
$relativeDir | string | Directory relative to the current Moodle root dir. | |
$spec | GetOptionKit\OptionSpecCollection | ||
$topDir | string | Top Moodle installation directory. | |
$verbose |
Property | Type | Description | |
---|---|---|---|
$argumentNames | array | ||
$group | |||
$maxArguments | integer | . | |
$minArguments | integer | How many arguments minimum are required. | |
$name | |||
$parsedOptions | |||
$pluginInfo | array | Possible information on plugin in a current directory. | |
$session | array | Temporary session information. |
Method | Description | |
---|---|---|
__construct ( $name, $group = NULL ) | ||
addArgument ( string $name, $type = ARG_GENERIC ) | Define required argument. Call function again to add another argument. | |
addOption ( $optionSpec, $description = NULL, $default = NULL ) | ||
bootstrapLevel ( ) : integer | Should command be bootstrapped as CLI_SCRIPT and include config.php? | |
checkDirArg ( $name ) | ||
checkFileArg ( $name ) | ||
checkPathArg ( $name ) | ||
expandOptions ( ) | Make the special replacements of %s in the options | |
expandOptionsManually ( $replacements ) | Make the special replacements of %s in the options with custom list of arguments | |
getName ( ) | ||
printOptions ( ) | ||
processOptions ( $defaults ) | ||
requireHomeWriteable ( ) : integer | Does the command require writing to ~/.moosh/ directory? | |
setArguments ( $arguments ) | ||
setParsedOptions ( $parsedOptions ) | ||
setPluginInfo ( $pluginInfo ) | ||
status ( ) |
Method | Description | |
---|---|---|
getArgumentsHelp ( ) | Can be overwritten by child classes to provide custom description. | |
getLangCategory ( ) | ||
loadSession ( ) | Loads temporary session information from the temp file. | |
onErrorHelp ( ) : string | Overwrite to display extra information (e.g. help) when error occured (e.g. wrong arguments were given) | |
saveSession ( ) | Saves session information to the temp file. |
public addArgument ( string $name, $type = ARG_GENERIC ) | ||
$name | string |
public bootstrapLevel ( ) : integer | ||
return | integer |
public expandOptions ( ) |
public expandOptionsManually ( $replacements ) |
protected getArgumentsHelp ( ) |
protected loadSession ( ) |
protected onErrorHelp ( ) : string | ||
return | string |
public requireHomeWriteable ( ) : integer | ||
return | integer |
protected saveSession ( ) |
public static $BOOTSTRAP_CONFIG |
public static $BOOTSTRAP_FULL |
public static $BOOTSTRAP_FULL_NOCLI |
public static $BOOTSTRAP_NONE |
protected int $minArguments | ||
return | integer |
protected OptionResult,GetOptionKit $parsedOptions | ||
return |
protected array $pluginInfo | ||
return | array |
public string $relativeDir | ||
return | string |
public OptionSpecCollection,GetOptionKit $spec | ||
return | GetOptionKit\OptionSpecCollection |