Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F5975665
UserOptionsStore.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
UserOptionsStore.php
View Options
<?php
namespace
MediaWiki\User\Options
;
use
MediaWiki\User\UserIdentity
;
/**
* @since 1.43
* @stable to implement
*/
interface
UserOptionsStore
{
/**
* 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.
*
* @param UserIdentity $user A user with a non-zero ID
* @param int $recency a bit field composed of READ_XXX flags
* @return array<string,string>
*/
public
function
fetch
(
UserIdentity
$user
,
int
$recency
);
/**
* 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.
*
* @param UserIdentity $user A user with a non-zero ID
* @param 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.
* @return bool Whether any change was made
*/
public
function
store
(
UserIdentity
$user
,
array
$updates
);
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Oct 3, 18:25 (1 h, 35 m ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
c8/e1/705870f0afb75f0795dc7f00dc77
Default Alt Text
UserOptionsStore.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment