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

◆ __construct()

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

Member Function Documentation

◆ findFullListOfReferenceTargetLinks()

SIL\InterlanguageLinksLookup::findFullListOfReferenceTargetLinks ( Title  $title)
Since
1.0
Parameters
Title$title
Returns
DIWikiPage[]|[]

◆ findPageLanguageForTarget()

SIL\InterlanguageLinksLookup::findPageLanguageForTarget ( Title  $title)
Since
1.0
Parameters
Title$title
Returns
string

◆ getRedirectTargetFor()

SIL\InterlanguageLinksLookup::getRedirectTargetFor ( Title  $title)
Since
1.2
Parameters
Title$title
Returns
Title

◆ hasSilAnnotationFor()

SIL\InterlanguageLinksLookup::hasSilAnnotationFor ( Title  $title)
Since
1.1
Parameters
Title$title
Returns
boolean

◆ pushPageLanguageToLookupCache()

SIL\InterlanguageLinksLookup::pushPageLanguageToLookupCache ( Title  $title = null,
  $languageCode 
)
Since
1.0
Parameters
Title | null$title
string$languageCode

◆ queryLanguageTargetLinks()

SIL\InterlanguageLinksLookup::queryLanguageTargetLinks ( InterlanguageLink  $interlanguageLink,
Title  $target = null 
)
Since
1.0
Parameters
InterlanguageLink$interlanguageLink
Title | null$target
Returns
array

◆ resetLookupCacheBy()

SIL\InterlanguageLinksLookup::resetLookupCacheBy ( Title  $title)
Since
1.0
Parameters
Title$title

◆ setStore()

SIL\InterlanguageLinksLookup::setStore ( Store  $store)
Since
1.0
Parameters
Store$store

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

About | General disclaimer | Privacy policy