EncoderInterface
in
Tags
Table of Contents
Methods
- encode() : string
- Encodes data into the given format.
- supportsEncoding() : bool
- Checks whether the serializer can encode to given format.
Methods
encode()
Encodes data into the given format.
public
encode(mixed $data, string $format[, array<string|int, mixed> $context = [] ]) : string
Parameters
- $data : mixed
-
Data to encode
- $format : string
-
Format name
- $context : array<string|int, mixed> = []
-
Options that normalizers/encoders have access to
Tags
Return values
stringsupportsEncoding()
Checks whether the serializer can encode to given format.
public
supportsEncoding(string $format) : bool
Parameters
- $format : string
-
Format name