Manual:Maintenance.php/hu

Not to be confused with another file called Maintenance.php, which is in the maintenance folder.
Category:MediaWiki code/hu#Maintenance.php

The Maintenance class is the abstract maintenance class for quickly writing and churning out maintenance scripts with minimal effort.

Függvények

addDescription()

  • addDescription( $text);
    • $text: leírás beállítása.

addArg()

  • addArg( $arg, $description, $required = true );
    • $arg: argumentum neve
    • $description: az argumentum rövid leírása
    • $required: szükséges?

addOption()

  • addOption($name, $description, $required=false, $withArg=false, $shortName=false);
    • $required: szükséges a paraméter?
    • $withArg: szükséges az argumentum ezzel az opcióval?
    • $shortName: rövid névként használt karakter

A rövid név lehet pl. „m”, ha az -mFast értéket a --mode=Fast alternatívájaként szeretnéd.

getArg()

  • getArg( $argId = 0, $default = null );
    • $argId: az argumentumhoz tartozó egész (nullától)
    • $default: az alapértelmezett, ha nem létezik

getOption()

  • getOption( $name, $default = null );
    • $name: a paraméter neve
    • $default: alapértelmezett

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

Lásd még

Category:MediaWiki code/hu