A dedicated formatter for concept URIs referring to entities on a vocabulary repository.
More...
|
| __construct (EntityIdParser $vocabUriParser, LabelDescriptionLookup $labelLookup, array $unitlessUnitIds=[]) |
|
| format ( $conceptUri) |
|
A dedicated formatter for concept URIs referring to entities on a vocabulary repository.
- Copyright
- GPL-2.0-or-later
- Author
- Thiemo Kreuz
◆ __construct()
Wikibase\Lib\Formatters\VocabularyUriFormatter::__construct |
( |
EntityIdParser |
$vocabUriParser, |
|
|
LabelDescriptionLookup |
$labelLookup, |
|
|
array |
$unitlessUnitIds = [] |
|
) |
| |
- Parameters
-
EntityIdParser | $vocabUriParser | |
LabelDescriptionLookup | $labelLookup | |
string[] | $unitlessUnitIds | A list of IDs that represent the "unitless" unit (one), e.g. "http://www.wikidata.org/entity/Q199". The strings "" and "1" are always treated as "non-units". |
◆ format()
Wikibase\Lib\Formatters\VocabularyUriFormatter::format |
( |
|
$conceptUri | ) |
|
- See also
- ValueFormatter::format
- Parameters
-
- Exceptions
-
- Returns
- string|null Null if the concept URI refers to a unitless unit. Otherwise a label or an entity ID or the original concept URI.
◆ $labelLookup
Wikibase\Lib\Formatters\VocabularyUriFormatter::$labelLookup |
|
private |
◆ $unitlessUnitIds
Wikibase\Lib\Formatters\VocabularyUriFormatter::$unitlessUnitIds |
|
private |
◆ $vocabUriParser
Wikibase\Lib\Formatters\VocabularyUriFormatter::$vocabUriParser |
|
private |
The documentation for this class was generated from the following file: