|
Wikibase
MediaWiki Wikibase extension
|
Implementation of EntityLookup that opaquely resolves one level of redirects when looking up entities. More...
Inheritance diagram for Wikibase\DataModel\Services\Lookup\RedirectResolvingEntityLookup:
Collaboration diagram for Wikibase\DataModel\Services\Lookup\RedirectResolvingEntityLookup:Public Member Functions | |
| __construct (EntityLookup $lookup) | |
| getEntity (EntityId $entityId) | |
| hasEntity (EntityId $entityId) | |
Private Attributes | |
| $lookup | |
Implementation of EntityLookup that opaquely resolves one level of redirects when looking up entities.
| Wikibase\DataModel\Services\Lookup\RedirectResolvingEntityLookup::__construct | ( | EntityLookup | $lookup | ) |
| EntityLookup | $lookup | The lookup to use |
| Wikibase\DataModel\Services\Lookup\RedirectResolvingEntityLookup::getEntity | ( | EntityId | $entityId | ) |
If the given entity ID points to a redirect, that redirect is resolved and the target entity returned.
Callers can detect the presence of a redirect by comparing the ID of the returned Entity with the request ID.
| EntityId | $entityId |
| EntityLookupException |
Implements Wikibase\DataModel\Services\Lookup\EntityLookup.
| Wikibase\DataModel\Services\Lookup\RedirectResolvingEntityLookup::hasEntity | ( | EntityId | $entityId | ) |
If the given entity ID points to a redirect, that redirect is resolved and the existence of the target entity is checked.
| EntityId | $entityId |
| EntityLookupException |
Implements Wikibase\DataModel\Services\Lookup\EntityLookup.
|
private |