SerializerInterface
in
Converts PHP values to the JSON or XML string used by structured body helpers.
final class ProjectSerializer implements SerializerInterface
{
public function serialize($data): string
{
return ProjectEncoder::encode($data);
}
}
Tags
Table of Contents
Methods
- serialize() : string
- Serialize a value to its wire-format representation.
Methods
serialize()
Serialize a value to its wire-format representation.
public
serialize(mixed $data) : string
Parameters
- $data : mixed