Methods

Create a serializer adapter instance.

factory(string | \Zend\Serializer\Adapter\AdapterInterface $adapterName, array $adapterOptions) : \Zend\Serializer\Adapter\AdapterInterface

Parameters

$adapterName

string\Zend\Serializer\Adapter\AdapterInterface

Name of the adapter class

$adapterOptions

array

|\Traversable|null $adapterOptions Serializer options

Returns

Get the adapter plugin manager

getAdapterPluginManager() : \Zend\Serializer\AdapterPluginManager

Get the default adapter.

getDefaultAdapter() : \Zend\Serializer\Adapter\AdapterInterface

Resets the internal adapter plugin manager

resetAdapterPluginManager() : \Zend\Serializer\AdapterPluginManager

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

serialize(mixed $value, string | \Zend\Serializer\Adapter\AdapterInterface $adapter, array | \Traversable | null $adapterOptions) : string

Optionally different adapter could be provided as second argument

Parameters

$value

mixed

$adapterOptions

array\Traversablenull

Adapter constructor options only used to create adapter instance

Returns

string

Change the adapter plugin manager

setAdapterPluginManager(\Zend\Serializer\AdapterPluginManager $adapters) : void

Change the default adapter.

setDefaultAdapter(string | \Zend\Serializer\Adapter\AdapterInterface $adapter, array | \Traversable | null $adapterOptions) 

Parameters

$adapterOptions

array\Traversablenull

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

unserialize(string $serialized, string | \Zend\Serializer\Adapter\AdapterInterface $adapter, array | \Traversable | null $adapterOptions) : mixed

Optionally different adapter could be provided as second argument

Parameters

$serialized

string

$adapterOptions

array\Traversablenull

Adapter constructor options only used to create adapter instance

Returns

mixed

 Properties

 

The default adapter.

$defaultAdapter : string | \Zend\Serializer\Adapter\AdapterInterface

 

Plugin manager for loading adapters

$adapters : null | \Zend\Serializer\AdapterPluginManager