class GroupSerializer extends AbstractSerializer
Properties
protected Request | $request | from AbstractSerializer |
|
|
protected User | $actor | from AbstractSerializer |
|
|
static protected Container | $container | from AbstractSerializer |
|
|
static protected callable[] | $attributeMutators | from AbstractSerializer |
|
|
static protected array | $customRelations | from AbstractSerializer |
|
|
protected | $type | {@inheritdoc} |
|
Methods
Relationship|null
getCustomRelationship(mixed $model, string $name)
Get a custom relationship.
from AbstractSerializer
Relationship
hasOne(mixed $model, string|Closure|SerializerInterface $serializer, string|Closure|null $relation = null)
Get a relationship builder for a has-one relationship.
from AbstractSerializer
Relationship
hasMany(mixed $model, string|Closure|SerializerInterface $serializer, string|null $relation = null)
Get a relationship builder for a has-many relationship.
from AbstractSerializer
Relationship
buildRelationship(mixed $model, string|Closure|SerializerInterface $serializer, string|null $relation = null, bool $many = false)
No description
from AbstractSerializer
SerializerInterface
resolveSerializer(mixed $serializer, mixed $model, mixed $data)
No description
from AbstractSerializer
static
addAttributeMutator(string $serializerClass, callable $callback)
No description
from AbstractSerializer
static
setRelationship(string $serializerClass, string $relation, callable $callback)
No description
from AbstractSerializer
Details
in AbstractSerializer
at
line 56
Request
getRequest()
in AbstractSerializer
at
line 64
setRequest(ServerRequestInterface $request)
in AbstractSerializer
at
line 73
User
getActor()
in AbstractSerializer
at
line 81
getAttributes($model, array $fields = null)
{@inheritdoc}
at
line 42
protected array
getDefaultAttributes(Group $group)
Get the default set of serialized attributes for a model.
in AbstractSerializer
at
line 115
string|null
formatDate(DateTime $date = null)
in AbstractSerializer
at
line 125
getRelationship($model, $name)
{@inheritdoc}
in AbstractSerializer
at
line 141
protected Relationship|null
getCustomRelationship(mixed $model, string $name)
Get a custom relationship.
in AbstractSerializer
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.
in AbstractSerializer
at
line 181
Relationship
hasMany(mixed $model, string|Closure|SerializerInterface $serializer, string|null $relation = null)
Get a relationship builder for a has-many relationship.