Object representing an entry in the term store (formerly known as the term index).
More...
|
static | compare (self $a, self $b) |
| Imposes an canonical but arbitrary order on Term objects.
|
|
|
static | $validTermTypes = [ self::TYPE_ALIAS, self::TYPE_LABEL, self::TYPE_DESCRIPTION ] |
|
Object representing an entry in the term store (formerly known as the term index).
- Copyright
- GPL-2.0-or-later
- Author
- Jeroen De Dauw < jeroe.nosp@m.nded.nosp@m.auw@g.nosp@m.mail.nosp@m..com >
-
Addshore
◆ __construct()
Wikibase\Lib\TermIndexEntry::__construct |
( |
array | $fields | ) |
|
- Parameters
-
array | $fields | Associative array containing fields: self::FIELD_TYPE => string, one of self::TYPE_* constants, self::FIELD_LANGUAGE => string self::FIELD_TEXT => string self::FIELD_ENTITY => EntityId |
- Exceptions
-
ParameterAssertionException | |
◆ assertConstructFieldsAreCorrect()
Wikibase\Lib\TermIndexEntry::assertConstructFieldsAreCorrect |
( |
array | $fields | ) |
|
|
private |
◆ compare()
static Wikibase\Lib\TermIndexEntry::compare |
( |
self | $a, |
|
|
self | $b ) |
|
static |
Imposes an canonical but arbitrary order on Term objects.
Useful for sorting lists of terms for comparison.
- Parameters
-
- Returns
- int Returns 1 if $a is greater than $b, -1 if $b is greater than $a, and 0 otherwise.
◆ getEntityId()
Wikibase\Lib\TermIndexEntry::getEntityId |
( |
| ) |
|
◆ getEntityType()
Wikibase\Lib\TermIndexEntry::getEntityType |
( |
| ) |
|
◆ getFieldValuesForCompare()
static Wikibase\Lib\TermIndexEntry::getFieldValuesForCompare |
( |
self | $entry | ) |
|
|
staticprivate |
◆ getLanguage()
Wikibase\Lib\TermIndexEntry::getLanguage |
( |
| ) |
|
◆ getTerm()
Wikibase\Lib\TermIndexEntry::getTerm |
( |
| ) |
|
◆ getTermType()
Wikibase\Lib\TermIndexEntry::getTermType |
( |
| ) |
|
◆ getText()
Wikibase\Lib\TermIndexEntry::getText |
( |
| ) |
|
◆ $entityId
Wikibase\Lib\TermIndexEntry::$entityId |
|
private |
◆ $termLanguage
Wikibase\Lib\TermIndexEntry::$termLanguage |
|
private |
◆ $termText
Wikibase\Lib\TermIndexEntry::$termText |
|
private |
◆ $termType
Wikibase\Lib\TermIndexEntry::$termType |
|
private |
◆ $validTermTypes
Wikibase\Lib\TermIndexEntry::$validTermTypes = [ self::TYPE_ALIAS, self::TYPE_LABEL, self::TYPE_DESCRIPTION ] |
|
static |
◆ FIELD_ENTITY
const Wikibase\Lib\TermIndexEntry::FIELD_ENTITY = 'entityId' |
◆ FIELD_LANGUAGE
const Wikibase\Lib\TermIndexEntry::FIELD_LANGUAGE = 'termLanguage' |
◆ FIELD_NAMES
const Wikibase\Lib\TermIndexEntry::FIELD_NAMES |
|
private |
Initial value:= [
]
const FIELD_ENTITY
Definition TermIndexEntry.php:30
const FIELD_LANGUAGE
Definition TermIndexEntry.php:32
const FIELD_TEXT
Definition TermIndexEntry.php:33
const FIELD_TYPE
Definition TermIndexEntry.php:31
◆ FIELD_TEXT
const Wikibase\Lib\TermIndexEntry::FIELD_TEXT = 'termText' |
◆ FIELD_TYPE
const Wikibase\Lib\TermIndexEntry::FIELD_TYPE = 'termType' |
◆ TYPE_ALIAS
const Wikibase\Lib\TermIndexEntry::TYPE_ALIAS = 'alias' |
◆ TYPE_DESCRIPTION
const Wikibase\Lib\TermIndexEntry::TYPE_DESCRIPTION = 'description' |
◆ TYPE_LABEL
const Wikibase\Lib\TermIndexEntry::TYPE_LABEL = 'label' |
The documentation for this class was generated from the following file: