Semantic MediaWiki and related extensions
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Lingo\BasicBackend Class Reference
Inheritance diagram for Lingo\BasicBackend:
Inheritance graph
[legend]
Collaboration diagram for Lingo\BasicBackend:
Collaboration graph
[legend]

Public Member Functions

 __construct (MessageLog &$messages=null)
 
 next ()
 
 purgeCache (WikiPage &$wikipage)
 
 useCache ()
 
- Public Member Functions inherited from Lingo\Backend
 __construct (MessageLog &$messages=null)
 
 getMessageLog ()
 
 getLingoParser ()
 
 setLingoParser (LingoParser $mLingoParser)
 
 useCache ()
 
 next ()
 

Protected Member Functions

 registerHooks ()
 
 processNextGlossaryLine ( $line, $term, $definitions)
 
 queueDefinitions ( $definitions, $term)
 
 collectDictionaryLines ()
 
 getRawDictionaryContent (Title $dictionaryTitle)
 
 getRevisionFromTitle (Title $title)
 
 getTitleFromText ( $dictionaryPage)
 
 getApprovedRevisionFromTitle (Title $title)
 
 getLatestRevisionFromTitle (Title $title)
 
 isValidGlossaryLine ( $line)
 

Protected Attributes

 $mArticleLines = null
 
- Protected Attributes inherited from Lingo\Backend
 $mMessageLog
 
 $mLingoParser
 

Detailed Description

The Lingo class.

Constructor & Destructor Documentation

◆ __construct()

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

Lingo constructor.

Parameters
MessageLog | null$messages

Member Function Documentation

◆ collectDictionaryLines()

Lingo\BasicBackend::collectDictionaryLines ( )
protected
Exceptions

◆ getApprovedRevisionFromTitle()

Lingo\BasicBackend::getApprovedRevisionFromTitle ( Title  $title)
protected
Parameters
Title$title
Returns
null|Revision

◆ getLatestRevisionFromTitle()

Lingo\BasicBackend::getLatestRevisionFromTitle ( Title  $title)
protected
Parameters
Title$title
Returns
null|Revision

◆ getRawDictionaryContent()

Lingo\BasicBackend::getRawDictionaryContent ( Title  $dictionaryTitle)
protected
Parameters
Title$dictionaryTitle
Returns
null|string

◆ getRevisionFromTitle()

Lingo\BasicBackend::getRevisionFromTitle ( Title  $title)
protected

Returns revision of the terms page.

Parameters
Title$title
Returns
null|Revision

◆ getTitleFromText()

Lingo\BasicBackend::getTitleFromText (   $dictionaryPage)
protected
Parameters
$dictionaryPage
Returns
Title

◆ isValidGlossaryLine()

Lingo\BasicBackend::isValidGlossaryLine (   $line)
protected
Parameters
$line
Returns
bool

◆ next()

Lingo\BasicBackend::next ( )

This function returns the next element. The element is an array of four strings: Term, Definition, Link, Source. For the Lingo Link and Source are set to null. If there is no next element the function returns null.

Returns
array | null
Exceptions

◆ processNextGlossaryLine()

Lingo\BasicBackend::processNextGlossaryLine (   $line,
  $term,
  $definitions 
)
protected
Parameters
string$line
string$term
string[]$definitions
Returns
array

◆ purgeCache()

Lingo\BasicBackend::purgeCache ( WikiPage &  $wikipage)

Initiates the purging of the cache when the Terminology page was saved or purged.

Parameters
WikiPage$wikipage
Returns
Bool

◆ queueDefinitions()

Lingo\BasicBackend::queueDefinitions (   $definitions,
  $term 
)
protected
Parameters
string[]$definitions
string$term
Returns
array

◆ useCache()

Lingo\BasicBackend::useCache ( )

The basic backend is cache-enabled so this function returns true.

Actual caching is done by the parser, the backend just calls Lingo::purgeCache when necessary.

Returns
bool

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

About | General disclaimer | Privacy policy