Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Client\ChangeVisibilityNotificationJob Class Reference

Job for notifying a client wiki of a batch of revision visibility changes on the repository. More...

+ Inheritance diagram for Wikibase\Client\ChangeVisibilityNotificationJob:
+ Collaboration diagram for Wikibase\Client\ChangeVisibilityNotificationJob:

Public Member Functions

 __construct (ILoadBalancer $loadBalancer, array $params=[])
 Constructs a ChangeVisibilityNotificationJob for the repo revisions given.
 
 run ()
 

Static Public Member Functions

static newFromGlobalState (Title $unused, array $params)
 

Private Member Functions

 unpackRevisionIdentifiers (string $revisionIdentifiersJson)
 
 getRecentChangesToRedact (int $visibilityBitFlag)
 
 redactRecentChanges (array $rcIds, int $visibilityBitFlag)
 
 selectCandidateResults (string $entityIdSerialization, array $revisionIdentifiers, int $visibilityBitFlag)
 
 filterCandidateResults (IResultWrapper $candidateResults, array $revisionIdentifiers)
 
 getGroupedRepoRevisionIdentifiers ()
 
 readRecentChangeParams ( $rc_params)
 Extracts the metadata array from the value of an rc_params field.
 

Private Attributes

 $loadBalancer
 
 $revisionIdentifiers
 

Detailed Description

Job for notifying a client wiki of a batch of revision visibility changes on the repository.

Author
Marius Hoch

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Client\ChangeVisibilityNotificationJob::__construct ( ILoadBalancer  $loadBalancer,
array  $params = [] 
)

Constructs a ChangeVisibilityNotificationJob for the repo revisions given.

Parameters
ILoadBalancer$loadBalancer
array$paramsContains the name of the repo, revisionIdentifiersJson to redact and the visibilityBitFlag to set.

Member Function Documentation

◆ filterCandidateResults()

Wikibase\Client\ChangeVisibilityNotificationJob::filterCandidateResults ( IResultWrapper  $candidateResults,
array  $revisionIdentifiers 
)
private
Parameters
IResultWrapper$candidateResults
RepoRevisionIdentifier[]$revisionIdentifiers
Returns
int[]

◆ getGroupedRepoRevisionIdentifiers()

Wikibase\Client\ChangeVisibilityNotificationJob::getGroupedRepoRevisionIdentifiers ( )
private
Returns
RepoRevisionIdentifier[][]

◆ getRecentChangesToRedact()

Wikibase\Client\ChangeVisibilityNotificationJob::getRecentChangesToRedact ( int  $visibilityBitFlag)
private
Parameters
int$visibilityBitFlag
Returns
int[] rc_ids to redact

◆ newFromGlobalState()

static Wikibase\Client\ChangeVisibilityNotificationJob::newFromGlobalState ( Title  $unused,
array  $params 
)
static

◆ readRecentChangeParams()

Wikibase\Client\ChangeVisibilityNotificationJob::readRecentChangeParams (   $rc_params)
private

Extracts the metadata array from the value of an rc_params field.

Parameters
array | string$rc_params
Returns
array

◆ redactRecentChanges()

Wikibase\Client\ChangeVisibilityNotificationJob::redactRecentChanges ( array  $rcIds,
int  $visibilityBitFlag 
)
private
Parameters
int[]$rcIds
int$visibilityBitFlagTarget rc_deleted bitflag (ignore entries that already have it)

◆ run()

Wikibase\Client\ChangeVisibilityNotificationJob::run ( )
Returns
bool success

◆ selectCandidateResults()

Wikibase\Client\ChangeVisibilityNotificationJob::selectCandidateResults ( string  $entityIdSerialization,
array  $revisionIdentifiers,
int  $visibilityBitFlag 
)
private
Parameters
string$entityIdSerialization
RepoRevisionIdentifier[]$revisionIdentifiers
int$visibilityBitFlagTarget rc_deleted bitflag (ignore rows that already have it)
Returns
IResultWrapper

◆ unpackRevisionIdentifiers()

Wikibase\Client\ChangeVisibilityNotificationJob::unpackRevisionIdentifiers ( string  $revisionIdentifiersJson)
private
Parameters
string$revisionIdentifiersJson
Returns
RepoRevisionIdentifier[]

Member Data Documentation

◆ $loadBalancer

Wikibase\Client\ChangeVisibilityNotificationJob::$loadBalancer
private

◆ $revisionIdentifiers

Wikibase\Client\ChangeVisibilityNotificationJob::$revisionIdentifiers
private

The documentation for this class was generated from the following file: