class HashTable (View source)

Properties

protected IComparable[] $items HashTable elements.
protected string[] $keyMap HashTable key map.

Methods

__construct(IComparable[] $pSource = null)

Create a new \PhpOffice\PhpSpreadsheet\HashTable.

addFromSource(array $pSource = null)

Add HashTable items from source.

add(IComparable $pSource)

Add HashTable item.

remove(IComparable $pSource)

Remove HashTable item.

clear()

Clear HashTable.

int
count()

Count.

int
getIndexForHashCode(string $pHashCode)

Get index for hash code.

getByIndex(int $pIndex)

Get by index.

getByHashCode(string $pHashCode)

Get by hashcode.

toArray()

HashTable to array.

__clone()

Implement PHP __clone to create a deep clone, not just a shallow copy.

Details

__construct(IComparable[] $pSource = null)

Create a new \PhpOffice\PhpSpreadsheet\HashTable.

Parameters

IComparable[] $pSource Optional source array to create HashTable from

Exceptions

Exception

addFromSource(array $pSource = null)

Add HashTable items from source.

Parameters

array $pSource Source array to create HashTable from

Exceptions

Exception

add(IComparable $pSource)

Add HashTable item.

Parameters

IComparable $pSource Item to add

remove(IComparable $pSource)

Remove HashTable item.

Parameters

IComparable $pSource Item to remove

clear()

Clear HashTable.

int count()

Count.

Return Value

int

int getIndexForHashCode(string $pHashCode)

Get index for hash code.

Parameters

string $pHashCode

Return Value

int Index

IComparable getByIndex(int $pIndex)

Get by index.

Parameters

int $pIndex

Return Value

IComparable

IComparable getByHashCode(string $pHashCode)

Get by hashcode.

Parameters

string $pHashCode

Return Value

IComparable

IComparable[] toArray()

HashTable to array.

Return Value

IComparable[]

__clone()

Implement PHP __clone to create a deep clone, not just a shallow copy.