|
Wikibase
MediaWiki Wikibase extension
|
Public Member Functions | |
| __construct (EntitySourceDefinitions $entitySourceDefinitions, string $baseUrl, string $articlePath, string $scriptPath) | |
| getPageUrl (string $page) | |
| formatLink (string $url, string $text, array $attribs=[]) | |
| Format a link, with url encoding. | |
| buildEntityLink (EntityId $entityId, array $classes=[], ?string $text=null) | |
| Constructs an html link to an entity. | |
| getEntityTitle (EntityId $entityId) | |
| getEntityUrl (EntityId $entityId) | |
| Constructs a link to an entity. | |
| getEntityConceptUri (EntityId $entityId) | |
| Constructs the machine followable link to an entity. | |
| getBaseUrl () | |
| getApiUrl () | |
| getIndexUrl () | |
| addQueryParams (string $url, array $params) | |
Private Member Functions | |
| encodePage (string $page) | |
| getConceptBaseUri (EntityId $entityId) | |
Private Attributes | |
| $baseUrl | |
| $articlePath | |
| $scriptPath | |
| $entitySourceDefinitions | |
| Wikibase\Client\RepoLinker::__construct | ( | EntitySourceDefinitions | $entitySourceDefinitions, |
| string | $baseUrl, | ||
| string | $articlePath, | ||
| string | $scriptPath ) |
| Wikibase\Client\RepoLinker::addQueryParams | ( | string | $url, |
| array | $params ) |
| Wikibase\Client\RepoLinker::buildEntityLink | ( | EntityId | $entityId, |
| array | $classes = [], | ||
| ?string | $text = null ) |
Constructs an html link to an entity.
| EntityId | $entityId | |
| array | $classes | |
| string | null | $text | Defaults to the entity id serialization. |
|
private |
| Wikibase\Client\RepoLinker::formatLink | ( | string | $url, |
| string | $text, | ||
| array | $attribs = [] ) |
Format a link, with url encoding.
| string | $url | |
| string | $text | |
| array | $attribs |
| Wikibase\Client\RepoLinker::getApiUrl | ( | ) |
| Wikibase\Client\RepoLinker::getBaseUrl | ( | ) |
|
private |
| EntityId | $entityId |
| LogicException | when there is no base URI for the repository $entityId belongs to |
| Wikibase\Client\RepoLinker::getEntityConceptUri | ( | EntityId | $entityId | ) |
Constructs the machine followable link to an entity.
E.g., https://www.wikidata.org/entity/Q42.
| EntityId | $entityId |
| LogicException | when there is no base URI for the repository $entityId belongs to |
| Wikibase\Client\RepoLinker::getEntityTitle | ( | EntityId | $entityId | ) |
| Wikibase\Client\RepoLinker::getEntityUrl | ( | EntityId | $entityId | ) |
Constructs a link to an entity.
| EntityId | $entityId |
| Wikibase\Client\RepoLinker::getIndexUrl | ( | ) |
| Wikibase\Client\RepoLinker::getPageUrl | ( | string | $page | ) |
| string | $page |
| InvalidArgumentException |
|
private |
|
private |
|
private |
|
private |