EntityHolder implementing deferred deserialization.
More...
EntityHolder implementing deferred deserialization.
- Copyright
- GPL-2.0-or-later
- Author
- Daniel Kinzler
-
Thiemo Kreuz
◆ __construct()
Wikibase\Repo\Content\DeferredDecodingEntityHolder::__construct |
( |
EntityContentDataCodec |
$codec, |
|
|
|
$blob, |
|
|
|
$contentFormat, |
|
|
|
$entityType, |
|
|
EntityId |
$entityId = null |
|
) |
| |
- Parameters
-
EntityContentDataCodec | $codec | |
string | $blob | |
string | null | $contentFormat | Serialization format to decode the blob, typically CONTENT_FORMAT_JSON. |
string | $entityType | |
EntityId | null | $entityId | |
- Exceptions
-
◆ getEntity()
Wikibase\Repo\Content\DeferredDecodingEntityHolder::getEntity |
( |
|
$expectedClass = EntityDocument::class | ) |
|
- See also
- EntityHolder::getEntityId
This implements lazy deserialization of the blob passed to the constructor.
- Parameters
-
string | $expectedClass | The class with which the result is expected to be compatible. Defaults to EntityDocument. |
- Exceptions
-
RuntimeException | If the entity held by this EntityHolder is not compatible with $expectedClass. |
- Returns
- EntityDocument
Implements Wikibase\Repo\Content\EntityHolder.
◆ getEntityId()
Wikibase\Repo\Content\DeferredDecodingEntityHolder::getEntityId |
( |
| ) |
|
◆ getEntityType()
Wikibase\Repo\Content\DeferredDecodingEntityHolder::getEntityType |
( |
| ) |
|
◆ $blob
Wikibase\Repo\Content\DeferredDecodingEntityHolder::$blob |
|
private |
◆ $codec
Wikibase\Repo\Content\DeferredDecodingEntityHolder::$codec |
|
private |
◆ $contentFormat
Wikibase\Repo\Content\DeferredDecodingEntityHolder::$contentFormat |
|
private |
◆ $entity
Wikibase\Repo\Content\DeferredDecodingEntityHolder::$entity = null |
|
private |
◆ $entityId
Wikibase\Repo\Content\DeferredDecodingEntityHolder::$entityId = null |
|
private |
◆ $entityType
Wikibase\Repo\Content\DeferredDecodingEntityHolder::$entityType |
|
private |
The documentation for this class was generated from the following file: