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

Provides logic to update the repo after certain changes have been performed in the client (like page moves). More...

+ Inheritance diagram for Wikibase\Client\UpdateRepo\UpdateRepo:

Public Member Functions

 __construct (SiteLinkLookup $siteLinkLookup, LoggerInterface $logger, ClientDomainDb $clientDb, UserIdentity $user, $siteId, Title $title)
 
 isApplicable ()
 Whether the update can be applied to repo.
 
 injectJob (JobQueueGroup $jobQueueGroup)
 Inject the current job into the job queue of the repo.
 

Protected Member Functions

 getEntityId ()
 Get the EntityId that we want to update.
 
 getJobDelay ()
 Get the time (in seconds) for which the job execution should be delayed (if delayed jobs are enabled).
 
 getJobParameters ()
 Get the parameters for creating a new IJobSpecification.
 
 getJobName ()
 Get the name of the Job that should be run on the repo.
 

Protected Attributes

 $user
 
 $siteId
 
 $title
 

Private Member Functions

 createJob (JobQueueGroup $jobQueueGroup)
 Returns a new job for updating the repo.
 
 delayJobs (JobQueueGroup $jobQueueGroup)
 

Private Attributes

 $siteLinkLookup
 
 $logger
 
 $clientDb
 
 $entityId = false
 

Detailed Description

Provides logic to update the repo after certain changes have been performed in the client (like page moves).

Author
Marius Hoch < hoo@o.nosp@m.nlin.nosp@m.e.de >

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Client\UpdateRepo\UpdateRepo::__construct ( SiteLinkLookup $siteLinkLookup,
LoggerInterface $logger,
ClientDomainDb $clientDb,
UserIdentity $user,
$siteId,
Title $title )
Parameters
SiteLinkLookup$siteLinkLookup
LoggerInterface$logger
ClientDomainDb$clientDb
UserIdentity$user
string$siteIdGlobal id of the client wiki
Title$titleTitle in the client that has been changed

Member Function Documentation

◆ createJob()

Wikibase\Client\UpdateRepo\UpdateRepo::createJob ( JobQueueGroup $jobQueueGroup)
private

Returns a new job for updating the repo.

Parameters
JobQueueGroup$jobQueueGroup
Returns
IJobSpecification

◆ delayJobs()

Wikibase\Client\UpdateRepo\UpdateRepo::delayJobs ( JobQueueGroup $jobQueueGroup)
private
Parameters
JobQueueGroup$jobQueueGroup
Returns
bool

◆ getEntityId()

Wikibase\Client\UpdateRepo\UpdateRepo::getEntityId ( )
protected

Get the EntityId that we want to update.

Returns
EntityId|null

◆ getJobDelay()

Wikibase\Client\UpdateRepo\UpdateRepo::getJobDelay ( )
protected

Get the time (in seconds) for which the job execution should be delayed (if delayed jobs are enabled).

Defaults to the max replag of any pooled DB server + 2 seconds.

Returns
int

◆ getJobName()

Wikibase\Client\UpdateRepo\UpdateRepo::getJobName ( )
abstractprotected

Get the name of the Job that should be run on the repo.

Returns
string

Reimplemented in Wikibase\Client\UpdateRepo\UpdateRepoOnDelete, and Wikibase\Client\UpdateRepo\UpdateRepoOnMove.

◆ getJobParameters()

Wikibase\Client\UpdateRepo\UpdateRepo::getJobParameters ( )
abstractprotected

Get the parameters for creating a new IJobSpecification.

Returns
array

Reimplemented in Wikibase\Client\UpdateRepo\UpdateRepoOnDelete, and Wikibase\Client\UpdateRepo\UpdateRepoOnMove.

◆ injectJob()

Wikibase\Client\UpdateRepo\UpdateRepo::injectJob ( JobQueueGroup $jobQueueGroup)

Inject the current job into the job queue of the repo.

Exceptions
RuntimeException
Parameters
JobQueueGroup$jobQueueGroup

◆ isApplicable()

Wikibase\Client\UpdateRepo\UpdateRepo::isApplicable ( )

Whether the update can be applied to repo.

Returns
bool

Member Data Documentation

◆ $clientDb

Wikibase\Client\UpdateRepo\UpdateRepo::$clientDb
private

◆ $entityId

Wikibase\Client\UpdateRepo\UpdateRepo::$entityId = false
private

◆ $logger

Wikibase\Client\UpdateRepo\UpdateRepo::$logger
private

◆ $siteId

Wikibase\Client\UpdateRepo\UpdateRepo::$siteId
protected

◆ $siteLinkLookup

Wikibase\Client\UpdateRepo\UpdateRepo::$siteLinkLookup
private

◆ $title

Wikibase\Client\UpdateRepo\UpdateRepo::$title
protected

◆ $user

Wikibase\Client\UpdateRepo\UpdateRepo::$user
protected

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