MediaWiki master
MediaWiki\Deferred\DeferredUpdatesScopeStack Class Reference

DeferredUpdates helper class for tracking DeferrableUpdate::doUpdate() nesting levels caused by nested calls to DeferredUpdates::doUpdates() More...

Inherited by MediaWiki\Deferred\DeferredUpdatesScopeMediaWikiStack.

Public Member Functions

 __construct ()
 
 allowOpportunisticUpdates ()
 Whether DeferredUpdates::addUpdate() may run the update right away.
 
 ascend ()
 Pop the innermost scope from the stack.
 
 current ()
 
 descend ( $activeStage, DeferrableUpdate $update)
 Make a new child scope, push it onto the stack, and return it.
 
 getRecursiveDepth ()
 Get the depth of the scope stack below the root scope.
 
 onRunUpdateEnd (DeferrableUpdate $update)
 
 onRunUpdateFailed (DeferrableUpdate $update)
 
 onRunUpdateStart (DeferrableUpdate $update)
 
 queueDataUpdate (EnqueueableDataUpdate $update)
 Queue an EnqueueableDataUpdate as a job instead.
 

Detailed Description

DeferredUpdates helper class for tracking DeferrableUpdate::doUpdate() nesting levels caused by nested calls to DeferredUpdates::doUpdates()

Access: internal
For use by DeferredUpdates only
Since
1.36

Definition at line 32 of file DeferredUpdatesScopeStack.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Deferred\DeferredUpdatesScopeStack::__construct ( )

Member Function Documentation

◆ allowOpportunisticUpdates()

MediaWiki\Deferred\DeferredUpdatesScopeStack::allowOpportunisticUpdates ( )

Whether DeferredUpdates::addUpdate() may run the update right away.

Returns
bool

Reimplemented in MediaWiki\Deferred\DeferredUpdatesScopeMediaWikiStack.

Definition at line 88 of file DeferredUpdatesScopeStack.php.

◆ ascend()

MediaWiki\Deferred\DeferredUpdatesScopeStack::ascend ( )

Pop the innermost scope from the stack.

Returns
DeferredUpdatesScope

Definition at line 66 of file DeferredUpdatesScopeStack.php.

◆ current()

MediaWiki\Deferred\DeferredUpdatesScopeStack::current ( )
Returns
DeferredUpdatesScope The innermost scope

Definition at line 43 of file DeferredUpdatesScopeStack.php.

Referenced by MediaWiki\Deferred\DeferredUpdatesScopeStack\descend().

◆ descend()

MediaWiki\Deferred\DeferredUpdatesScopeStack::descend ( $activeStage,
DeferrableUpdate $update )

Make a new child scope, push it onto the stack, and return it.

Parameters
int$activeStageThe in-progress stage; one of DeferredUpdates::STAGES
DeferrableUpdate$updateThe deferred update that owns this scope
Returns
DeferredUpdatesScope Scope for the case of an in-progress deferred update

Definition at line 54 of file DeferredUpdatesScopeStack.php.

References MediaWiki\Deferred\DeferredUpdatesScopeStack\current(), and MediaWiki\Deferred\DeferredUpdatesScope\newChildScope().

◆ getRecursiveDepth()

MediaWiki\Deferred\DeferredUpdatesScopeStack::getRecursiveDepth ( )

Get the depth of the scope stack below the root scope.

Returns
int

Definition at line 79 of file DeferredUpdatesScopeStack.php.

◆ onRunUpdateEnd()

MediaWiki\Deferred\DeferredUpdatesScopeStack::onRunUpdateEnd ( DeferrableUpdate $update)
Parameters
DeferrableUpdate$update

Reimplemented in MediaWiki\Deferred\DeferredUpdatesScopeMediaWikiStack.

Definition at line 114 of file DeferredUpdatesScopeStack.php.

◆ onRunUpdateFailed()

MediaWiki\Deferred\DeferredUpdatesScopeStack::onRunUpdateFailed ( DeferrableUpdate $update)
Parameters
DeferrableUpdate$update

Reimplemented in MediaWiki\Deferred\DeferredUpdatesScopeMediaWikiStack.

Definition at line 122 of file DeferredUpdatesScopeStack.php.

◆ onRunUpdateStart()

MediaWiki\Deferred\DeferredUpdatesScopeStack::onRunUpdateStart ( DeferrableUpdate $update)
Parameters
DeferrableUpdate$update

Reimplemented in MediaWiki\Deferred\DeferredUpdatesScopeMediaWikiStack.

Definition at line 106 of file DeferredUpdatesScopeStack.php.

◆ queueDataUpdate()

MediaWiki\Deferred\DeferredUpdatesScopeStack::queueDataUpdate ( EnqueueableDataUpdate $update)

Queue an EnqueueableDataUpdate as a job instead.

See also
JobQueueGroup::push
Parameters
EnqueueableDataUpdate$update

Reimplemented in MediaWiki\Deferred\DeferredUpdatesScopeMediaWikiStack.

Definition at line 99 of file DeferredUpdatesScopeStack.php.


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