\DtApp\ThinkLibrary\extendCodeExtend

随机数码管理扩展 Class CodeExtend

Summary

Methods
Properties
Constants
random()
uniqidDate()
uniqidNumber()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

random()

random(integer  $size = 10, integer  $type = 1, string  $prefix = '') : string

获取随机字符串编码

Parameters

integer $size

编码长度

integer $type

编码类型(1纯数字,2纯字母,3数字字母)

string $prefix

编码前缀

Throws

\Exception

Returns

string

uniqidDate()

uniqidDate(integer  $size = 16, string  $prefix = '') : string

唯一日期编码

Parameters

integer $size

编码长度

string $prefix

编码前缀

Throws

\Exception

Returns

string

uniqidNumber()

uniqidNumber(integer  $size = 12, string  $prefix = '') : string

唯一数字编码

Parameters

integer $size

编码长度

string $prefix

编码前缀

Throws

\Exception

Returns

string