class ListUsersController extends AbstractListController

Properties

$serializer <p>{@inheritdoc}</p>
$include <p>{@inheritdoc}</p>
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
$sortFields <p>{@inheritdoc}</p>
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 array $loadRelations from AbstractSerializeController
protected UserFilterer $filterer
protected UserSearcher $searcher
protected UrlGenerator $url

Methods

ResponseInterface
handle(ServerRequestInterface $request)

<p>{@inheritdoc}</p>

mixed
data(ServerRequestInterface $request, Document $document)

<p>Get the data to be serialized and assigned to the response document.</p>

ElementInterface
createElement(mixed $data, SerializerInterface $serializer)

<p>Create a PHP JSON-API Element for output in the document.</p>

array
getRelationsToLoad()

<p>Returns the relations to load added by extenders.</p>

void
loadRelations(Collection $models, array $relations)

<p>Eager loads the required relationships.</p>

array
extractInclude(ServerRequestInterface $request)

No description

array
extractFields(ServerRequestInterface $request)

No description

array|null
extractSort(ServerRequestInterface $request)

No description

int
extractOffset(ServerRequestInterface $request)

No description

int
extractLimit(ServerRequestInterface $request)

No description

array
extractFilter(ServerRequestInterface $request)

No description

Parameters
buildParameters(ServerRequestInterface $request)

No description

bool
sortIsDefault(ServerRequestInterface $request)

No description

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>

static Container
getContainer()

No description

static 
setContainer(Container $container)

No description

static 
addDataPreparationCallback(string $controllerClass, callable $callback)

No description

static 
addSerializationPreparationCallback(string $controllerClass, callable $callback)

No description

static 
setLoadRelations(string $controllerClass, array $relations)

No description

__construct(UserFilterer $filterer, UserSearcher $searcher, UrlGenerator $url)

No description

Details

ResponseInterface handle(ServerRequestInterface $request)

<p>{@inheritdoc}</p>

Parameters

ServerRequestInterface $request

Return Value

ResponseInterface

protected mixed data(ServerRequestInterface $request, Document $document)

<p>Get the data to be serialized and assigned to the response document.</p>

Parameters

ServerRequestInterface $request
Document $document

Return Value

mixed

protected ElementInterface createElement(mixed $data, SerializerInterface $serializer)

<p>Create a PHP JSON-API Element for output in the document.</p>

Parameters

mixed $data
SerializerInterface $serializer

Return Value

ElementInterface

protected array getRelationsToLoad()

<p>Returns the relations to load added by extenders.</p>

Return Value

array

protected void loadRelations(Collection $models, array $relations)

<p>Eager loads the required relationships.</p>

Parameters

Collection $models
array $relations

Return Value

void

protected array extractInclude(ServerRequestInterface $request)

Parameters

ServerRequestInterface $request

Return Value

array

Exceptions

InvalidParameterException

protected array extractFields(ServerRequestInterface $request)

Parameters

ServerRequestInterface $request

Return Value

array

protected array|null extractSort(ServerRequestInterface $request)

Parameters

ServerRequestInterface $request

Return Value

array|null

Exceptions

InvalidParameterException

protected int extractOffset(ServerRequestInterface $request)

Parameters

ServerRequestInterface $request

Return Value

int

Exceptions

InvalidParameterException

protected int extractLimit(ServerRequestInterface $request)

Parameters

ServerRequestInterface $request

Return Value

int

protected array extractFilter(ServerRequestInterface $request)

Parameters

ServerRequestInterface $request

Return Value

array

protected Parameters buildParameters(ServerRequestInterface $request)

Parameters

ServerRequestInterface $request

Return Value

Parameters

protected bool sortIsDefault(ServerRequestInterface $request)

Parameters

ServerRequestInterface $request

Return Value

bool

setSerializer(string $serializer)

<p>Set the serializer that will serialize data for the endpoint.</p>

Parameters

string $serializer

addInclude(string|array $name)

<p>Include the given relationship by default.</p>

Parameters

string|array $name

removeInclude(string|array $name)

<p>Don't include the given relationship by default.</p>

Parameters

string|array $name

addOptionalInclude(string|array $name)

<p>Make the given relationship available for inclusion.</p>

Parameters

string|array $name

removeOptionalInclude(string|array $name)

<p>Don't allow the given relationship to be included.</p>

Parameters

string|array $name

setLimit(int $limit)

<p>Set the default number of results.</p>

Parameters

int $limit

setMaxLimit(int $max)

<p>Set the maximum number of results.</p>

Parameters

int $max

addSortField(string|array $field)

<p>Allow sorting results by the given field.</p>

Parameters

string|array $field

removeSortField(string|array $field)

<p>Disallow sorting results by the given field.</p>

Parameters

string|array $field

setSort(array $sort)

<p>Set the default sort order for the results.</p>

Parameters

array $sort

static Container getContainer()

Return Value

Container

static setContainer(Container $container)

Parameters

Container $container

static addDataPreparationCallback(string $controllerClass, callable $callback)

Parameters

string $controllerClass
callable $callback

static addSerializationPreparationCallback(string $controllerClass, callable $callback)

Parameters

string $controllerClass
callable $callback

static setLoadRelations(string $controllerClass, array $relations)

Parameters

string $controllerClass
array $relations

__construct(UserFilterer $filterer, UserSearcher $searcher, UrlGenerator $url)

Parameters

UserFilterer $filterer
UserSearcher $searcher
UrlGenerator $url