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 (Parser &$parser, &$text)
 
 getBackend ()
 
 getLingoArray ()
 
 getLingoTree ()
 
 purgeGlossaryFromCache ()
 
 setBackend (Backend $backend)
 

Static Public Member Functions

static getInstance ()
 
static purgeCache ()
 

Public Attributes

 $regex = null
 

Protected Member Functions

buildLingo ()
 
 realParse (&$parser, &$text)
 
 loadModules (&$parser)
 
 shouldParse (Parser &$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

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

Lingo constructor.

Parameters
MessageLog | null$messages

Member Function Documentation

& Lingo\LingoParser::buildLingo ( )
protected
Returns
Tree
Lingo\LingoParser::getBackend ( )
Returns
Backend the backend used by the parser
Exceptions
static Lingo\LingoParser::getInstance ( )
static
Returns
LingoParser
Since
2.0.1
Lingo\LingoParser::getLingoArray ( )

Returns the list of terms in the glossary

Returns
Array an array mapping terms (keys) to descriptions (values)
Lingo\LingoParser::getLingoTree ( )

Returns the list of terms in the glossary as a Lingo

Returns
Tree a Lingo mapping terms (keys) to descriptions (values)
Lingo\LingoParser::loadModules ( $parser)
protected
Parameters
Parser$parser
Lingo\LingoParser::parse ( Parser &  $parser,
$text 
)
Parameters
Parser$parser
string$text
Returns
Boolean
static Lingo\LingoParser::purgeCache ( )
static

Purges the lingo tree from the cache.

Deprecated:
2.0.2
Lingo\LingoParser::purgeGlossaryFromCache ( )

Purges the lingo tree from the cache.

Since
2.0.2
Lingo\LingoParser::realParse ( $parser,
$text 
)
protected

Parses the given text and enriches applicable terms

This method currently only recognizes terms consisting of max one word

Parameters
$parser
$text
Returns
Boolean
Lingo\LingoParser::setBackend ( Backend  $backend)
Since
2.0.1
Parameters
Backend$backend
Lingo\LingoParser::shouldParse ( Parser &  $parser)
protected
Parameters
Parser$parser
Returns
bool

Member Data Documentation

Lingo\LingoParser::$regex = null

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