Semantic MediaWiki and related extensions
Public Member Functions | List of all members
SMW\DataUpdater Class Reference

Public Member Functions

 __construct (Store $store, SemanticData $semanticData, ChangePropagationNotifier $changePropagationNotifier)
 
 isCommandLineMode ( $isCommandLineMode)
 
 isChangeProp ( $isChangeProp)
 
 isDeferrableUpdate ( $isDeferrableUpdate)
 
 setOrigin ( $origin)
 
 getSubject ()
 
 canCreateUpdateJob ( $canCreateUpdateJob)
 
 isSkippable (Title $title, ?int &$latestRevID=null)
 
 doUpdate ()
 
 runUpdate ()
 

Detailed Description

This function takes care of storing the collected semantic data and clearing out any outdated entries for the processed page. It assumes that parsing has happened and that all relevant information are contained and provided for.

Optionally, this function also takes care of triggering indirect updates that might be needed for an overall database consistency. If the saved page describes a property or data type, the method checks whether the property type, the data type, the allowed values, or the conversion factors have changed.

GNU GPL v2+

Since
1.9
Author
mwjames

Constructor & Destructor Documentation

◆ __construct()

SMW\DataUpdater::__construct ( Store  $store,
SemanticData  $semanticData,
ChangePropagationNotifier  $changePropagationNotifier 
)
Since
1.9
Parameters
Store$store
SemanticData$semanticData
ChangePropagationNotifier$changePropagationNotifier

Member Function Documentation

◆ canCreateUpdateJob()

SMW\DataUpdater::canCreateUpdateJob (   $canCreateUpdateJob)
Since
1.9
Parameters
boolean$canCreateUpdateJob

◆ doUpdate()

SMW\DataUpdater::doUpdate ( )
Since
1.9
Returns
boolean

◆ getSubject()

SMW\DataUpdater::getSubject ( )
Since
1.9
Returns
DIWikiPage

◆ isChangeProp()

SMW\DataUpdater::isChangeProp (   $isChangeProp)
Since
3.0
Parameters
boolean$isChangeProp

◆ isCommandLineMode()

SMW\DataUpdater::isCommandLineMode (   $isCommandLineMode)
See also
https://www.mediawiki.org/wiki/Manual:$wgCommandLineMode Indicates whether MW is running in command-line mode.
Since
3.0
Parameters
boolean$isCommandLineMode

◆ isDeferrableUpdate()

SMW\DataUpdater::isDeferrableUpdate (   $isDeferrableUpdate)
Since
3.0
Parameters
boolean$isChangeProp

◆ isSkippable()

SMW\DataUpdater::isSkippable ( Title  $title,
?int &  $latestRevID = null 
)

Is the update skippable given that a revision has already been stored in SMW?

MW 1.29 made the LinksUpdate a EnqueueableDataUpdate which creates updates as JobSpecification (refreshLinksPrioritized) and posses a possibility of running an update more than once for the same RevID.

Since
3.1
Parameters
Title$title
int | null&$latestRevID
Returns
boolean

◆ runUpdate()

SMW\DataUpdater::runUpdate ( )
Note
Make sure to have a valid revision (null means delete etc.) and check if semantic data should be processed and displayed for a page in the given namespace

◆ setOrigin()

SMW\DataUpdater::setOrigin (   $origin)
Since
2.5
Parameters
string$origin

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

About | General disclaimer | Privacy policy