Semantic MediaWiki and related extensions
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | List of all members
Lingo\LingoParser Class Reference

Public Member Functions

 __construct (MessageLog &$messages=null)
 
 parse ( $mwParser)
 
 getBackend ()
 
 getLingoArray ()
 
 getLingoTree ()
 
 purgeGlossaryFromCache ()
 
 setBackend (Backend $backend)
 
 setApiParams (array $params)
 

Static Public Member Functions

static getInstance ()
 
static purgeCache ()
 

Public Attributes

const WORD_VALUE = 0
 
const WORD_OFFSET = 1
 
 $regex = null
 

Protected Member Functions

buildLingo ()
 
 loadModules (&$parser)
 
 shouldParse (&$parser)
 

Detailed Description

This class parses the given text and enriches it with definitions for defined terms.

Contains a static function to initiate the parsing.

Constructor & Destructor Documentation

◆ __construct()

Lingo\LingoParser::__construct ( MessageLog $messages = null)

Lingo constructor.

Parameters
MessageLog | null$messages

Member Function Documentation

◆ buildLingo()

& Lingo\LingoParser::buildLingo ( )
protected
Returns
Tree

◆ getBackend()

Lingo\LingoParser::getBackend ( )
Returns
Backend the backend used by the parser
Exceptions

◆ getInstance()

static Lingo\LingoParser::getInstance ( )
static
Returns
LingoParser
Since
2.0.1

◆ getLingoArray()

Lingo\LingoParser::getLingoArray ( )

Returns the list of terms in the glossary

Returns
array an array mapping terms (keys) to descriptions (values)

◆ getLingoTree()

Lingo\LingoParser::getLingoTree ( )

Returns the list of terms in the glossary as a Lingo

Returns
Tree a Lingo mapping terms (keys) to descriptions (values)

◆ loadModules()

Lingo\LingoParser::loadModules ( $parser)
protected
Parameters
Parser$parser

◆ parse()

Lingo\LingoParser::parse (   $mwParser)
Parameters
Parser$mwParser
Returns
Boolean

◆ purgeCache()

static Lingo\LingoParser::purgeCache ( )
static

Purges the lingo tree from the cache.

Deprecated:
2.0.2

◆ purgeGlossaryFromCache()

Lingo\LingoParser::purgeGlossaryFromCache ( )

Purges the lingo tree from the cache.

Since
2.0.2

◆ setApiParams()

Lingo\LingoParser::setApiParams ( array  $params)

Set parser options from API

Parameters
array$params

◆ setBackend()

Lingo\LingoParser::setBackend ( Backend  $backend)
Since
2.0.1
Parameters
Backend$backend

◆ shouldParse()

Lingo\LingoParser::shouldParse ( $parser)
protected
Parameters
Parser$parser
Returns
bool

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

About | General disclaimer | Privacy policy