Documentation

Base
in package

A class that provides helpers for accessing form data

Table of Contents

$super  : array<string|int, mixed>
$which  : int
__construct()  : mixed
Constructor
exists()  : bool
Is the key in the array?
mustExist()  : bool
Is the key in the array?
getSuper()  : array<string|int, mixed>
Return the relevant Superglobal

Properties

$super

protected array<string|int, mixed> $super

$which

protected int $which

Methods

__construct()

Constructor

public __construct(int|null $which) : mixed
Parameters
$which : int|null

The appropriate INPUT_ filter or NULL (which will be for PUT/PATCH...)

Return values
mixed

exists()

Is the key in the array?

public exists(mixed $name) : bool
Parameters
$name : mixed

The keys

Tags
TODO

Fix the need for two calls. They are there because getval does an array check which is not relevant for an existence check. We need a three valued boolean :-)

Return values
bool

mustExist()

Is the key in the array?

public mustExist(mixed $name) : bool
Parameters
$name : mixed

The keys

Tags
TODO

Fix the need for two calls. They are there because getval does an array check which is not relevant for an existence check. We need a three valued boolean :-)

throws
BadValue
Return values
bool

getSuper()

Return the relevant Superglobal

protected getSuper([int $which = NULL ]) : array<string|int, mixed>

@TODO Change this to use match() when PHP 8 is released

Parameters
$which : int = NULL

@return array

Return values
array<string|int, mixed>

Search results