APPNETOS is under active development This website and its documentation are being prepared for public launch. Content and features may change.
Select Theme
Loading

Request

HTTP input injection and typed variants.

Purpose & processing

Reads the APPNETOS combined Request controller, which checks POST first, then GET, then Cookie; it does not simply read PHP $_REQUEST.

Parameters

Parameter Type Default Behavior
key string Required Key used to resolve the value.

Example

#[Request('page')]
protected mixed $page = null;

#[RequestInt('page')]
protected int $pageNumber = 0;

Behavior and considerations

  • Available attributes: Request, RequestString, RequestInt, RequestFloat, RequestBool, RequestArray.
  • 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/Request*.php

Next Steps

Previous

Post

Explore Post

Next

Session & Cookies

Explore Session & Cookies