|
| serializeMap (array $serialization) |
| Create the serialized representation of the supplied object.
|
|
- Copyright
- GPL-2.0-or-later
◆ __construct()
Wikibase\DataModel\Serializers\MapSerializer::__construct |
( |
bool | $useObjectsForEmptyMaps | ) |
|
◆ serializeMap()
Wikibase\DataModel\Serializers\MapSerializer::serializeMap |
( |
array | $serialization | ) |
|
|
protected |
Create the serialized representation of the supplied object.
Based on the $useObjectsForEmptyMaps flag, arrays in the serialized structure may be transformed into stdClass / objects. This helps ensure that in JSON serialization, PHP uses {} instead of [] for these dictionaries.
Currently the flag is only set in limited cases, including for the creation of JSON Dumps (per T305660). Setting the flag in all cases has undesired interactions with other serialisation code.
- Returns
- array|\stdClass
◆ $useObjectsForEmptyMaps
bool Wikibase\DataModel\Serializers\MapSerializer::$useObjectsForEmptyMaps |
|
protected |
The documentation for this class was generated from the following file: