eloquent/endec API
Interface

Eloquent\Endec\DecoderInterface

interface DecoderInterface

The interface implemented by decoders.

Methods

string decode(string $data)

Decode the supplied data.

TransformStreamInterface createDecodeStream(integer|null $bufferSize = null)

Create a new decode stream.

Details

at line 29
public string decode(string $data)

Decode the supplied data.

Parameters

string $data The data to decode.

Return Value

string The decoded data.

Exceptions

EncodingExceptionInterface If the data cannot be decoded.

at line 38
public TransformStreamInterface createDecodeStream(integer|null $bufferSize = null)

Create a new decode stream.

Parameters

integer|null $bufferSize The buffer size in bytes.

Return Value

TransformStreamInterface The newly created decode stream.