Wikibase
MediaWiki Wikibase extension
|
An EntityLookup which ignores any exceptions which occur while retrieving an entity and instead pretends the entity does not exist. More...
Public Member Functions | |
__construct (EntityLookup $lookup) | |
getEntity (EntityId $entityId) | |
Attempt to retrieve the entity, returning null if any errors occur. More... | |
hasEntity (EntityId $entityId) | |
Returns whether the given entity can potentially be looked up using getEntity(). More... | |
Private Attributes | |
$lookup | |
An EntityLookup which ignores any exceptions which occur while retrieving an entity and instead pretends the entity does not exist.
Wikibase\DataModel\Services\Lookup\ExceptionIgnoringEntityLookup::__construct | ( | EntityLookup | $lookup | ) |
Wikibase\DataModel\Services\Lookup\ExceptionIgnoringEntityLookup::getEntity | ( | EntityId | $entityId | ) |
Attempt to retrieve the entity, returning null
if any errors occur.
EntityId | $entityId |
Implements Wikibase\DataModel\Services\Lookup\EntityLookup.
Wikibase\DataModel\Services\Lookup\ExceptionIgnoringEntityLookup::hasEntity | ( | EntityId | $entityId | ) |
Returns whether the given entity can potentially be looked up using getEntity().
Note that this does not guarantee getEntity() will return an EntityDocument – it may still return null
if an error occurs retrieving the entity.
EntityId | $entityId |
Implements Wikibase\DataModel\Services\Lookup\EntityLookup.
|
private |