PolymorphicDeserializer
Read onlyYes
FinalYes
Only to be used by TYPO3 core
Table of Contents
Methods
- __construct() : mixed
- deserialize() : mixed
- Validates the serialized payload by checking a static list of base classes or interfaces to be included in the de-serialized output. If a non-allowed class is hit, the method throws an PolymorphicDeserializerException.
- parseClassNames() : array<int, class-string>
Methods
__construct()
public
__construct([DeserializationService $deserializationService = new DeserializationService() ]) : mixed
Parameters
- $deserializationService : DeserializationService = new DeserializationService()
deserialize()
Validates the serialized payload by checking a static list of base classes or interfaces to be included in the de-serialized output. If a non-allowed class is hit, the method throws an PolymorphicDeserializerException.
public
deserialize(string $payload, array<int, class-string> $allowedClasses) : mixed
If the serialized payload is syntactically incorrect, PolymorphicDeserializerException is thrown as well.
Parameters
- $payload : string
- $allowedClasses : array<int, class-string>
Tags
parseClassNames()
public
parseClassNames(string $payload) : array<int, class-string>
use DeserializationService::parseClassNames instead; will be removed in v15
Parameters
- $payload : string