class DefaultMarshaller implements MarshallerInterface

Serializes/unserializes values using igbinary_serialize() if available, serialize() otherwise.

Methods

__construct(bool $useIgbinarySerialize = null)

No description

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.

static 
handleUnserializeCallback($class)

No description

Details

__construct(bool $useIgbinarySerialize = null)

Parameters

bool $useIgbinarySerialize

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

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

static handleUnserializeCallback($class)

Parameters

$class