Semantic MediaWiki and related extensions
Public Member Functions | List of all members
SMW\PropertyLabelFinder Class Reference

Public Member Functions

 __construct (Store $store, array $languageDependentPropertyLabels=[], array $canonicalPropertyLabels=[], array $canonicalDatatypeLabels=[])
 
 getKownPredefinedPropertyLabels ()
 
 findCanonicalPropertyLabelById ( $id)
 
 findPropertyLabelById ( $id)
 
 findPropertyLabelFromIdByLanguageCode ( $id, $languageCode='')
 
 findPreferredPropertyLabelByLanguageCode ( $id, $languageCode='')
 
 findPropertyListFromLabelByLanguageCode ( $text, $languageCode='')
 
 searchPropertyIdByLabel ( $label)
 
 registerPropertyLabel ( $id, $label, $asCanonical=true)
 

Detailed Description

GNU GPL v2+

Since
2.2
Author
mwjames

Constructor & Destructor Documentation

◆ __construct()

SMW\PropertyLabelFinder::__construct ( Store  $store,
array  $languageDependentPropertyLabels = [],
array  $canonicalPropertyLabels = [],
array  $canonicalDatatypeLabels = [] 
)
Since
2.2
Parameters
Store$store
array$languageDependentPropertyLabels
array$canonicalPropertyLabels

Member Function Documentation

◆ findCanonicalPropertyLabelById()

SMW\PropertyLabelFinder::findCanonicalPropertyLabelById (   $id)
Since
2.4
Parameters
string$id
Returns
string|boolean

◆ findPreferredPropertyLabelByLanguageCode()

SMW\PropertyLabelFinder::findPreferredPropertyLabelByLanguageCode (   $id,
  $languageCode = '' 
)
Since
2.5
Parameters
string$id
string$languageCode
Returns
string

◆ findPropertyLabelById()

SMW\PropertyLabelFinder::findPropertyLabelById (   $id)
Note
An empty string is returned for incomplete translation (language bug) or deliberately invisible property
Since
2.2
Parameters
string$id
Returns
string

◆ findPropertyLabelFromIdByLanguageCode()

SMW\PropertyLabelFinder::findPropertyLabelFromIdByLanguageCode (   $id,
  $languageCode = '' 
)
Note
An empty string is returned for incomplete translation (language bug) or deliberately invisible property
Since
2.5
Parameters
string$id
string$languageCode
Returns
string

◆ findPropertyListFromLabelByLanguageCode()

SMW\PropertyLabelFinder::findPropertyListFromLabelByLanguageCode (   $text,
  $languageCode = '' 
)
Since
2.5
Parameters
string$text
string$languageCode
Returns
DIProperty[]|[]

◆ getKownPredefinedPropertyLabels()

SMW\PropertyLabelFinder::getKownPredefinedPropertyLabels ( )
Since
2.2
Returns
array

◆ registerPropertyLabel()

SMW\PropertyLabelFinder::registerPropertyLabel (   $id,
  $label,
  $asCanonical = true 
)
Since
2.2
Parameters
string$id
string$label

◆ searchPropertyIdByLabel()

SMW\PropertyLabelFinder::searchPropertyIdByLabel (   $label)
Since
2.2
Parameters
string$label
Returns
string|false

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

About | General disclaimer | Privacy policy