class
Context extends Context
Properties
|
int|string|null
|
$modelId |
|
|
|
|
array|null
|
$requestIncludes |
|
|
|
|
protected SearchResults|null
|
$search |
|
|
|
|
protected array
|
$internal |
Data passed internally when reusing resource endpoint logic. |
|
|
|
protected array
|
$parameters |
Parameters mutated on the current instance. |
|
|
Methods
__construct(
JsonApi $api,
ServerRequestInterface $request)
No description
array
fields(
Resource $resource)
Get the fields for the given resource, keyed by name.
mixed
internal(string $key, mixed $default = null)
No description
setParam(string $key, mixed $default = null)
No description
mixed
getParam(string $key, mixed $default = null)
No description
bool
creating(string|null $resource = null)
No description
bool
updating(string|null $resource = null)
No description
bool
deleting(string|null $resource = null)
No description
bool
showing(string|null $resource = null)
No description
bool
listing(string|null $resource = null)
No description
withRequest(
ServerRequestInterface $request)
No description
Details
__construct(JsonApi $api, ServerRequestInterface $request)
array
fields(Resource $resource)
Get the fields for the given resource, keyed by name.
Context
withInternal(string $key, mixed $value)
SearchResults|null
getSearchResults()
mixed
internal(string $key, mixed $default = null)
Context
setParam(string $key, mixed $default = null)
mixed
getParam(string $key, mixed $default = null)
bool
creating(string|null $resource = null)
bool
updating(string|null $resource = null)
bool
deleting(string|null $resource = null)
bool
showing(string|null $resource = null)
bool
listing(string|null $resource = null)
Context
withRequest(ServerRequestInterface $request)
Context
withModelId(int|string|null $id)
Context
withRequestIncludes(array $requestIncludes)