class CreateAccessTokenController extends AbstractCreateController
Not to be confused with the CreateTokenController, this controller is used by the actor to manually create a developer type access token.
Properties
$serializer | ||||
array | $include | <p>The relationships that are included by default.</p> | from AbstractSerializeController | |
array | $optionalInclude | <p>The relationships that are available to be included.</p> | from AbstractSerializeController | |
int | $maxLimit | <p>The maximum number of records that can be requested.</p> | from AbstractSerializeController | |
int | $limit | <p>The number of records included by default.</p> | from AbstractSerializeController | |
array | $sortFields | <p>The fields that are available to be sorted by.</p> | from AbstractSerializeController | |
array|null | $sort | <p>The default sort field and order to user.</p> | from AbstractSerializeController | |
static protected Container | $container | from AbstractSerializeController | ||
static protected array | $beforeDataCallbacks | from AbstractSerializeController | ||
static protected array | $beforeSerializationCallbacks | from AbstractSerializeController | ||
static protected string[][] | $loadRelations | from AbstractSerializeController | ||
static protected array<string,callable> | $loadRelationCallables | from AbstractSerializeController | ||
protected Dispatcher | $events | |||
protected Factory | $validation |
Methods
<p>{@inheritdoc}</p>
<p>Get the data to be serialized and assigned to the response document.</p>
<p>Create a PHP JSON-API Element for output in the document.</p>
<p>Returns the relations to load added by extenders.</p>
<p>Returns the relation callables to load added by extenders.</p>
<p>Eager loads the required relationships.</p>
No description
No description
No description
No description
No description
<p>Set the serializer that will serialize data for the endpoint.</p>
<p>Include the given relationship by default.</p>
<p>Don't include the given relationship by default.</p>
<p>Make the given relationship available for inclusion.</p>
<p>Don't allow the given relationship to be included.</p>
<p>Allow sorting results by the given field.</p>
<p>Disallow sorting results by the given field.</p>
<p>Set the default sort order for the results.</p>
No description
No description
No description
No description
Details
ResponseInterface
handle(ServerRequestInterface $request)
<p>{@inheritdoc}</p>
at
line 49
mixed
data(ServerRequestInterface $request, Document $document)
<p>Get the data to be serialized and assigned to the response document.</p>
protected ElementInterface
createElement(mixed $data, SerializerInterface $serializer)
<p>Create a PHP JSON-API Element for output in the document.</p>
protected array
getRelationsToLoad(Collection $models)
<p>Returns the relations to load added by extenders.</p>
protected array
getRelationCallablesToLoad(Collection $models)
<p>Returns the relation callables to load added by extenders.</p>
protected void
loadRelations(Collection $models, array $relations, ServerRequestInterface $request = null)
<p>Eager loads the required relationships.</p>
protected array
extractInclude(ServerRequestInterface $request)
protected array
extractFields(ServerRequestInterface $request)
protected array|null
extractSort(ServerRequestInterface $request)
protected int
extractOffset(ServerRequestInterface $request)
protected int
extractLimit(ServerRequestInterface $request)
protected array
extractFilter(ServerRequestInterface $request)
protected Parameters
buildParameters(ServerRequestInterface $request)
protected bool
sortIsDefault(ServerRequestInterface $request)
setSerializer(string $serializer)
<p>Set the serializer that will serialize data for the endpoint.</p>
addInclude(string|array $name)
<p>Include the given relationship by default.</p>
removeInclude(string|array $name)
<p>Don't include the given relationship by default.</p>
addOptionalInclude(string|array $name)
<p>Make the given relationship available for inclusion.</p>
removeOptionalInclude(string|array $name)
<p>Don't allow the given relationship to be included.</p>
setLimit(int $limit)
<p>Set the default number of results.</p>
setMaxLimit(int $max)
<p>Set the maximum number of results.</p>
addSortField(string|array $field)
<p>Allow sorting results by the given field.</p>
removeSortField(string|array $field)
<p>Disallow sorting results by the given field.</p>
setSort(array $sort)
<p>Set the default sort order for the results.</p>