class Serializing

deprecated in beta 15, removed in beta 16

Prepare API attributes.

This event is fired when a serializer is constructing an array of resource attributes for API output.

Properties

AbstractSerializer $serializer The class doing the serializing.
object $model The model being serialized.
array $attributes The serialized attributes of the resource.
User $actor

Methods

__construct(AbstractSerializer $serializer, object|array $model, array $attributes)

No description

bool
isSerializer(string $serializer)

No description

string|null
formatDate(DateTime $date = null)

No description

Details

__construct(AbstractSerializer $serializer, object|array $model, array $attributes)

Parameters

AbstractSerializer $serializer The class doing the serializing.
object|array $model The model being serialized.
array $attributes The serialized attributes of the resource.

bool isSerializer(string $serializer)

Parameters

string $serializer

Return Value

bool

string|null formatDate(DateTime $date = null)

Parameters

DateTime $date

Return Value

string|null