◆ __construct()
Wikibase\Client\RepoLinker::__construct |
( |
EntitySourceDefinitions |
$entitySourceDefinitions, |
|
|
string |
$baseUrl, |
|
|
string |
$articlePath, |
|
|
string |
$scriptPath |
|
) |
| |
◆ addQueryParams()
Wikibase\Client\RepoLinker::addQueryParams |
( |
string |
$url, |
|
|
array |
$params |
|
) |
| |
◆ buildEntityLink()
Wikibase\Client\RepoLinker::buildEntityLink |
( |
EntityId |
$entityId, |
|
|
array |
$classes = [] , |
|
|
string |
$text = null |
|
) |
| |
Constructs an html link to an entity.
- Parameters
-
EntityId | $entityId | |
array | $classes | |
string | null | $text | Defaults to the entity id serialization. |
- Returns
- string (html)
◆ encodePage()
Wikibase\Client\RepoLinker::encodePage |
( |
string |
$page | ) |
|
|
private |
◆ formatLink()
Wikibase\Client\RepoLinker::formatLink |
( |
string |
$url, |
|
|
string |
$text, |
|
|
array |
$attribs = [] |
|
) |
| |
Format a link, with url encoding.
- Parameters
-
string | $url | |
string | $text | |
array | $attribs | |
- Returns
- string (html)
◆ getApiUrl()
Wikibase\Client\RepoLinker::getApiUrl |
( |
| ) |
|
◆ getBaseUrl()
Wikibase\Client\RepoLinker::getBaseUrl |
( |
| ) |
|
◆ getConceptBaseUri()
Wikibase\Client\RepoLinker::getConceptBaseUri |
( |
EntityId |
$entityId | ) |
|
|
private |
- Parameters
-
- Exceptions
-
LogicException | when there is no base URI for the repository $entityId belongs to |
- Returns
- string
◆ getEntityConceptUri()
Wikibase\Client\RepoLinker::getEntityConceptUri |
( |
EntityId |
$entityId | ) |
|
Constructs the machine followable link to an entity.
E.g., https://www.wikidata.org/entity/Q42.
- Parameters
-
- Exceptions
-
LogicException | when there is no base URI for the repository $entityId belongs to |
- Returns
- string
◆ getEntityTitle()
Wikibase\Client\RepoLinker::getEntityTitle |
( |
EntityId |
$entityId | ) |
|
◆ getEntityUrl()
Wikibase\Client\RepoLinker::getEntityUrl |
( |
EntityId |
$entityId | ) |
|
Constructs a link to an entity.
- Parameters
-
- Returns
- string
◆ getIndexUrl()
Wikibase\Client\RepoLinker::getIndexUrl |
( |
| ) |
|
◆ getPageUrl()
Wikibase\Client\RepoLinker::getPageUrl |
( |
string |
$page | ) |
|
- Parameters
-
- Exceptions
-
- Returns
- string
◆ $articlePath
Wikibase\Client\RepoLinker::$articlePath |
|
private |
◆ $baseUrl
Wikibase\Client\RepoLinker::$baseUrl |
|
private |
◆ $entitySourceDefinitions
Wikibase\Client\RepoLinker::$entitySourceDefinitions |
|
private |
◆ $scriptPath
Wikibase\Client\RepoLinker::$scriptPath |
|
private |
The documentation for this class was generated from the following file: