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

Public Member Functions

 __construct (ParserOutput $parserOutput, Cache $cache)
 
 setOptions (array $options)
 
 getOption ( $key, $default=false)
 
 getModules ()
 
 getHtml (Title $title, WebRequest $webRequest)
 
 addUpdate (Query $query)
 
 addCheck (Query $query)
 

Public Attributes

const POST_EDIT_UPDATE = 'smw-postedit-update'
 
const POST_EDIT_CHECK = 'smw-postedit-check'
 
const POST_UPDATE_TTL = 86400
 

Detailed Description

Some updates need to be handled in via post processing, so they can use values computed in the normal update process as input.

The post process can only happen after the Store and related processes have been updated. A simple null edit is in most cases inappropriate and therefore it is necessary to do a complete re-parse (triggered by the UpdateJob). This ensures consistency among the stored and displayed data.

The PostProc relies on JavaScript (ext.smw.util.postproc.js) that triggers a web API request and reloads the page on completion of this request.

GNU GPL v2+

Since
3.0
Author
mwjames

Constructor & Destructor Documentation

◆ __construct()

SMW\PostProcHandler::__construct ( ParserOutput  $parserOutput,
Cache  $cache 
)
Since
3.0
Parameters
ParserOutput$parserOutput
Cache$cache

Member Function Documentation

◆ addCheck()

SMW\PostProcHandler::addCheck ( Query  $query)
Since
3.0
Parameters
Query$query

◆ addUpdate()

SMW\PostProcHandler::addUpdate ( Query  $query)
Since
3.0
Parameters
Query$query

◆ getHtml()

SMW\PostProcHandler::getHtml ( Title  $title,
WebRequest  $webRequest 
)
Since
3.0
Parameters
Title$title
WebRequest$webRequest
Returns
string

◆ getModules()

SMW\PostProcHandler::getModules ( )
Since
3.0
Returns
array|string

◆ getOption()

SMW\PostProcHandler::getOption (   $key,
  $default = false 
)
Since
3.0
Parameters
string$key
mixed$default
Returns
mixed

◆ setOptions()

SMW\PostProcHandler::setOptions ( array  $options)
Since
3.0
Parameters
array$options

Member Data Documentation

◆ POST_EDIT_CHECK

const SMW\PostProcHandler::POST_EDIT_CHECK = 'smw-postedit-check'

Check registered queries and its results on wether the result_hash before and after is different or not.

◆ POST_EDIT_UPDATE

const SMW\PostProcHandler::POST_EDIT_UPDATE = 'smw-postedit-update'

Identifier on whether an update to subject is to be carried out or not given the query reference used as part of an request.

◆ POST_UPDATE_TTL

const SMW\PostProcHandler::POST_UPDATE_TTL = 86400

Specifies the TTL for the temporary tracking of a post edit update.


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

About | General disclaimer | Privacy policy