Server extends Request implements IRequestFilter
Filter for Server variables, such as $_SERVER["REQUEST_URI"]
Tags
Table of Contents
Interfaces
Constants
- ACTION_CLEAR = 'clear'
- ACTION_FILTER = 'filter'
- ACTION_NONE = 'none'
Methods
- __construct() : mixed
- filter() : array<string|int, mixed>|null
- Return filtered values or null if auditors not triggered (by default)
- getChangedVars() : array<string|int, mixed>
- Return all changed variables, can be useful for logging
- isAuditorsTriggered() : bool
- setAuditors() : $this
- Set auditors for use in filtration
Constants
ACTION_CLEAR
public
mixed
ACTION_CLEAR
= 'clear'
ACTION_FILTER
public
mixed
ACTION_FILTER
= 'filter'
ACTION_NONE
public
mixed
ACTION_NONE
= 'none'
Methods
__construct()
public
__construct([mixed $customOptions = array() ]) : mixed
Parameters
- $customOptions : mixed = array()
filter()
Return filtered values or null if auditors not triggered (by default)
public
filter(array<string|int, mixed> $values[, bool $isReturnChangedOnly = true ]) : array<string|int, mixed>|null
Parameters
- $values : array<string|int, mixed>
-
Array of values to be checked.
- $isReturnChangedOnly : bool = true
-
If true - return values only if it changed by some auditors, otherwise return null.
Tags
Return values
array<string|int, mixed>|nullgetChangedVars()
Return all changed variables, can be useful for logging
public
getChangedVars() : array<string|int, mixed>
Return values
array<string|int, mixed>isAuditorsTriggered()
public
isAuditorsTriggered() : bool
Tags
Return values
boolsetAuditors()
Set auditors for use in filtration
public
setAuditors(array<string|int, Base> $auditors) : $this
Parameters
- $auditors : array<string|int, Base>