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

Public Member Functions

 __construct (ParserData $parserData, LinksProcessor $linksProcessor, MagicWordsFinder $magicWordsFinder, RedirectTargetFinder $redirectTargetFinder)
 
 isLinksInValues ( $isLinksInValues)
 
 showErrors ( $showErrors)
 
 getSemanticData ()
 
 parse (&$text)
 
 setStripMarkerDecoder (StripMarkerDecoder $stripMarkerDecoder)
 
 setRedirectTarget (Title $redirectTarget=null)
 
 getRegexpPattern ( $linksInValues=false)
 
 preprocess (array $semanticLink)
 

Static Public Member Functions

static hasMarker ( $text)
 
static hasPropertyLink ( $text)
 
static decodeSquareBracket ( $text)
 
static obfuscateAnnotation ( $text)
 
static removeAnnotation ( $text)
 

Public Attributes

const OFF = '[[SMW::off]]'
 
const ON = '[[SMW::on]]'
 

Protected Member Functions

 addRedirectTargetAnnotationFromText ( $text)
 
 getModules ()
 
 process (array $semanticLink)
 
 addPropertyValue ( $subject, array $properties, $value, $valueCaption)
 
 doStripMagicWordsFromText (&$text)
 

Protected Attributes

 $isEnabledNamespace
 
 $isAnnotation = true
 

Detailed Description

Class collects all functions for wiki text parsing / processing that are relevant for SMW

This class is contains all functions necessary for parsing wiki text before it is displayed or previewed while identifying SMW related annotations.

GNU GPL v2+

Since
1.9
Author
Markus Krötzsch
Denny Vrandecic
mwjames

Constructor & Destructor Documentation

◆ __construct()

SMW\Parser\InTextAnnotationParser::__construct ( ParserData  $parserData,
LinksProcessor  $linksProcessor,
MagicWordsFinder  $magicWordsFinder,
RedirectTargetFinder  $redirectTargetFinder 
)
Since
1.9
Parameters
ParserData$parserData
LinksProcessor$linksProcessor
MagicWordsFinder$magicWordsFinder
RedirectTargetFinder$redirectTargetFinder

Member Function Documentation

◆ addPropertyValue()

SMW\Parser\InTextAnnotationParser::addPropertyValue (   $subject,
array  $properties,
  $value,
  $valueCaption 
)
protected

Adds property values to the ParserOutput instance

Since
1.9
Parameters
array$properties
Returns
string

◆ decodeSquareBracket()

static SMW\Parser\InTextAnnotationParser::decodeSquareBracket (   $text)
static
Since
2.4
Parameters
string$text
Returns
text

◆ getModules()

SMW\Parser\InTextAnnotationParser::getModules ( )
protected

Returns required resource modules

Since
1.9
Returns
array

◆ getRegexpPattern()

SMW\Parser\InTextAnnotationParser::getRegexpPattern (   $linksInValues = false)
See also
LinksProcessor::getRegexpPattern
Since
1.9
Parameters
boolean$linksInValues
Returns
string

◆ getSemanticData()

SMW\Parser\InTextAnnotationParser::getSemanticData ( )
Since
3.1
Returns
SemanticData

◆ hasMarker()

static SMW\Parser\InTextAnnotationParser::hasMarker (   $text)
static
Since
3.0
Parameters
string$text
Returns
boolean

◆ hasPropertyLink()

static SMW\Parser\InTextAnnotationParser::hasPropertyLink (   $text)
static
Since
3.1
Parameters
string$text
Returns
boolean

◆ isLinksInValues()

SMW\Parser\InTextAnnotationParser::isLinksInValues (   $isLinksInValues)
Since
2.5
Parameters
boolean$isLinksInValues

◆ obfuscateAnnotation()

static SMW\Parser\InTextAnnotationParser::obfuscateAnnotation (   $text)
static
Since
2.4
Parameters
string$text
Returns
text

◆ parse()

SMW\Parser\InTextAnnotationParser::parse ( $text)

Parsing text before an article is displayed or previewed, strip out semantic properties and add them to the ParserOutput object

Since
1.9
Parameters
string&$text

◆ preprocess()

SMW\Parser\InTextAnnotationParser::preprocess ( array  $semanticLink)
See also
linksProcessor::preprocess
Since
1.9
Parameters
array$semanticLinkexpects (linktext, properties, value|caption)
Returns
string

◆ process()

SMW\Parser\InTextAnnotationParser::process ( array  $semanticLink)
protected
See also
linksProcessor::process
Since
1.9
Parameters
array$semanticLinkexpects (linktext, properties, value|caption)
Returns
string

◆ removeAnnotation()

static SMW\Parser\InTextAnnotationParser::removeAnnotation (   $text)
static
Since
2.4
Parameters
string$text
Returns
text

◆ setRedirectTarget()

SMW\Parser\InTextAnnotationParser::setRedirectTarget ( Title  $redirectTarget = null)
Since
2.1
Parameters
Title | null$redirectTarget

◆ setStripMarkerDecoder()

SMW\Parser\InTextAnnotationParser::setStripMarkerDecoder ( StripMarkerDecoder  $stripMarkerDecoder)
Since
3.0
Parameters
StripMarkerDecoder$stripMarkerDecoder

◆ showErrors()

SMW\Parser\InTextAnnotationParser::showErrors (   $showErrors)
Since
3.0
Parameters
boolean$showErrors

Member Data Documentation

◆ OFF

const SMW\Parser\InTextAnnotationParser::OFF = '[[SMW::off]]'

Internal state for switching SMW link annotations off/on during parsing ([[SMW::on]] and [[SMW:off]])


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

About | General disclaimer | Privacy policy