Manual:Maintenance.php/ru
Not to be confused with another file called Maintenance.php, which is in the maintenance folder.
Файл MediaWiki: Maintenance.php | |
---|---|
Расположение: | maintenance/includes/ |
Исходный код: | master • 1.42.3 • 1.41.4 • 1.39.10 |
Классы: | Maintenance |
The Maintenance class is the abstract maintenance class for quickly writing and churning out maintenance scripts with minimal effort.
Functions
addDescription()
- addDescription( $text);
- $text: установи блок описания.
addArg()
- addArg( $arg, $description, $required = true );
- $arg: название параметра arg
- $description: краткое описание параметра arg
- $required: is this required?
addOption()
- addOption($name, $description, $required=false, $withArg=false, $shortName=false);
- $required: is the param required?
- $withArg: is an argument required with this option?
- $shortName: character to use as short name
The shortname would be, e.g., 'm' if you wanted -mFast to be an alternative to --mode=Fast.
getArg()
- getArg( $argId = 0, $default = null );
- $argId: the integer value (from zero) for the arg
- $default: the default if it doesn't exist
getOption()
- getOption( $name, $default = null );
- $name: the name of the param
- $default: default
outPut()
- output( $output, $channel = null );
runChild()
- runChild( $maintClass, $classFile = null );
- maintClass: a name of a child maintenance class
- $classFile: full path of where the child is