Semantic MediaWiki and related extensions
Public Member Functions | Public Attributes | List of all members
SIL\InterlanguageLinksLookup Class Reference

Public Member Functions

 __construct (LanguageTargetLinksCache $languageTargetLinksCache)
 
 setStore (Store $store)
 
 getRedirectTargetFor (Title $title)
 
 resetLookupCacheBy (Title $title)
 
 pushPageLanguageToLookupCache (Title $title=null, $languageCode)
 
 queryLanguageTargetLinks (InterlanguageLink $interlanguageLink, Title $target=null)
 
 findPageLanguageForTarget (Title $title)
 
 hasSilAnnotationFor (Title $title)
 
 findFullListOfReferenceTargetLinks (Title $title)
 

Public Attributes

const NO_LANG = ''
 

Detailed Description

This class is the most critical component of SIL as it combines the store interface with the cache interface.

Any request either for a target link or language code lookup are channelled through this class in order to make a decision whether to use an existing cache entry or to make a "fresh" query request to the storage back-end.

No other component of SIL should communicate to the store directly and let the lookup class to handle those requests.

GNU GPL v2+

Since
1.0
Author
mwjames

Constructor & Destructor Documentation

SIL\InterlanguageLinksLookup::__construct ( LanguageTargetLinksCache  $languageTargetLinksCache)
Since
1.0
Parameters
LanguageTargetLinksCache$languageTargetLinksCache

Member Function Documentation

SIL\InterlanguageLinksLookup::findFullListOfReferenceTargetLinks ( Title  $title)
Since
1.0
Parameters
Title$title
Returns
DIWikiPage[]|[]
SIL\InterlanguageLinksLookup::findPageLanguageForTarget ( Title  $title)
Since
1.0
Parameters
Title$title
Returns
string
SIL\InterlanguageLinksLookup::getRedirectTargetFor ( Title  $title)
Since
1.2
Parameters
Title$title
Returns
Title
SIL\InterlanguageLinksLookup::hasSilAnnotationFor ( Title  $title)
Since
1.1
Parameters
Title$title
Returns
boolean
SIL\InterlanguageLinksLookup::pushPageLanguageToLookupCache ( Title  $title = null,
  $languageCode 
)
Since
1.0
Parameters
Title | null$title
string$languageCode
SIL\InterlanguageLinksLookup::queryLanguageTargetLinks ( InterlanguageLink  $interlanguageLink,
Title  $target = null 
)
Since
1.0
Parameters
InterlanguageLink$interlanguageLink
Title | null$target
Returns
array
SIL\InterlanguageLinksLookup::resetLookupCacheBy ( Title  $title)
Since
1.0
Parameters
Title$title
SIL\InterlanguageLinksLookup::setStore ( Store  $store)
Since
1.0
Parameters
Store$store

Member Data Documentation

const SIL\InterlanguageLinksLookup::NO_LANG = ''

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