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 <p>The class doing the serializing.</p>
object $model <p>The model being serialized.</p>
array $attributes <p>The serialized attributes of the resource.</p>
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 <p>The class doing the serializing.</p>
object|array $model <p>The model being serialized.</p>
array $attributes <p>The serialized attributes of the resource.</p>

bool isSerializer(string $serializer)

Parameters

string $serializer

Return Value

bool

string|null formatDate(DateTime $date = null)

Parameters

DateTime $date

Return Value

string|null