Post
extends Get
in package
Body parameter accessor for POST requests.
Same interface as Get, but reads values from $_POST instead of $_GET.
Tags
Table of Contents
Properties
- $key : string
Methods
- __construct() : mixed
- Initialize a GET parameter accessor.
- v() : string|null
- Retrieve a POST parameter value with optional default.
Properties
$key read-only
protected
string
$key
Methods
__construct()
Initialize a GET parameter accessor.
public
__construct(string $key) : mixed
Parameters
- $key : string
-
The parameter name/key to access from $_GET.
v()
Retrieve a POST parameter value with optional default.
public
v([string|null $default = null ]) : string|null
Parameters
- $default : string|null = null
-
Default value if the parameter is not present.
Return values
string|null —The parameter value or default value.