|
MediaWiki master
|
Inherits MediaWiki\User\Options\UserOptionsStore.

Public Member Functions | |||||||
| __construct (IConnectionProvider $dbProvider, HookRunner $hookRunner) | |||||||
| fetch (UserIdentity $user, int $recency) | |||||||
| Fetch all options for a given user from the store. | |||||||
| fetchBatchForUserNames (array $keys, array $userNames) | |||||||
Fetch specific options for multiple users from the store.Return an array indexed first by option key, and second by user name.
| |||||||
| 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.
| |||||||
Definition at line 11 of file LocalUserOptionsStore.php.
| MediaWiki\User\Options\LocalUserOptionsStore::__construct | ( | IConnectionProvider | $dbProvider, |
| HookRunner | $hookRunner ) |
Definition at line 18 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 23 of file LocalUserOptionsStore.php.
| MediaWiki\User\Options\LocalUserOptionsStore::fetchBatchForUserNames | ( | array | $keys, |
| array | $userNames ) |
Fetch specific options for multiple users from the store.Return an array indexed first by option key, and second by user name.
| array | $keys | |
| array | $userNames |
Implements MediaWiki\User\Options\UserOptionsStore.
Definition at line 50 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 74 of file LocalUserOptionsStore.php.
References MediaWiki\User\UserIdentity\getId(), MediaWiki\User\Options\UserOptionsManager\isValueEqual(), and MediaWiki\User\Options\UserOptionsManager\MAX_BYTES_OPTION_VALUE.