MediaWiki  1.23.1
UserOptions Class Reference

Public Member Functions

 __construct ( $opts, $args)
 Constructor. More...
 
 run ()
 
 warn ()
 The warning message and countdown. More...
 

Static Public Member Functions

static getDefaultOptionsNames ()
 Return an array of option names. More...
 
static showUsageAndExit ()
 

Public Attributes

 $mAnOption
 
 $mDry
 
 $mNewValue
 
 $mOldValue
 
 $mQuick
 
 $mQuiet
 
 $mReady
 

Private Member Functions

 CHANGER ()
 Change our users options. More...
 
 checkOpts ( $opts, $args)
 This is used to check options. More...
 
 initializeOpts ( $opts, $args)
 load script options in the object More...
 
 LISTER ()
 List default options and their value. More...
 
 USAGER ()
 List options usage. More...
 

Private Attributes

 $mMode
 

Detailed Description

Definition at line 33 of file userOptions.inc.

Constructor & Destructor Documentation

◆ __construct()

UserOptions::__construct (   $opts,
  $args 
)

Constructor.

Will show usage and exit if script options are not correct

Definition at line 44 of file userOptions.inc.

References $args, checkOpts(), initializeOpts(), and showUsageAndExit().

Member Function Documentation

◆ CHANGER()

UserOptions::CHANGER ( )
private

Change our users options.

Definition at line 182 of file userOptions.inc.

References $dbr, $user, array(), as, DB_SLAVE, User\newFromId(), warn(), and wfGetDB().

◆ checkOpts()

UserOptions::checkOpts (   $opts,
  $args 
)
private

This is used to check options.

Only needed on construction

Parameters
$optsarray
$argsarray
Returns
bool

Definition at line 60 of file userOptions.inc.

References $args.

Referenced by __construct().

◆ getDefaultOptionsNames()

static UserOptions::getDefaultOptionsNames ( )
static

Return an array of option names.

Returns
array

Definition at line 227 of file userOptions.inc.

References $ret, array(), as, and User\getDefaultOptions().

◆ initializeOpts()

UserOptions::initializeOpts (   $opts,
  $args 
)
private

load script options in the object

Parameters
$optsarray
$argsarray
Returns
bool

Definition at line 80 of file userOptions.inc.

References $args.

Referenced by __construct().

◆ LISTER()

UserOptions::LISTER ( )
private

List default options and their value.

Definition at line 119 of file userOptions.inc.

References $value, as, and User\getDefaultOptions().

◆ run()

UserOptions::run ( )

Definition at line 105 of file userOptions.inc.

◆ showUsageAndExit()

static UserOptions::showUsageAndExit ( )
static

Definition at line 240 of file userOptions.inc.

References available, change, database, is(), list, of, options(), php, save, settings, cssjanus\usage(), and user.

Referenced by __construct().

◆ USAGER()

UserOptions::USAGER ( )
private

List options usage.

Definition at line 132 of file userOptions.inc.

References $count, $dbr, $defaultOptions, $mAnOption, $name, $ret, $user, $value, array(), as, DB_SLAVE, User\getDefaultOptions(), User\newFromId(), and wfGetDB().

◆ warn()

UserOptions::warn ( )

The warning message and countdown.

Returns
bool

Definition at line 272 of file userOptions.inc.

References change, database, in, is(), skin(), wfCountDown(), and will.

Referenced by CHANGER().

Member Data Documentation

◆ $mAnOption

UserOptions::$mAnOption

Definition at line 37 of file userOptions.inc.

Referenced by USAGER().

◆ $mDry

UserOptions::$mDry

Definition at line 36 of file userOptions.inc.

◆ $mMode

UserOptions::$mMode
private

Definition at line 41 of file userOptions.inc.

◆ $mNewValue

UserOptions::$mNewValue

Definition at line 39 of file userOptions.inc.

◆ $mOldValue

UserOptions::$mOldValue

Definition at line 38 of file userOptions.inc.

◆ $mQuick

UserOptions::$mQuick

Definition at line 34 of file userOptions.inc.

◆ $mQuiet

UserOptions::$mQuiet

Definition at line 35 of file userOptions.inc.

◆ $mReady

UserOptions::$mReady

Definition at line 41 of file userOptions.inc.


The documentation for this class was generated from the following file: