LimeSurvey API - Master branch

Filter
in package

Filters are applied before validation.

example config: 'adminEmail' => ['filter' => 'trim'] which would result in trim($value) or 'adminEmail' => ['filter' => ['trim' => [' e!%§"']]] which would result in trim($value, ' e!%§')

Table of Contents

Properties

$filter  : string
the filter method
$filterParams  : array<string|int, mixed>

Methods

filter()  : mixed|null
Tries to execute a data transforming filter.

Properties

$filter

the filter method

private string $filter = ''

$filterParams

private array<string|int, mixed> $filterParams = []

optional parameters to be passed to the filter method

Methods

filter()

Tries to execute a data transforming filter.

public filter(mixed|null $value, array<string|int, mixed>|string $config) : mixed|null

This can deal with basic php functions, e.g. trim, strtolower, etc where the value is always passed as the first argument.

Parameters
$value : mixed|null
$config : array<string|int, mixed>|string
Return values
mixed|null

        
On this page

Search results