MediaWiki  1.28.0
UserOptions Class Reference

Public Member Functions

 __construct ($opts, $args)
 Constructor. More...
 
 run ()
 Dumb stuff to run a mode. More...
 
 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

UserOptions::__construct (   $opts,
  $args 
)

Constructor.

Will show usage and exit if script options are not correct

Parameters
array$opts
array$args

Definition at line 48 of file userOptions.inc.

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

Member Function Documentation

UserOptions::CHANGER ( )
private

Change our users options.

Definition at line 194 of file userOptions.inc.

References $dbr, $user, $username, as, DB_REPLICA, User\newFromId(), print, warn(), and wfGetDB().

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

This is used to check options.

Only needed on construction

Parameters
array$opts
array$args
Returns
bool

Definition at line 64 of file userOptions.inc.

References $args.

Referenced by __construct().

static UserOptions::getDefaultOptionsNames ( )
static

Return an array of option names.

Returns
array

Definition at line 239 of file userOptions.inc.

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

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

load script options in the object

Parameters
array$opts
array$args
Returns
bool

Definition at line 84 of file userOptions.inc.

References $args.

Referenced by __construct().

UserOptions::LISTER ( )
private

List default options and their value.

Definition at line 124 of file userOptions.inc.

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

UserOptions::run ( )

Dumb stuff to run a mode.

Definition at line 111 of file userOptions.inc.

static UserOptions::showUsageAndExit ( )
static

Definition at line 249 of file userOptions.inc.

References and(), change, database, is(), list, not, of, options(), or, php, print, save, settings, the, and user.

Referenced by __construct().

UserOptions::USAGER ( )
private

List options usage.

Definition at line 139 of file userOptions.inc.

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

UserOptions::warn ( )

The warning message and countdown.

Returns
bool

Definition at line 281 of file userOptions.inc.

References change, database, in, is(), made, print, skin(), the, use, wfCountDown(), and will.

Referenced by CHANGER().

Member Data Documentation

UserOptions::$mAnOption

Definition at line 37 of file userOptions.inc.

Referenced by USAGER().

UserOptions::$mDry

Definition at line 36 of file userOptions.inc.

UserOptions::$mMode
private

Definition at line 41 of file userOptions.inc.

UserOptions::$mNewValue

Definition at line 39 of file userOptions.inc.

UserOptions::$mOldValue

Definition at line 38 of file userOptions.inc.

UserOptions::$mQuick

Definition at line 34 of file userOptions.inc.

UserOptions::$mQuiet

Definition at line 35 of file userOptions.inc.

UserOptions::$mReady

Definition at line 41 of file userOptions.inc.


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