An introduction to how serializers work and how Phapi uses them
One of Phapi's features is the easy to use serializers. These makes it possible to interact with your API with any of the formats that the serializers support. It also makes it easy for you to configure your API to your needs.
Serializers are a type of middleware that transforms the data that the API sends to, and receives from the client.
A serializer transforms the data sent to the client to match the clients wishes (according to the Accept
header included in the request).
In each serializer package there are also a deserializer that can transform the data a client sends to the API to a PHP array that middleware and/or endpoints can handle. The deserializer uses the request Content-Type
header to determine if it can handle the data included in the incoming request.
See the implement your own serializer section for more information.
The list of cache providers are currently quite slim but more providers will be added later on.
Phapi includes these serializers by default:
There are currently no third party serializers. Get in contact if you have implemented one and want it listed here.