Wikibase
MediaWiki Wikibase extension
|
EntityHolder implementing deferred deserialization. More...
Public Member Functions | |
__construct (EntityContentDataCodec $codec, $blob, $contentFormat, $entityType, EntityId $entityId=null) | |
getEntity ( $expectedClass=EntityDocument::class) | |
getEntityId () | |
getEntityType () | |
Private Attributes | |
$entity = null | |
$codec | |
$blob | |
$contentFormat | |
$entityType | |
$entityId = null | |
EntityHolder implementing deferred deserialization.
Wikibase\Repo\Content\DeferredDecodingEntityHolder::__construct | ( | EntityContentDataCodec | $codec, |
$blob, | |||
$contentFormat, | |||
$entityType, | |||
EntityId | $entityId = null |
||
) |
EntityContentDataCodec | $codec | |
string | $blob | |
string | null | $contentFormat | Serialization format to decode the blob, typically CONTENT_FORMAT_JSON. |
string | $entityType | |
EntityId | null | $entityId |
InvalidArgumentException |
Wikibase\Repo\Content\DeferredDecodingEntityHolder::getEntity | ( | $expectedClass = EntityDocument::class | ) |
This implements lazy deserialization of the blob passed to the constructor.
string | $expectedClass | The class with which the result is expected to be compatible. Defaults to EntityDocument. |
RuntimeException | If the entity held by this EntityHolder is not compatible with $expectedClass. |
Implements Wikibase\Repo\Content\EntityHolder.
Wikibase\Repo\Content\DeferredDecodingEntityHolder::getEntityId | ( | ) |
RuntimeException | If the entity held by this EntityHolder does not have an id. |
Implements Wikibase\Repo\Content\EntityHolder.
Wikibase\Repo\Content\DeferredDecodingEntityHolder::getEntityType | ( | ) |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |