Semantic MediaWiki and related extensions
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
SMW\Updater\DeferredCallableUpdate Class Reference
Collaboration diagram for SMW\Updater\DeferredCallableUpdate:
Collaboration graph
[legend]

Public Member Functions

 __construct (Closure $callback=null)
 
 isCommandLineMode ($isCommandLineMode)
 
 asPresend ()
 
 getStage ()
 
 setCallback (Closure $callback)
 
 setLogger (LoggerInterface $logger)
 
 enabledDeferredUpdate ($enabledDeferredUpdate=true)
 
 isDeferrableUpdate ($isDeferrableUpdate)
 
 markAsPending ($isPending=false)
 
 setFingerprint ($fingerprint=null)
 
 getFingerprint ()
 
 setOrigin ($origin)
 
 getOrigin ()
 
 doUpdate ()
 
 pushUpdate ()
 

Static Public Member Functions

static releasePendingUpdates ()
 

Public Attributes

const STAGE_PRESEND = 'pre'
 
const STAGE_POSTSEND = 'post'
 

Protected Member Functions

 addUpdate ($update)
 
 getLoggableContext ()
 
 log ($fname, $context= '')
 

Protected Attributes

 $isDeferrableUpdate = true
 
 $isCommandLineMode = false
 

Detailed Description

See also
MWCallableUpdate

GNU GPL v2+

Since
2.4

Constructor & Destructor Documentation

SMW\Updater\DeferredCallableUpdate::__construct ( Closure  $callback = null)
Since
2.4
Parameters
Closure$callback,|null
Database | null$connection

Member Function Documentation

SMW\Updater\DeferredCallableUpdate::addUpdate (   $update)
protected
SMW\Updater\DeferredCallableUpdate::asPresend ( )
Since
3.0
SMW\Updater\DeferredCallableUpdate::doUpdate ( )
See also
DeferrableUpdate::doUpdate
Since
2.4
SMW\Updater\DeferredCallableUpdate::enabledDeferredUpdate (   $enabledDeferredUpdate = true)
SMW\Updater\DeferredCallableUpdate::getFingerprint ( )
Since
3.0
Parameters
string | null$queue
SMW\Updater\DeferredCallableUpdate::getLoggableContext ( )
protected
SMW\Updater\DeferredCallableUpdate::getOrigin ( )
See also
DeferrableCallback::getOrigin
Since
2.5
Returns
string
SMW\Updater\DeferredCallableUpdate::getStage ( )
Since
3.0
Returns
string
SMW\Updater\DeferredCallableUpdate::isCommandLineMode (   $isCommandLineMode)
See also
https://www.mediawiki.org/wiki/Manual:$wgCommandLineMode Indicates whether MW is running in command-line mode.
Since
2.5
Parameters
boolean$isCommandLineMode
SMW\Updater\DeferredCallableUpdate::isDeferrableUpdate (   $isDeferrableUpdate)
Note
Unit/Integration tests in MW 1.26- showed ambiguous behaviour when run in deferred mode because not all MW operations were supporting late execution.
Since
3.0
SMW\Updater\DeferredCallableUpdate::log (   $fname,
  $context = '' 
)
protected
SMW\Updater\DeferredCallableUpdate::markAsPending (   $isPending = false)
Note
If wgCommandLineMode = true (e.g. MW is in CLI mode) then DeferredUpdates::addUpdate pushes updates directly into execution mode which may not be desirable for all update processes therefore hold on to it by using an internal waitableUpdate list and release them at convenience.
Since
2.4
Parameters
booloan$isPending
SMW\Updater\DeferredCallableUpdate::pushUpdate ( )
Since
2.5
static SMW\Updater\DeferredCallableUpdate::releasePendingUpdates ( )
static
Since
2.4
SMW\Updater\DeferredCallableUpdate::setCallback ( Closure  $callback)
Since
3.0
Parameters
Closure$callback
SMW\Updater\DeferredCallableUpdate::setFingerprint (   $fingerprint = null)
Note
Set a fingerprint allowing it to track and detect duplicate update requests while being unprocessed.
Since
2.5
Parameters
string | null$queue
SMW\Updater\DeferredCallableUpdate::setLogger ( LoggerInterface  $logger)
See also
LoggerAwareInterface::setLogger
Since
2.5
Parameters
LoggerInterface$logger
SMW\Updater\DeferredCallableUpdate::setOrigin (   $origin)
Since
2.5
Parameters
string$origin

Member Data Documentation

SMW\Updater\DeferredCallableUpdate::$isCommandLineMode = false
protected
SMW\Updater\DeferredCallableUpdate::$isDeferrableUpdate = true
protected
const SMW\Updater\DeferredCallableUpdate::STAGE_POSTSEND = 'post'

Updates that should run after flushing output buffer

const SMW\Updater\DeferredCallableUpdate::STAGE_PRESEND = 'pre'

Updates that should run before flushing output buffer


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