abstract class AbstractSerializer extends AbstractSerializer
Properties
| protected ServerRequestInterface | $request |
|
||
| protected User | $actor |
|
||
| static protected Container | $container |
|
||
| static protected array<string,callable[]> | $attributeMutators |
|
||
| static protected array<string,array<string,callable>> | $customRelations |
|
Methods
array
getDefaultAttributes(object|array $model)
Get the default set of serialized attributes for a model.
Relationship
Relationship
Relationship|null
buildRelationship(mixed $model, string|Closure|SerializerInterface $serializer, string|null $relation = null, bool $many = false)
No description
static void
setRelationship(string $serializerClass, string $relation, callable $callback)
No description
Details
at
line 57
ServerRequestInterface
getRequest()
at
line 65
setRequest(ServerRequestInterface $request)
at
line 82
getAttributes($model, array $fields = null)
{@inheritdoc}
at
line 110
abstract protected array
getDefaultAttributes(object|array $model)
Get the default set of serialized attributes for a model.
at
line 126
getRelationship($model, $name)
{@inheritdoc}
at
line 142
protected Relationship|null
getCustomRelationship(mixed $model, string $name)
Get a custom relationship.
at
line 169
Relationship
hasOne(mixed $model, string|Closure|SerializerInterface $serializer, string|Closure|null $relation = null)
Get a relationship builder for a has-one relationship.
at
line 182
Relationship
hasMany(mixed $model, string|Closure|SerializerInterface $serializer, string|null $relation = null)
Get a relationship builder for a has-many relationship.