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

Public Member Functions

 __construct (Title $title, ParserOutput $parserOutput, Cache $cache=null)
 
 getOption ($key)
 
 setOption ($key, $value)
 
 setOrigin ($origin)
 
 getTitle ()
 
 getSubject ()
 
 getOutput ()
 
 disableBackgroundUpdateJobs ()
 
 canModifySemanticData ()
 
 isEnabledWithUpdateJob ()
 
 getErrors ()
 
 addError ($error)
 
 setSemanticData (SemanticData $semanticData)
 
 setData (SemanticData $semanticData)
 
 getSemanticData ()
 
 getData ()
 
 setEmptySemanticData ()
 
 clearData ()
 
 updateOutput ()
 
 importFromParserOutput (ParserOutput $parserOutput=null)
 
 pushSemanticDataToParserOutput ()
 
 setSemanticDataStateToParserOutputProperty ()
 
 isAnnotatedWithSemanticData ()
 
 addDataValue (DataValue $dataValue)
 
 markUpdate ($rev)
 
 updateStore ($enabledDeferredUpdate=false)
 
 addLimitReport ($key, $value)
 

Public Attributes

const DATA_ID = 'smwdata'
 
const CACHE_NAMESPACE = 'smw:update'
 
const OPT_FORCED_UPDATE = 'smw:opt.forced.update'
 
const NO_QUERY_DEPENDENCY_TRACE = 'no.query.dependency.trace'
 

Protected Member Functions

 hasExtensionData ()
 

Detailed Description

Handling semantic data exchange with a ParserOutput object

Provides access to a semantic data container that is generated either from the ParserOutput or is a newly created container

GNU GPL v2+

Since
1.9
Author
mwjames
Markus Krötzsch

Constructor & Destructor Documentation

SMW\ParserData::__construct ( Title  $title,
ParserOutput  $parserOutput,
Cache  $cache = null 
)
Since
1.9
Parameters
Title$title
ParserOutput$parserOutput
Cache | null$cache

Member Function Documentation

SMW\ParserData::addDataValue ( DataValue  $dataValue)
See also
SemanticData::addDataValue
Since
1.9
Parameters
SMWDataValue$dataValue
SMW\ParserData::addError (   $error)
Since
1.9
SMW\ParserData::addLimitReport (   $key,
  $value 
)
Note
ParserOutput::setLimitReportData
Since
2.4
Parameters
string$key
string$value
SMW\ParserData::canModifySemanticData ( )
Since
2.4
Returns
boolean
SMW\ParserData::clearData ( )
Deprecated:
since 2.1, use setEmptySemanticData
SMW\ParserData::disableBackgroundUpdateJobs ( )

Explicitly disable update jobs (e.g when running store update in the job queue)

Since
1.9
SMW\ParserData::getData ( )
Deprecated:
since 2.0, use getSemanticData
SMW\ParserData::getErrors ( )

Returns collected errors occurred during processing

Since
1.9
Returns
array
SMW\ParserData::getOption (   $key)
Since
2.5
Parameters
string$key
Returns
mixed
SMW\ParserData::getOutput ( )
Since
1.9
Returns
ParserOutput
SMW\ParserData::getSemanticData ( )
Since
1.9
Returns
SemanticData
SMW\ParserData::getSubject ( )
Since
1.9
Returns
DIWikiPage
SMW\ParserData::getTitle ( )
Since
1.9
Returns
Title
SMW\ParserData::hasExtensionData ( )
protected

FIXME Remove when MW 1.21 becomes mandatory

SMW\ParserData::importFromParserOutput ( ParserOutput  $parserOutput = null)
Since
2.1
Parameters
ParserOutput|null
SMW\ParserData::isAnnotatedWithSemanticData ( )
Since
2.5
Returns
boolean
SMW\ParserData::isEnabledWithUpdateJob ( )
Since
2.1
Returns
boolean
SMW\ParserData::markUpdate (   $rev)

Persistent marker to identify an update with a revision ID and allow to filter successive updates with that very same ID.

See also
LinksUpdateConstructed::process
Since
3.0
Parameters
integer$rev
SMW\ParserData::pushSemanticDataToParserOutput ( )
Since
2.1
SMW\ParserData::setData ( SemanticData  $semanticData)
Deprecated:
since 2.0, use setSemanticData
SMW\ParserData::setEmptySemanticData ( )
Since
2.1
SMW\ParserData::setOption (   $key,
  $value 
)
Since
2.5
Parameters
string$key
string$value
SMW\ParserData::setOrigin (   $origin)
Since
2.5
Parameters
string$origin
SMW\ParserData::setSemanticData ( SemanticData  $semanticData)
Since
1.9
Parameters
SemanticData$semanticData
SMW\ParserData::setSemanticDataStateToParserOutputProperty ( )
Since
2.1
SMW\ParserData::updateOutput ( )
Deprecated:
since 2.1, use pushSemanticDataToParserOutput
SMW\ParserData::updateStore (   $enabledDeferredUpdate = false)

This method is not for public use

Since
1.9
Returns
boolean

Member Data Documentation

const SMW\ParserData::CACHE_NAMESPACE = 'smw:update'

Identifies the cache namespace for update markers

const SMW\ParserData::DATA_ID = 'smwdata'

Identifies the extension data

const SMW\ParserData::NO_QUERY_DEPENDENCY_TRACE = 'no.query.dependency.trace'

Indicates that no #ask dependency tracking should occur

const SMW\ParserData::OPT_FORCED_UPDATE = 'smw:opt.forced.update'

Option that allows to force an update even in cases where an update marker exists


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