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

Public Member Functions

 __construct (Collation $collation, $collationName='')
 
 armor ( $text, $source='')
 
 getSortKey ( $text)
 
 getFirstLetter ( $text)
 
 isIdentical ( $old, $new)
 

Static Public Member Functions

static singleton ( $collationName='')
 

Detailed Description

GNU GPL v2+

Since
3.0
Author
mwjames

Constructor & Destructor Documentation

◆ __construct()

SMW\MediaWiki\Collator::__construct ( Collation  $collation,
  $collationName = '' 
)
Since
3.0
Parameters
Collation$collation
string$collationName

Member Function Documentation

◆ armor()

SMW\MediaWiki\Collator::armor (   $text,
  $source = '' 
)

For any uca-* generated sortkey armor any invalid or unrecognized UTF-8 characters to prevent an invalid XML/UTF output.

Characters that cannot be expressed are replaced by ? which is surely inaccurate in comparison to the original uca-* sortkey but it allows to replicate a near surrogate string to a back-end that requires XML compliance (triple store).

Since
3.0
Parameters
string$text
Returns
string

◆ getFirstLetter()

SMW\MediaWiki\Collator::getFirstLetter (   $text)
Since
3.0
Parameters
string$text
Returns
string

◆ getSortKey()

SMW\MediaWiki\Collator::getSortKey (   $text)
Since
3.0
Parameters
string$text
Returns
string

◆ isIdentical()

SMW\MediaWiki\Collator::isIdentical (   $old,
  $new 
)
Since
3.0
Parameters
string$old
string$new
Returns
boolean

◆ singleton()

static SMW\MediaWiki\Collator::singleton (   $collationName = '')
static
Since
3.0
Parameters
string$collationName
Returns
Collator

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

About | General disclaimer | Privacy policy