mediatekformation

ChainEncoder
in package
implements ContextAwareEncoderInterface

Encoder delegating the decoding to a chain of encoders.

Tags
author

Jordi Boggiano j.boggiano@seld.be

author

Johannes M. Schmitt schmittjoh@gmail.com

author

Lukas Kahwe Smith smith@pooteeweet.org

final

Interfaces, Classes, Traits and Enums

ContextAwareEncoderInterface
Adds the support of an extra $context parameter for the supportsEncoding method.

Table of Contents

$encoderByFormat  : mixed
$encoders  : mixed
__construct()  : mixed
encode()  : mixed
{@inheritdoc}
needsNormalization()  : bool
Checks whether the normalization is needed for the given format.
supportsEncoding()  : bool
Checks whether the serializer can encode to given format.
getEncoder()  : EncoderInterface
Gets the encoder supporting the format.

Properties

Methods

__construct()

public __construct([array<string|int, mixed> $encoders = [] ]) : mixed
Parameters
$encoders : array<string|int, mixed> = []
Return values
mixed

encode()

{@inheritdoc}

public final encode(mixed $data, mixed $format[, array<string|int, mixed> $context = [] ]) : mixed
Parameters
$data : mixed
$format : mixed
$context : array<string|int, mixed> = []
Return values
mixed

needsNormalization()

Checks whether the normalization is needed for the given format.

public needsNormalization(string $format[, array<string|int, mixed> $context = [] ]) : bool
Parameters
$format : string
$context : array<string|int, mixed> = []
Return values
bool

supportsEncoding()

Checks whether the serializer can encode to given format.

public supportsEncoding(mixed $format[, array<string|int, mixed> $context = [] ]) : bool
Parameters
$format : mixed

Format name

$context : array<string|int, mixed> = []

options that encoders have access to

Return values
bool

Search results