Get
HTTP input injection and typed variants.
Purpose & processing
Reads values from the APPNETOS GET controller.
Parameters
| Parameter | Type | Default | Behavior |
|---|---|---|---|
| key | string | Required | Key used to resolve the value. |
Example
#[Get('page')]
protected mixed $page = null;
#[GetInt('page')]
protected int $pageNumber = 0;
Behavior and considerations
- Available attributes:
Get,GetString,GetInt,GetFloat,GetBool,GetArray. - An absent untyped value resolves to null.
- Absent typed values use String: empty string; Int: 0; Float: 0.0; Bool: false; Array: empty array.
- Type conversion and validation are implemented by the corresponding input controllers; array variants accept arrays and can wrap scalar values.
Source
shared/src/Core/Annotation/Get*.php