Class Serializer

Summary

Fully Qualified Name: Laminas\Serializer\Serializer

Description

Methods

Name Description Defined By
factory() Create a serializer adapter instance. Serializer
getAdapterPluginManager() Get the adapter plugin manager Serializer
getDefaultAdapter() Get the default adapter. Serializer
resetAdapterPluginManager() Resets the internal adapter plugin manager Serializer
serialize() Generates a storable representation of a value using the default adapter. Serializer
setAdapterPluginManager() Change the adapter plugin manager Serializer
setDefaultAdapter() Change the default adapter. Serializer
unserialize() Creates a PHP value from a stored representation using the default adapter. Serializer

Method Details

factory()

Create a serializer adapter instance.

Parameter Name Type Description
$adapterName string|\Adapter Name
$ array |\Traversable|null
$adapterOptions

Returns: \Adapter

getAdapterPluginManager()

Get the adapter plugin manager

Returns: \AdapterPluginManager

getDefaultAdapter()

Get the default adapter.

Returns: \Adapter

resetAdapterPluginManager()

Resets the internal adapter plugin manager

Returns: \AdapterPluginManager

serialize()

Generates a storable representation of a value using the default adapter.

Optionally different adapter could be provided as second argument

Parameter Name Type Description
$value mixed
$adapter string|\Adapter
$adapterOptions array|\Traversable|null Adapter

Returns: string

setAdapterPluginManager()

Change the adapter plugin manager

Parameter Name Type Description
$adapters \AdapterPluginManager

Returns: void

setDefaultAdapter()

Change the default adapter.

Parameter Name Type Description
$adapter string|\Adapter
$adapterOptions array|\Traversable|null

Returns:

unserialize()

Creates a PHP value from a stored representation using the default adapter.

Optionally different adapter could be provided as second argument

Parameter Name Type Description
$serialized string
$adapter string|\Adapter
$adapterOptions array|\Traversable|null Adapter

Returns: mixed

Top