MediaWiki master
|
Inherits MediaWiki\User\Options\UserOptionsStore.
Public Member Functions | |
__construct (IConnectionProvider $dbProvider) | |
fetch (UserIdentity $user, int $recency) | |
Fetch all options for a given user from the store. | |
store (UserIdentity $user, array $updates) | |
Process a batch of option updates. | |
Definition at line 9 of file LocalUserOptionsStore.php.
MediaWiki\User\Options\LocalUserOptionsStore::__construct | ( | IConnectionProvider | $dbProvider | ) |
Definition at line 15 of file LocalUserOptionsStore.php.
MediaWiki\User\Options\LocalUserOptionsStore::fetch | ( | UserIdentity | $user, |
int | $recency ) |
Fetch all options for a given user from the store.
Note that OptionsStore does not handle fallback to default. Options are either present or absent.
UserIdentity | $user | A user with a non-zero ID |
int | $recency | a bit field composed of READ_XXX flags |
Implements MediaWiki\User\Options\UserOptionsStore.
Definition at line 19 of file LocalUserOptionsStore.php.
MediaWiki\User\Options\LocalUserOptionsStore::store | ( | UserIdentity | $user, |
array | $updates ) |
Process a batch of option updates.
The store may assume that fetch() was previously called with a recency sufficient to provide reference values for a differential update. It is the caller's responsibility to manage recency.
Note that OptionsStore does not have a concept of defaults. The store is not required to check whether the value matches the default.
UserIdentity | $user | A user with a non-zero ID |
array<string,string|null> | $updates A map of option names to new values. If the value is null, the key should be deleted from the store and subsequently not returned from fetch(). Absent keys should be left unchanged. |
Implements MediaWiki\User\Options\UserOptionsStore.
Definition at line 40 of file LocalUserOptionsStore.php.
References MediaWiki\User\UserIdentity\getId(), MediaWiki\User\Options\UserOptionsManager\isValueEqual(), and MediaWiki\User\Options\UserOptionsManager\MAX_BYTES_OPTION_VALUE.