Request Inputs

All inputs (form fields, query string, cookies, etc.) can be retrieved from the centro Apex\App\App object. Below explains all functions available from the $app object.

POST Inputs

GET Inputs

REQUEST Inputs

Cookies

Dynamic Path Parameters

Uploaded Files

  • file(string $key): array
  • hasFile(string $key): bool
  • getAllFile(): array
  • clearFile(): void
  • fileName(string $key): ?string
  • fileTmpName(string $key): ?string
  • fileType(string $key): ?string
  • fileContents(string $key): ?string
  • fileStream(string $key): ?stream

SERVER Variables

Filters

Each of the methods that allow you to retrive a single variable contain a $filters parameter, which is a string of words delimited by a period and defines the filters to apply to the variable before returning it. Below explains the available filters:

  • trim - Passes the variable through the trim() function, stripping whitespace from both sides.
  • escape - Applies the filter_var() function with option FILTER_UNSAFE_RAW
  • lower - Lowercases the value
  • upper - Uppercases the value
  • title - Titlecases the value
  • strip_tags - Applies the strip_tags() function against the value
  • digit - Deletes all non-digit characters from the value.