Semantic MediaWiki and related extensions
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Lingo\BasicBackend Class Reference
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

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

Lingo constructor.

Parameters
MessageLog | null$messages

Member Function Documentation

Lingo\BasicBackend::collectDictionaryLines ( )
protected
Exceptions
Lingo\BasicBackend::getApprovedRevisionFromTitle ( Title  $title)
protected
Parameters
Title$title
Returns
null|Revision
Lingo\BasicBackend::getLatestRevisionFromTitle ( Title  $title)
protected
Parameters
Title$title
Returns
null|Revision
Lingo\BasicBackend::getRawDictionaryContent ( Title  $dictionaryTitle)
protected
Parameters
Title$dictionaryTitle
Returns
null|string
Exceptions
Lingo\BasicBackend::getRevisionFromTitle ( Title  $title)
protected

Returns revision of the terms page.

Parameters
Title$title
Returns
null|Revision
Lingo\BasicBackend::getTitleFromText (   $dictionaryPage)
protected
Parameters
$dictionaryPage
Returns
Title
Lingo\BasicBackend::isValidGlossaryLine (   $line)
protected
Parameters
$line
Returns
bool
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
Lingo\BasicBackend::processNextGlossaryLine (   $line,
  $term,
  $definitions 
)
protected
Parameters
string$line
string$term
string[]$definitions
Returns
array
Lingo\BasicBackend::purgeCache ( WikiPage &  $wikipage)

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

Parameters
WikiPage$wikipage
Returns
Bool
Lingo\BasicBackend::queueDefinitions (   $definitions,
  $term 
)
protected
Parameters
$definitions
$term
Returns
array
Lingo\BasicBackend::registerHooks ( )
protected
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
boolean

Member Data Documentation

Lingo\BasicBackend::$mArticleLines = null
protected

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