EntityTypeSerializerInterface
interface EntityTypeSerializerInterface (View source)
Interface for entity-specific serializers in the strategy pattern.
Each entity type (PHPClass, PHPFunction, etc.) has its own serializer implementation.
Methods
bool
supports(mixed $entity)
Check if this serializer supports the given entity.
array
serialize(mixed $entity, PhpDocRepository|null $phpDocStorage = null)
Serialize an entity to array format suitable for JSON encoding.
mixed
deserialize(array $data, PhpDocRepository|null $phpDocStorage = null)
Deserialize an entity from array format.
Details
bool
supports(mixed $entity)
Check if this serializer supports the given entity.
array
serialize(mixed $entity, PhpDocRepository|null $phpDocStorage = null)
Serialize an entity to array format suitable for JSON encoding.
mixed
deserialize(array $data, PhpDocRepository|null $phpDocStorage = null)
Deserialize an entity from array format.