MediaWiki master
|
Inherited by MediaWiki\User\Options\LocalUserOptionsStore.
Public Member Functions | |
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. | |
MediaWiki\User\Options\UserOptionsStore::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 |
Implemented in MediaWiki\User\Options\LocalUserOptionsStore.
MediaWiki\User\Options\UserOptionsStore::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. |
Implemented in MediaWiki\User\Options\LocalUserOptionsStore.