\DtApp\ThinkLibrary\helperUnIqIds

唯一ID管理类

Summary

Methods
Properties
Constants
random()
date()
number()
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

date()

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

唯一日期编码

Parameters

integer $size
string $prefix

Throws

\Exception

Returns

string

number()

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

唯一数字编码

Parameters

integer $size
string $prefix

Throws

\Exception

Returns

string