class RandomStringGeneratorFactory

Class RandomStringGeneratorFactory

Methods

createRandomStringGenerator(string|RandomStringGenerator|null $generator = null)

创建一个随机字符串生成器

Details

at line 30
static RandomStringGenerator createRandomStringGenerator(string|RandomStringGenerator|null $generator = null)

创建一个随机字符串生成器

Parameters

string|RandomStringGenerator|null $generator 可以一个RandomStringGenerator实例, 也可以是'random_bytes','mcrypt','openssl','urandom'四种其中一种的string, 若不提供则会自动检测默认实现

Return Value

RandomStringGenerator