MediaWiki REL1_40
|
Provides access to user options. More...
Inherits IDBAccessObject.
Inherited by MediaWiki\User\DefaultOptionsLookup, MediaWiki\User\StaticUserOptionsLookup, and MediaWiki\User\UserOptionsManager.
Public Member Functions | |
getBoolOption (UserIdentity $user, string $oname, int $queryFlags=self::READ_NORMAL) | |
Get the user's current setting for a given option, as a boolean value. | |
getDefaultOption (string $opt) | |
Get a given default option value. | |
getDefaultOptions () | |
Combine the language default options with any site-specific options and add the default language variants. | |
getIntOption (UserIdentity $user, string $oname, int $defaultOverride=0, int $queryFlags=self::READ_NORMAL) | |
Get the user's current setting for a given option, as an integer value. | |
getOption (UserIdentity $user, string $oname, $defaultOverride=null, bool $ignoreHidden=false, int $queryFlags=self::READ_NORMAL) | |
Get the user's current setting for a given option. | |
getOptions (UserIdentity $user, int $flags=0, int $queryFlags=self::READ_NORMAL) | |
Get all user's options. | |
Public Attributes | |
const | EXCLUDE_DEFAULTS = 1 |
Exclude user options that are set to their default value. | |
Public Attributes inherited from IDBAccessObject | |
const | READ_NONE = -1 |
Constants for object loading bitfield flags (higher => higher QoS) | |
MediaWiki\User\UserOptionsLookup::getBoolOption | ( | UserIdentity | $user, |
string | $oname, | ||
int | $queryFlags = self::READ_NORMAL ) |
Get the user's current setting for a given option, as a boolean value.
UserIdentity | $user | The user to get the option for |
string | $oname | The option to check |
int | $queryFlags | A bit field composed of READ_XXX flags |
Definition at line 100 of file UserOptionsLookup.php.
MediaWiki\User\UserOptionsLookup::getDefaultOption | ( | string | $opt | ) |
Get a given default option value.
string | $opt | Name of option to retrieve |
Definition at line 50 of file UserOptionsLookup.php.
References MediaWiki\User\UserOptionsLookup\getDefaultOptions().
|
abstract |
Combine the language default options with any site-specific options and add the default language variants.
Reimplemented in MediaWiki\User\DefaultOptionsLookup, MediaWiki\User\StaticUserOptionsLookup, and MediaWiki\User\UserOptionsManager.
Referenced by MediaWiki\User\UserOptionsLookup\getDefaultOption().
MediaWiki\User\UserOptionsLookup::getIntOption | ( | UserIdentity | $user, |
string | $oname, | ||
int | $defaultOverride = 0, | ||
int | $queryFlags = self::READ_NORMAL ) |
Get the user's current setting for a given option, as an integer value.
UserIdentity | $user | The user to get the option for |
string | $oname | The option to check |
int | $defaultOverride | A default value returned if the option does not exist |
int | $queryFlags | A bit field composed of READ_XXX flags |
Definition at line 119 of file UserOptionsLookup.php.
|
abstract |
Get the user's current setting for a given option.
UserIdentity | $user | The user to get the option for |
string | $oname | The option to check |
mixed | null | $defaultOverride | A default value returned if the option does not exist |
bool | $ignoreHidden | Whether to ignore the effects of $wgHiddenPrefs |
int | $queryFlags | A bit field composed of READ_XXX flags |
Reimplemented in MediaWiki\User\DefaultOptionsLookup, MediaWiki\User\StaticUserOptionsLookup, and MediaWiki\User\UserOptionsManager.
|
abstract |
Get all user's options.
UserIdentity | $user | The user to get the option for |
int | $flags | Bitwise combination of: UserOptionsManager::EXCLUDE_DEFAULTS Exclude user options that are set to the default value. |
int | $queryFlags | A bit field composed of READ_XXX flags |
Reimplemented in MediaWiki\User\DefaultOptionsLookup, MediaWiki\User\StaticUserOptionsLookup, and MediaWiki\User\UserOptionsManager.
const MediaWiki\User\UserOptionsLookup::EXCLUDE_DEFAULTS = 1 |
Exclude user options that are set to their default value.
Definition at line 34 of file UserOptionsLookup.php.