package Default

 Methods

Create a serializer adapter instance.

factory(string|\Zend\Serializer\Adapter\AdapterInterface $adapterName, $adapterOptions = null) : \Zend\Serializer\Adapter\AdapterInterface
Static

Parameters

$adapterName

string\Zend\Serializer\Adapter\AdapterInterface

Name of the adapter class

$adapterOptions

Returns

\Zend\Serializer\Adapter\AdapterInterface

Get the adapter plugin manager

getAdapterPluginManager() : \Zend\Serializer\AdapterPluginManager
Static

Returns

\Zend\Serializer\AdapterPluginManager

Get the default adapter.

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

Returns

\Zend\Serializer\Adapter\AdapterInterface

Resets the internal adapter plugin manager

resetAdapterPluginManager() : \Zend\Serializer\AdapterPluginManager
Static

Returns

\Zend\Serializer\AdapterPluginManager

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

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

Optionally different adapter could be provided as second argument

Parameters

$value

mixed

$adapter

string\Zend\Serializer\Adapter\AdapterInterface

$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
Static

Parameters

$adapters

\Zend\Serializer\AdapterPluginManager

Change the default adapter.

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

Parameters

$adapter

string\Zend\Serializer\Adapter\AdapterInterface

$adapterOptions

array\Traversablenull

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

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

Optionally different adapter could be provided as second argument

Parameters

$serialized

string

$adapter

string\Zend\Serializer\Adapter\AdapterInterface

$adapterOptions

array\Traversablenull

Adapter constructor options only used to create adapter instance

Returns

mixed

 Properties

 

Plugin manager for loading adapters

$adapters : null | \Zend\Serializer\AdapterPluginManager

Default

Static
 

The default adapter.

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

Default

'PhpSerialize'
Static