CycloneDX Library

HashDictionary
in package
implements Countable

Dictionary of {@see HashAlgorithm} => HashContent.

Tags
psalm-type

HashContent = string

psalm-type

HashAlgorithmContentTuple = list{HashAlgorithm,HashContent}

author

jkowalleck

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
psalm-var

array<string,HashAlgorithmContentTuple>

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
psalm-param

array<HashAlgorithmContentTuple> $items

count()

public count() : int
Tags
psalm-return

0|positive-int

Return values
int

getItems()

public getItems() : array<string|int, array<string|int, mixed>>
Tags
psalm-return

list<HashAlgorithmContentTuple>

Return values
array<string|int, array<string|int, mixed>>

list of tuples of [HashAlgorithm $algorithm, string $content]

setItems()

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
psalm-param

array<HashAlgorithmContentTuple> $items

Return values
$this

        
On this page

Search results