class RequestUtil

Methods

static bool
isApiRequest(ServerRequestInterface $request)

No description

static bool
isHtmlRequest(ServerRequestInterface $request)

No description

static User
getActor(ServerRequestInterface $request)

No description

static ServerRequestInterface
withActor(ServerRequestInterface $request, User $actor)

No description

static array|null
extractSort(ServerRequestInterface $request, string|null $default, array $available = [])

No description

static int|null
extractLimit(ServerRequestInterface $request, int|null $defaultLimit = null, int|null $max = null)

No description

static int
extractOffsetFromNumber(ServerRequestInterface $request, int $limit)

No description

static int
extractOffset(ServerRequestInterface $request, int|null $limit = 0)

No description

static array
extractInclude(ServerRequestInterface $request, array|null $available)

No description

static array
extractFilter(ServerRequestInterface $request)

No description

static array
extractFields(ServerRequestInterface $request, array|null $available = null)

No description

Details

static bool isApiRequest(ServerRequestInterface $request)

Parameters

ServerRequestInterface $request

Return Value

bool

static bool isHtmlRequest(ServerRequestInterface $request)

Parameters

ServerRequestInterface $request

Return Value

bool

static User getActor(ServerRequestInterface $request)

Parameters

ServerRequestInterface $request

Return Value

User

static ServerRequestInterface withActor(ServerRequestInterface $request, User $actor)

Parameters

ServerRequestInterface $request
User $actor

Return Value

ServerRequestInterface

static array|null extractSort(ServerRequestInterface $request, string|null $default, array $available = [])

Parameters

ServerRequestInterface $request
string|null $default
array $available

Return Value

array|null

static int|null extractLimit(ServerRequestInterface $request, int|null $defaultLimit = null, int|null $max = null)

Parameters

ServerRequestInterface $request
int|null $defaultLimit
int|null $max

Return Value

int|null

static int extractOffsetFromNumber(ServerRequestInterface $request, int $limit)

Parameters

ServerRequestInterface $request
int $limit

Return Value

int

static int extractOffset(ServerRequestInterface $request, int|null $limit = 0)

Parameters

ServerRequestInterface $request
int|null $limit

Return Value

int

static array extractInclude(ServerRequestInterface $request, array|null $available)

Parameters

ServerRequestInterface $request
array|null $available

Return Value

array

static array extractFilter(ServerRequestInterface $request)

Parameters

ServerRequestInterface $request

Return Value

array

static array extractFields(ServerRequestInterface $request, array|null $available = null)

Parameters

ServerRequestInterface $request
array|null $available

Return Value

array