Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Client\Serializer\ClientEntitySerializer Class Reference
+ Inheritance diagram for Wikibase\Client\Serializer\ClientEntitySerializer:
+ Collaboration diagram for Wikibase\Client\Serializer\ClientEntitySerializer:

Public Member Functions

 __construct (Serializer $entitySerializer, PropertyDataTypeLookup $dataTypeLookup, array $filterLangCodes, array $fallbackChains)
 
 serialize ( $entity)
 
- Public Member Functions inherited from Wikibase\Client\Serializer\ClientSerializer
 __construct (PropertyDataTypeLookup $dataTypeLookup)
 

Private Member Functions

 addEntitySerializationFallbackInfo (array $serialization)
 
 getTermsSerializationWithFallbackInfo (array $serialization)
 
 filterEntitySerializationUsingLangCodes (array $serialization)
 

Private Attributes

 $entitySerializer
 
 $fallbackChains
 
 $filterLangCodes
 

Additional Inherited Members

- Protected Member Functions inherited from Wikibase\Client\Serializer\ClientSerializer
 omitEmptyArrays (array $serialization)
 
 injectSerializationWithDataTypes (array $serialization, $pathPrefix)
 

Detailed Description

Author
Addshore

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Client\Serializer\ClientEntitySerializer::__construct ( Serializer  $entitySerializer,
PropertyDataTypeLookup  $dataTypeLookup,
array  $filterLangCodes,
array  $fallbackChains 
)
Parameters
Serializer$entitySerializer
PropertyDataTypeLookup$dataTypeLookup
string[]$filterLangCodes
LanguageFallbackChain[]$fallbackChains

Member Function Documentation

◆ addEntitySerializationFallbackInfo()

Wikibase\Client\Serializer\ClientEntitySerializer::addEntitySerializationFallbackInfo ( array  $serialization)
private
Parameters
array$serialization
Todo:
FIXME duplicated code in Repo ResultBuilder
Returns
array

◆ filterEntitySerializationUsingLangCodes()

Wikibase\Client\Serializer\ClientEntitySerializer::filterEntitySerializationUsingLangCodes ( array  $serialization)
private
Parameters
array$serialization
Todo:
FIXME duplicated / similar code in Repo ResultBuilder
Returns
array

◆ getTermsSerializationWithFallbackInfo()

Wikibase\Client\Serializer\ClientEntitySerializer::getTermsSerializationWithFallbackInfo ( array  $serialization)
private
Parameters
array$serialization
Todo:
FIXME duplicated / similar code in Repo ResultBuilder
Returns
array

◆ serialize()

Wikibase\Client\Serializer\ClientEntitySerializer::serialize (   $entity)
See also
ResultBuilder::addEntityRevision
Parameters
EntityDocument$entity
Exceptions
SerializationException
Returns
array

Member Data Documentation

◆ $entitySerializer

Wikibase\Client\Serializer\ClientEntitySerializer::$entitySerializer
private

◆ $fallbackChains

Wikibase\Client\Serializer\ClientEntitySerializer::$fallbackChains
private

◆ $filterLangCodes

Wikibase\Client\Serializer\ClientEntitySerializer::$filterLangCodes
private

The documentation for this class was generated from the following file: