Bitrix API

Server extends Request implements IRequestFilter

Filter for Server variables, such as $_SERVER["REQUEST_URI"]

Tags
since
14.0.0

Table of Contents

Interfaces

IRequestFilter

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
example

tests/security/filter/serverfilter.php

Return values
array<string|int, mixed>|null

getChangedVars()

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
since
14.0.3
Return values
bool

setAuditors()

Set auditors for use in filtration

public setAuditors(array<string|int, Base$auditors) : $this
Parameters
$auditors : array<string|int, Base>
Return values
$this

        
On this page

Search results