\Imi\UtilFilterableList

过滤字段的列表,每一个成员应该是数组或对象

Summary

Methods
Properties
Constants
__construct()
offsetExists()
offsetGet()
offsetSet()
offsetUnset()
current()
key()
next()
rewind()
valid()
toArray()
jsonSerialize()
remove()
clear()
append()
count()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
parseList()
$mode
$fields
$list
N/A

Properties

$mode

$mode : string

模式 allow-白名单 deny-黑名单

Type

string

$fields

$fields : array<mixed,string>|null

字段名数组

为null则不过滤

Type

array<mixed,string>|null

$list

$list : array

数组列表

Type

array

Methods

__construct()

__construct(  $list = array(),   $fields = null,   $mode = 'allow') 

Parameters

$list
$fields
$mode

offsetExists()

offsetExists(  $offset) 

Parameters

$offset

offsetGet()

offsetGet(  $offset) 

Parameters

$offset

offsetSet()

offsetSet(  $offset,   $value) 

Parameters

$offset
$value

offsetUnset()

offsetUnset(  $offset) 

Parameters

$offset

current()

current() 

key()

key() 

next()

next() 

rewind()

rewind() 

valid()

valid() 

toArray()

toArray() : array

将当前对象作为数组返回

Returns

array

jsonSerialize()

jsonSerialize() : array

json 序列化

Returns

array

remove()

remove(mixed  ...$value) : void

从数组列表中移除

Parameters

mixed $value variadic

clear()

clear() : void

清空

append()

append(mixed  ...$value) : void

加入数组列表

Parameters

mixed $value variadic

count()

count() : integer

数组列表长度

Returns

integer

parseList()

parseList(array  $list) : void

处理列表

Parameters

array $list