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

Public Member Functions

 isStrictMode ( $isStrictMode)
 
 isAnnotation ()
 
 preprocess (array $semanticLink)
 
 process (array $semanticLink)
 

Static Public Member Functions

static getRegexpPattern ( $linksInValues=false)
 

Detailed Description

GNU GPL v2+

Since
2.5
Author
mwjames

Member Function Documentation

◆ getRegexpPattern()

static SMW\Parser\LinksProcessor::getRegexpPattern (   $linksInValues = false)
static

$smwgLinksInValues (default = false) determines which regexp pattern is returned, either a more complex (lib PCRE may cause segfaults if text is long) or a simpler (no segfaults found for those, but no links in values) pattern.

If enabled (SMW accepts inputs like [[property::Some [[link]] in value]]), this may lead to PHP crashes (!) when very long texts are used as values. This is due to limitations in the library PCRE that PHP uses for pattern matching.

Since
1.9
Parameters
boolean$linksInValues
Returns
string

◆ isAnnotation()

SMW\Parser\LinksProcessor::isAnnotation ( )
Since
2.5
Returns
boolean

◆ isStrictMode()

SMW\Parser\LinksProcessor::isStrictMode (   $isStrictMode)

Whether a strict interpretation (e.g [[property::value:partOfTheValue::alsoPartOfTheValue]]) or a more loose interpretation (e.g. [[property1::property2::value]]) for annotations is expected.

Since
2.3
Parameters
boolean$isStrictMode

◆ preprocess()

SMW\Parser\LinksProcessor::preprocess ( array  $semanticLink)

A method that precedes the process method, it takes care of separating value and caption (instead of leaving this to a more complex regexp).

Since
1.9
Parameters
array$semanticLinkexpects (linktext, properties, value|caption)
Returns
string

◆ process()

SMW\Parser\LinksProcessor::process ( array  $semanticLink)

Function strips out the semantic attributes from a wiki link.

Since
1.9
Parameters
array$semanticLinkexpects (linktext, properties, value|caption)
Returns
string

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

About | General disclaimer | Privacy policy