\Fastknife\UtilsRandomUtils

Summary

Methods
Properties
Constants
getRandomInt()
getRandomColor()
getRandomAngle()
getRandomChar()
getUUID()
getRandomCode()
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

getRandomInt()

getRandomInt( $min,  $max) : int

获取随机数

Parameters

$min
$max

Returns

int —

getRandomColor()

getRandomColor() : array

随机获取眼色值

Returns

array —

getRandomAngle()

getRandomAngle(int  $start = -45, int  $end = 45) : int

随机获取角度

Parameters

int $start
int $end

Returns

int —

getRandomChar()

getRandomChar( $num) : array

随机获取汉字

Parameters

$num

int 生成汉字的数量

Returns

array —

getUUID()

getUUID(string  $prefix = '') : string

类似java一样的uuid

Parameters

string $prefix

Returns

string —

getRandomCode()

getRandomCode(int  $length = 10, int  $type = 1) : string

获取随机字符串编码

Parameters

int $length

字符串长度

int $type

字符串类型(1纯数字,2纯字母,3数字字母)

Returns

string —