class RoleCollectionJsonSerializer extends AbstractJsonSerializer (View source)

Serialization class for Role.

Properties

protected $em

Methods

mixed
serialize(mixed $obj)

Serializes data.

__construct(EntityManager $em)

No description

array
toArray(ArrayCollection $roles)

Create a simple associative array with an ArrayCollection of Role.

mixed
deserialize(string $jsonString)

Deserializes a json file into a readable array of datas.

Details

mixed serialize(mixed $obj)

Serializes data.

Parameters

mixed $obj

Return Value

mixed

__construct(EntityManager $em)

Parameters

EntityManager $em

array toArray(ArrayCollection $roles)

Create a simple associative array with an ArrayCollection of Role.

Parameters

ArrayCollection $roles

Return Value

array

mixed deserialize(string $jsonString)

Deserializes a json file into a readable array of datas.

Parameters

string $jsonString

Return Value

mixed

Exceptions

Exception