예제 #1
0
function __construct ($configs)
{
	parent::__construct($configs);

	if (isset($configs['prefix' ])) $this->prefix  = $configs['prefix' ];
	if (isset($configs['entropy'])) $this->entropy = $configs['entropy'];
}
예제 #2
0
function __construct ($configs)
{
	parent::__construct($configs);

	if(isset($configs['alphabet' ])) $this->alphabet  =     (string ) $configs['alphabet' ];
	if(isset($configs['minlength'])) $this->minlength = max((integer) $configs['minlength'], 1               );
	if(isset($configs['maxlength'])) $this->maxlength = max((integer) $configs['maxlength'], $this->minlength);
}