Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
tests/security/filter/requestfilter.php

Return array with filtered values

Simple example: $ob = new Request(); $ob->setAuditors([ 'SQL' => new Auditor\Sql() ]); print_r( $ob->filter([ 'get' => ['safe bar'], 'post' => ['select * from foo'] ]) ); //output: Array ( [post] => Array ( [0] => sel ect * fr om foo ) )

print_r( $ob->filter([ 'get' => ['safe bar'], 'post' => ['select * from foo'] ], false ) ); //output: Array ( [get] => Array ( [0] => safe bar ) [post] => Array ( [0] => sel ect * fr om foo ) )

Аргументы
array$valuesarray("get" => $_GET, "post" => $_POST, "files" => $_FILES, "cookie" => $_COOKIE)
bool$isReturnChangedOnlyif true - return values only if it changed by some auditors
Возвращает
array