class SerializerManager

Class SerializerManager

Methods

$this
reset()

Reset manager

array
getSerializers()

Get all serializers

boolean
has( string $serializerId, boolean $throwException = false)

Determine if a serializer exists under the given identifier

get( string $serializerId)

Get a serializer

$this
setSerializers( array $serializers)

Set serializers

$this
add( SerializerInterface $serializer)

Add a serializer

remove( string $serializerId)

Remove a serializer

Details

at line 33
$this reset()

Reset manager

Return Value

$this Return $this, allow chaining

at line 45
array getSerializers()

Get all serializers

Return Value

array All serializers

at line 60
boolean has( string $serializerId, boolean $throwException = false)

Determine if a serializer exists under the given identifier

Parameters

string $serializerId A serializer identifier
boolean $throwException Throw exception if serializer doesn't exists or not

Return Value

boolean True if the serializer exists, false otherwise

Exceptions

InvalidArgumentException if the serializer identifier does not exist

at line 85
SerializerInterface get( string $serializerId)

Get a serializer

Parameters

string $serializerId A serializer identifier

Return Value

SerializerInterface Return a serializer

at line 101
$this setSerializers( array $serializers)

Set serializers

Parameters

array $serializers An array of serializer

Return Value

$this Return $this, allow chaining

Exceptions

Exception

at line 123
$this add( SerializerInterface $serializer)

Add a serializer

Parameters

SerializerInterface $serializer A serializer

Return Value

$this Return $this, allow chaining

at line 135
remove( string $serializerId)

Remove a serializer

Parameters

string $serializerId A serializer identifier