过滤器¶
属性 | 值 |
---|---|
命名空间 | fize\security |
类名 | Filter |
方法: |
---|
方法名 | 说明 |
---|---|
hasVar() | 判断是否有传递某参数 |
id() | 返回与某个特定名称的过滤器相关联的 id |
inputArray() | 获取一系列外部变量,并且可以通过过滤器处理它们 |
input() | 通过名称获取特定的外部变量,并且可以通过过滤器处理它 |
list() | 返回所支持的过滤器列表 |
varArray() | 获取多个变量并且过滤它们 |
var() | 使用特定的过滤器过滤一个变量 |
方法¶
hasVar()¶
判断是否有传递某参数
public static function hasVar (
int $type,
string $variable_name
) : bool
参数: |
|
---|
参数 `$type` :
INPUT_GET, INPUT_POST, INPUT_COOKIE, INPUT_SERVER, or INPUT_ENV 值其中一个
id()¶
返回与某个特定名称的过滤器相关联的 id
public static function id (
string $filtername
) : int
参数: |
|
---|
inputArray()¶
获取一系列外部变量,并且可以通过过滤器处理它们
public static function inputArray (
int $type,
mixed $definition,
bool $add_empty = true
) : mixed
参数: |
|
---|
参数 `$type` :
INPUT_GET, INPUT_POST, INPUT_COOKIE, INPUT_SERVER, or INPUT_ENV 值其中一个
input()¶
通过名称获取特定的外部变量,并且可以通过过滤器处理它
public static function input (
int $type,
string $variable_name,
int $filter = 516,
mixed $options = null
) : mixed
参数: |
|
---|
参数 `$type` :
INPUT_GET, INPUT_POST, INPUT_COOKIE, INPUT_SERVER, or INPUT_ENV 值其中一个
varArray()¶
获取多个变量并且过滤它们
public static function varArray (
array $data,
mixed $definition,
bool $add_empty = true
) : mixed
参数: |
|
---|
var()¶
使用特定的过滤器过滤一个变量
public static function var (
mixed $variable,
int $filter = 516,
mixed $options = null
) : mixed
参数: |
|
---|