PHP Class Hackzilla\PasswordGenerator\Generator\AbstractPasswordGenerator

Inheritance: implements Hackzilla\PasswordGenerator\Generator\PasswordGeneratorInterface
Show file Open project: hackzilla/password-generator

Public Methods

Method Description
generatePasswords ( integer $count = 1 ) : array Generate $count number of passwords.
getOption ( $option ) : mixed Get option.
getOptionValue ( $option ) : mixed Get option value.
getOptions ( ) : array Possible options.
getParameter ( string $parameter, mixed $default = null ) : null | mixed
randomInteger ( integer $min, integer $max ) : integer Generate a random value Fallback to mt_rand if none provided.
removeOption ( $option ) Remove Option.
setOption ( string $option, array $optionSettings ) Set password generator option.
setOptionValue ( string $option, $value ) Set password generator option value.
setParameter ( string $parameter, mixed $value )
setRandomGenerator ( Hackzilla\PasswordGenerator\RandomGenerator\RandomGeneratorInterface $randomGenerator ) Set source of randomness.

Method Details

generatePasswords() public method

Generate $count number of passwords.
public generatePasswords ( integer $count = 1 ) : array
$count integer Number of passwords to return
return array

getOption() public method

Get option.
public getOption ( $option ) : mixed
$option
return mixed

getOptionValue() public method

Get option value.
public getOptionValue ( $option ) : mixed
$option
return mixed

getOptions() public method

Possible options.
public getOptions ( ) : array
return array

getParameter() public method

public getParameter ( string $parameter, mixed $default = null ) : null | mixed
$parameter string
$default mixed
return null | mixed

randomInteger() public method

Generate a random value Fallback to mt_rand if none provided.
public randomInteger ( integer $min, integer $max ) : integer
$min integer
$max integer
return integer

removeOption() public method

Remove Option.
public removeOption ( $option )
$option

setOption() public method

Set password generator option.
public setOption ( string $option, array $optionSettings )
$option string
$optionSettings array

setOptionValue() public method

Set password generator option value.
public setOptionValue ( string $option, $value )
$option string
$value

setParameter() public method

public setParameter ( string $parameter, mixed $value )
$parameter string
$value mixed

setRandomGenerator() public method

Set source of randomness.
public setRandomGenerator ( Hackzilla\PasswordGenerator\RandomGenerator\RandomGeneratorInterface $randomGenerator )
$randomGenerator Hackzilla\PasswordGenerator\RandomGenerator\RandomGeneratorInterface