pock

SerializerInterface

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
category

SerializerInterface

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
Return values
string
On this page

Search results