Manages URIs for the linked data interface.
More...
|
| __construct (Title $interfaceTitle, array $supportedExtensions, EntityTitleLookup $entityTitleLookup) |
|
| getExtension ( $format) |
|
| getFormatName ( $extension) |
|
| parseDocName ( $doc) |
| Parser for the file-name like document name syntax for specifying an entity data document.
|
|
| getDocName (EntityId $id, $format='') |
| Returns the canonical subpage name used to address a given set of entity data.
|
|
| getDocTitle (EntityId $id, $format='') |
| Returns a Title representing the given document.
|
|
| getDocUrl (EntityId $id, $format='', $revision=0) |
| Returns a Title representing the given document.
|
|
| getCacheableUrls (EntityId $id) |
| Returns a list of all cacheable URLs for all the formats of the given entity.
|
|
Manages URIs for the linked data interface.
- Copyright
- GPL-2.0-or-later
- Author
- Daniel Kinzler
◆ __construct()
Wikibase\Repo\LinkedData\EntityDataUriManager::__construct |
( |
Title |
$interfaceTitle, |
|
|
array |
$supportedExtensions, |
|
|
EntityTitleLookup |
$entityTitleLookup |
|
) |
| |
- Parameters
-
Title | $interfaceTitle | |
string[] | $supportedExtensions | an associative Array mapping canonical format names to file extensions. |
EntityTitleLookup | $entityTitleLookup | |
◆ getCacheableUrls()
Wikibase\Repo\LinkedData\EntityDataUriManager::getCacheableUrls |
( |
EntityId |
$id | ) |
|
Returns a list of all cacheable URLs for all the formats of the given entity.
- Parameters
-
- Returns
- string[]
◆ getDocName()
Wikibase\Repo\LinkedData\EntityDataUriManager::getDocName |
( |
EntityId |
$id, |
|
|
|
$format = '' |
|
) |
| |
Returns the canonical subpage name used to address a given set of entity data.
- Parameters
-
EntityId | $id | The entity |
string | null | $format | The (normalized) format name, or '' |
- Returns
- string
◆ getDocTitle()
Wikibase\Repo\LinkedData\EntityDataUriManager::getDocTitle |
( |
EntityId |
$id, |
|
|
|
$format = '' |
|
) |
| |
Returns a Title representing the given document.
- Parameters
-
EntityId | $id | The entity |
string | null | $format | The (normalized) format name, or '' |
- Returns
- Title
◆ getDocUrl()
Wikibase\Repo\LinkedData\EntityDataUriManager::getDocUrl |
( |
EntityId |
$id, |
|
|
|
$format = '' , |
|
|
|
$revision = 0 |
|
) |
| |
Returns a Title representing the given document.
- Parameters
-
EntityId | $id | The entity |
string | null | $format | The (normalized) format name, or '' |
int | $revision | |
- Returns
- string
◆ getExtension()
Wikibase\Repo\LinkedData\EntityDataUriManager::getExtension |
( |
|
$format | ) |
|
- Parameters
-
string | $format | a canonical format name |
- Returns
- string|null a file extension (without the leading dot), or null.
◆ getFormatName()
Wikibase\Repo\LinkedData\EntityDataUriManager::getFormatName |
( |
|
$extension | ) |
|
- Parameters
-
string | $extension | file extension |
- Returns
- string|null the canonical format name (or null)
◆ parseDocName()
Wikibase\Repo\LinkedData\EntityDataUriManager::parseDocName |
( |
|
$doc | ) |
|
Parser for the file-name like document name syntax for specifying an entity data document.
This does not validate or interpret the ID or format, it just splits the string.
- Parameters
-
- Returns
- string[] A 2-element array in the form [ string $id, string $format ]
◆ $entityTitleLookup
Wikibase\Repo\LinkedData\EntityDataUriManager::$entityTitleLookup |
|
private |
◆ $interfaceTitle
Wikibase\Repo\LinkedData\EntityDataUriManager::$interfaceTitle |
|
private |
◆ $supportedExtensions
Wikibase\Repo\LinkedData\EntityDataUriManager::$supportedExtensions |
|
private |
The documentation for this class was generated from the following file: