ReflectionClassSerializer
class ReflectionClassSerializer implements EntityTypeSerializerInterface (View source)
Reflection serializer for PHPClass entities.
Only includes data available via PHP Reflection API.
Traits
Shared sub-entity serialization logic for both Stubs and Reflection serializers.
Shared utility methods for serializers: type parsing and JSON-safe conversion.
Methods
Convert value to JSON-safe format, filtering out resources and closures
Parse a type string back into the correct type object.
No description
No description
No description
No description
No description
No description
No description
No description
No description
Check if this serializer supports the given entity.
Serialize an entity to array format suitable for JSON encoding.
Deserialize an entity from array format.
Details
protected
toJsonSafe($value)
Convert value to JSON-safe format, filtering out resources and closures
protected StandaloneType|UnionType|NullableType|NoType|IntersectionType
parseType(string|null $typeStr)
Parse a type string back into the correct type object.
Rules: "" -> NoType "A&B" -> IntersectionType "(A&B)" -> IntersectionType (parenthesised pure intersection) "A|null" -> NullableType (exactly 2 parts, one is "null") "int|(A&B)|..." -> UnionType with IntersectionType member (DNF) "A|B|..." -> UnionType "?A" -> NullableType "A" -> StandaloneType
protected array
serializeMethod(PHPMethod $method, string|null $parentId = null, PhpDocStorage|null $phpDocStorage = null)
No description
protected array
serializeParameter(PHPParameter $parameter, PhpDocStorage|null $phpDocStorage = null)
No description
protected array
serializeProperty(PHPProperty $property, string|null $parentId = null, PhpDocStorage|null $phpDocStorage = null)
No description
protected array
serializeClassConstant(PHPClassConstant $constant)
No description
protected PHPMethod
deserializeMethod(array $data, string|null $parentId = null, PhpDocStorage|null $phpDocStorage = null)
No description
protected PHPParameter
deserializeParameter(array $data, PhpDocStorage|null $phpDocStorage = null)
No description
protected PHPProperty
deserializeProperty(array $data, string|null $parentId = null, PhpDocStorage|null $phpDocStorage = null)
No description
protected PHPClassConstant
deserializeClassConstant(array $data)
No description
protected void
enrichSerializedMethod(array $data, PHPMethod $method, string|null $parentId, PhpDocStorage|null $phpDocStorage)
No description
protected void
enrichSerializedParameter(array $data, PHPParameter $parameter)
No description
protected void
enrichSerializedProperty(array $data, PHPProperty $property, string|null $parentId, PhpDocStorage|null $phpDocStorage)
No description
protected void
enrichSerializedClassConstant(array $data, PHPClassConstant $constant)
No description
protected void
enrichDeserializedMethod(PHPMethod $method, array $data, string|null $parentId, PhpDocStorage|null $phpDocStorage)
No description
protected void
enrichDeserializedParameter(PHPParameter $parameter, array $data)
No description
protected void
enrichDeserializedProperty(PHPProperty $property, array $data, string|null $parentId, PhpDocStorage|null $phpDocStorage)
No description
protected void
enrichDeserializedClassConstant(PHPClassConstant $constant, array $data)
No description
bool
supports(mixed $entity)
Check if this serializer supports the given entity.
array
serialize(mixed $entity, PhpDocStorage|null $phpDocStorage = null)
Serialize an entity to array format suitable for JSON encoding.
mixed
deserialize(array $data, PhpDocStorage|null $phpDocStorage = null)
Deserialize an entity from array format.