Helper class for api modules to resolve page+title pairs into entities.
More...
Helper class for api modules to resolve page+title pairs into entities.
- Copyright
- GPL-2.0-or-later
- Author
- Marius Hoch < hoo@o.nosp@m.nlin.nosp@m.e.de >
-
Addshore
-
Daniel Kinzler
◆ __construct()
◆ getEntityId()
Wikibase\Repo\Api\EntityByTitleHelper::getEntityId |
( |
| $siteId, |
|
|
| $title, |
|
|
| $normalize ) |
|
private |
Tries to find item id for given siteId and title combination.
- Parameters
-
string | $siteId | |
string | $title | |
bool | $normalize | |
- Returns
- EntityId|null
◆ getEntityIds()
Wikibase\Repo\Api\EntityByTitleHelper::getEntityIds |
( |
array | $sites, |
|
|
array | $titles, |
|
|
| $normalize ) |
Tries to find item ids for given client pages.
- Parameters
-
array | $sites | |
array | $titles | |
bool | $normalize | |
- Exceptions
-
- Returns
- array[] ( EntityId[], array[] ) List containing valid $ids and $missingEntities site title combinations -return array{0:EntityId[],1:array[]}
◆ normalizeTitle()
Wikibase\Repo\Api\EntityByTitleHelper::normalizeTitle |
( |
& | $title, |
|
|
Site | $site ) |
Tries to normalize the given page title against the given client site.
Updates $title accordingly and adds the normalization to the API output.
- Parameters
-
◆ throwUsageException()
Wikibase\Repo\Api\EntityByTitleHelper::throwUsageException |
( |
| $message, |
|
|
| $code ) |
|
private |
- Parameters
-
string | $message | |
string | $code | |
- Returns
- never
- Exceptions
-
◆ $apiModule
Wikibase\Repo\Api\EntityByTitleHelper::$apiModule |
|
private |
◆ $entityByLinkedTitleLookup
Wikibase\Repo\Api\EntityByTitleHelper::$entityByLinkedTitleLookup |
|
private |
◆ $resultBuilder
Wikibase\Repo\Api\EntityByTitleHelper::$resultBuilder |
|
private |
◆ $siteLookup
Wikibase\Repo\Api\EntityByTitleHelper::$siteLookup |
|
private |
◆ $stringNormalizer
Wikibase\Repo\Api\EntityByTitleHelper::$stringNormalizer |
|
private |
The documentation for this class was generated from the following file: