PHP 클래스 Vimeo\ABLincoln\Operators\RandomOperator
Required Inputs: None
Optional Inputs:
- 'salt': salt for hash (should generally be unique for each random
variable). If 'salt' input not specified, parameter name is used as
random variable salt.
파일 보기
프로젝트 열기: vimeo/ablincoln
공개 메소드들
메소드 |
설명 |
|
__construct ( array $options, mixed $inputs ) |
Constructor: store given parameters and establish scale for hashing |
|
보호된 메소드들
메소드 |
설명 |
|
_getHash ( mixed $appended_unit = null ) : integer |
Form a complete salt string and hash it to a number |
|
_getUniform ( $min_val, $max_val = 1, $appended_unit = null ) : float |
Get a random decimal between two provided values |
|
비공개 메소드들
메소드 |
설명 |
|
_getUnit ( mixed $appended_unit = null ) : array |
Format all units into an array before hashing |
|
메소드 상세
Constructor: store given parameters and establish scale for hashing
public __construct ( array $options, mixed $inputs ) |
$options |
array |
array mapping operator options to values |
$inputs |
mixed |
input value/array used for hashing |
Form a complete salt string and hash it to a number
protected _getHash ( mixed $appended_unit = null ) : integer |
$appended_unit |
mixed |
optional extra unit used for hashing |
리턴 |
integer |
decimal representation of computed SHA1 hash |