interface MarshallerInterface

Serializes/unserializes PHP values.

Implementations of this interface MUST deal with errors carefully. They MUST also deal with forward and backward compatibility at the storage format level.

Methods

array
marshall(array $values, array|null $failed)

Serializes a list of values.

mixed
unmarshall(string $value)

Unserializes a single value and throws an exception if anything goes wrong.

Details

at line 30
array marshall(array $values, array|null $failed)

Serializes a list of values.

When serialization fails for a specific value, no exception should be thrown. Instead, its key should be listed in $failed.

Parameters

array $values
array|null $failed

Return Value

array

at line 39
mixed unmarshall(string $value)

Unserializes a single value and throws an exception if anything goes wrong.

Parameters

string $value

Return Value

mixed

Exceptions

Exception Whenever unserialization fails