Provides access to user options.
More...
|
| 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.
|
|
|
const | EXCLUDE_DEFAULTS = 1 |
| Exclude user options that are set to their default value.
|
|
const | READ_LOCKING = self::READ_LATEST | 2 |
| Constants for object loading bitfield flags (higher => higher QoS)
|
|
const | READ_NONE = -1 |
|
Provides access to user options.
- Since
- 1.35
Definition at line 29 of file UserOptionsLookup.php.
◆ getBoolOption()
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.
- Parameters
-
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 |
- Returns
- bool User's current value for the option
- See also
- getOption()
Definition at line 97 of file UserOptionsLookup.php.
◆ getDefaultOption()
MediaWiki\User\UserOptionsLookup::getDefaultOption |
( |
string |
$opt | ) |
|
|
abstract |
◆ getDefaultOptions()
MediaWiki\User\UserOptionsLookup::getDefaultOptions |
( |
| ) |
|
|
abstract |
◆ getIntOption()
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.
- Parameters
-
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 |
- Returns
- int User's current value for the option
- See also
- getOption()
Definition at line 116 of file UserOptionsLookup.php.
◆ getOption()
MediaWiki\User\UserOptionsLookup::getOption |
( |
UserIdentity |
$user, |
|
|
string |
$oname, |
|
|
|
$defaultOverride = null , |
|
|
bool |
$ignoreHidden = false , |
|
|
int |
$queryFlags = self::READ_NORMAL |
|
) |
| |
|
abstract |
Get the user's current setting for a given option.
- Parameters
-
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 |
- Returns
- mixed|null User's current value for the option
- See also
- getBoolOption()
-
getIntOption()
Reimplemented in MediaWiki\User\DefaultOptionsLookup, and MediaWiki\User\UserOptionsManager.
◆ getOptions()
MediaWiki\User\UserOptionsLookup::getOptions |
( |
UserIdentity |
$user, |
|
|
int |
$flags = 0 , |
|
|
int |
$queryFlags = self::READ_NORMAL |
|
) |
| |
|
abstract |
Get all user's options.
- Parameters
-
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 |
- Returns
- array
Reimplemented in MediaWiki\User\DefaultOptionsLookup, and MediaWiki\User\UserOptionsManager.
◆ EXCLUDE_DEFAULTS
const MediaWiki\User\UserOptionsLookup::EXCLUDE_DEFAULTS = 1 |
The documentation for this class was generated from the following file: