HashDictionary
in package
implements
Countable
Dictionary of {@see HashAlgorithm} => HashContent.
Tags
Table of Contents
Interfaces
- Countable
Properties
- $items : array<string|int, mixed>
Methods
- __construct() : mixed
- Ignores unknown hash algorithms.
- count() : int
- get() : string|null
- getItems() : array<string|int, array<string|int, mixed>>
- set() : $this
- setItems() : $this
- Set the hashes.
- makeDictKey() : string
Properties
$items
private
array<string|int, mixed>
$items
= []
Tags
Methods
__construct()
Ignores unknown hash algorithms.
public
__construct(array<string|int, mixed> ...$items) : mixed
Parameters
- $items : array<string|int, mixed>
-
list of tuples of [HashAlgorithm
$algorithm
, string$content
]
Tags
count()
public
count() : int
Tags
Return values
intget()
public
get(HashAlgorithm $algorithm) : string|null
Parameters
- $algorithm : HashAlgorithm
Return values
string|nullgetItems()
public
getItems() : array<string|int, array<string|int, mixed>>
Tags
Return values
array<string|int, array<string|int, mixed>> —list of tuples of [HashAlgorithm $algorithm
, string $content
]
set()
public
set(HashAlgorithm $algorithm, string|null $content) : $this
Parameters
- $algorithm : HashAlgorithm
- $content : string|null
Return values
$thissetItems()
Set the hashes.
public
setItems(array<string|int, mixed> ...$items) : $this
Ignores unknown hash algorithms.
Parameters
- $items : array<string|int, mixed>
-
list of tuples of [HashAlgorithm
$algorithm
, string$content
]
Tags
Return values
$thismakeDictKey()
private
static makeDictKey(HashAlgorithm $algorithm) : string
Parameters
- $algorithm : HashAlgorithm