abstract class AbstractSerializeController implements RequestHandlerInterface
Properties
Methods
Get the data to be serialized and assigned to the response document.
Create a PHP JSON-API Element for output in the document.
No description
Details
at
line 90
ResponseInterface
handle(ServerRequestInterface $request)
{@inheritdoc}
at
line 131
abstract protected mixed
data(ServerRequestInterface $request, Document $document)
Get the data to be serialized and assigned to the response document.
at
line 140
abstract protected ElementInterface
createElement(mixed $data, SerializerInterface $serializer)
Create a PHP JSON-API Element for output in the document.
at
line 147
protected array
extractInclude(ServerRequestInterface $request)
at
line 158
protected array
extractFields(ServerRequestInterface $request)
at
line 168
protected array|null
extractSort(ServerRequestInterface $request)
at
line 178
protected int
extractOffset(ServerRequestInterface $request)
at
line 187
protected int
extractLimit(ServerRequestInterface $request)
at
line 196
protected array
extractFilter(ServerRequestInterface $request)
at
line 205
protected Parameters
buildParameters(ServerRequestInterface $request)
at
line 215
setSerializer(string $serializer)
Set the serializer that will serialize data for the endpoint.
at
line 225
addInclude(string|array $name)
Include the given relationship by default.
at
line 235
removeInclude(string|array $name)
Don't include the given relationship by default.
at
line 245
addOptionalInclude(string|array $name)
Make the given relationship available for inclusion.
at
line 255
removeOptionalInclude(string|array $name)
Don't allow the given relationship to be included.
at
line 265
setLimit(int $limit)
Set the default number of results.
at
line 275
setMaxLimit(int $max)
Set the maximum number of results.
at
line 285
addSortField(string|array $field)
Allow sorting results by the given field.
at
line 295
removeSortField(string|array $field)
Disallow sorting results by the given field.
at
line 305
setSort(array $sort)
Set the default sort order for the results.