DataSerializerInterface
interface DataSerializerInterface (View source)
Provide data serialization for one or mode content type
Methods
MediaTypeInterface[]
getSerializableDataMediaTypes()
Get the list of content type supported by the serializer interface.
boolean
canSerializeData(mixed $data, MediaTypeInterface $mediaType = null)
Indicate if the given data can be unserialized to the given media type
string
serializeData(mixed $data, MediaTypeInterface $mediaType = null)
Serialize data to a given media type
Details
at line 23
MediaTypeInterface[]
getSerializableDataMediaTypes()
Get the list of content type supported by the serializer interface.
at line 34
boolean
canSerializeData(mixed $data, MediaTypeInterface $mediaType = null)
Indicate if the given data can be unserialized to the given media type
at line 47
string
serializeData(mixed $data, MediaTypeInterface $mediaType = null)
Serialize data to a given media type