abstract class AbstractSerializer extends AbstractSerializer
Properties
protected Request | $request |
|
||
protected User | $actor |
|
||
static protected Container | $container |
|
||
static protected callable[] | $attributeMutators |
|
||
static protected array | $customRelations |
|
Methods
array
getDefaultAttributes(object|array $model)
Get the default set of serialized attributes for a model.
Relationship
Relationship
Relationship
buildRelationship(mixed $model, string|Closure|SerializerInterface $serializer, string|null $relation = null, bool $many = false)
No description
static
setRelationship(string $serializerClass, string $relation, callable $callback)
No description
Details
at
line 56
Request
getRequest()
at
line 64
setRequest(ServerRequestInterface $request)
at
line 73
User
getActor()
at
line 81
getAttributes($model, array $fields = null)
{@inheritdoc}
at
line 109
abstract protected array
getDefaultAttributes(object|array $model)
Get the default set of serialized attributes for a model.
at
line 125
getRelationship($model, $name)
{@inheritdoc}
at
line 141
protected Relationship|null
getCustomRelationship(mixed $model, string $name)
Get a custom relationship.
at
line 168
Relationship
hasOne(mixed $model, string|Closure|SerializerInterface $serializer, string|Closure|null $relation = null)
Get a relationship builder for a has-one relationship.
at
line 181
Relationship
hasMany(mixed $model, string|Closure|SerializerInterface $serializer, string|null $relation = null)
Get a relationship builder for a has-many relationship.