class UserSerializer extends BasicUserSerializer
Properties
protected ServerRequestInterface | $request | from AbstractSerializer | ||
protected User | $actor | from AbstractSerializer | ||
static protected Container | $container | from AbstractSerializer | ||
static protected array<string,callable[]> | $attributeMutators | from AbstractSerializer | ||
static protected array<string,array<string,callable>> | $customRelations | from AbstractSerializer | ||
protected | $type | <p>{@inheritdoc}</p> | from BasicUserSerializer | |
protected SlugManager | $slugManager | from BasicUserSerializer |
Methods
Relationship|null
getCustomRelationship(mixed $model, string $name)
<p>Get a custom relationship.</p>
from AbstractSerializer
Relationship
hasOne(mixed $model, string|Closure|SerializerInterface $serializer, string|Closure|null $relation = null)
<p>Get a relationship builder for a has-one relationship.</p>
from AbstractSerializer
Relationship
hasMany(mixed $model, string|Closure|SerializerInterface $serializer, string|null $relation = null)
<p>Get a relationship builder for a has-many relationship.</p>
from AbstractSerializer
Relationship|null
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 void
addAttributeMutator(string $serializerClass, callable $callback)
No description
from AbstractSerializer
static void
setRelationship(string $serializerClass, string $relation, callable $callback)
No description
from AbstractSerializer
Details
in AbstractSerializer
at
line 57
ServerRequestInterface
getRequest()
in AbstractSerializer
at
line 65
setRequest(ServerRequestInterface $request)
in AbstractSerializer
at
line 74
User
getActor()
in AbstractSerializer
at
line 82
getAttributes($model, array $fields = null)
<p>{@inheritdoc}</p>
in AbstractSerializer
at
line 116
string|null
formatDate(DateTime $date = null)
in AbstractSerializer
at
line 126
getRelationship($model, $name)
<p>{@inheritdoc}</p>
in AbstractSerializer
at
line 142
protected Relationship|null
getCustomRelationship(mixed $model, string $name)
<p>Get a custom relationship.</p>
in AbstractSerializer
at
line 169
Relationship
hasOne(mixed $model, string|Closure|SerializerInterface $serializer, string|Closure|null $relation = null)
<p>Get a relationship builder for a has-one relationship.</p>
in AbstractSerializer
at
line 182
Relationship
hasMany(mixed $model, string|Closure|SerializerInterface $serializer, string|null $relation = null)
<p>Get a relationship builder for a has-many relationship.</p>