Documentation

HashTable
in package

\PhpOffice\PhpPresentation\HashTable.

Table of Contents

Properties

$items  : array<string, ComparableInterface>
HashTable elements.
$keyMap  : array<int, string>
HashTable key map.

Methods

__construct()  : mixed
Create a new \PhpOffice\PhpPresentation\HashTable.
add()  : void
Add HashTable item.
addFromSource()  : void
Add HashTable items from source.
clear()  : void
Clear HashTable.
count()  : int
Count.
getByHashCode()  : ComparableInterface|null
Get by hashcode.
getByIndex()  : ComparableInterface|null
Get by index.
getIndexForHashCode()  : int
Get index for hash code.
remove()  : void
Remove HashTable item.
toArray()  : array<string|int, ComparableInterface>
HashTable to array.

Properties

$keyMap

HashTable key map.

public array<int, string> $keyMap = []

Methods

__construct()

Create a new \PhpOffice\PhpPresentation\HashTable.

public __construct([array<int, ComparableInterface$pSource = [] ]) : mixed
Parameters
$pSource : array<int, ComparableInterface> = []

Optional source array to create HashTable from

clear()

Clear HashTable.

public clear() : void

count()

Count.

public count() : int
Return values
int

getIndexForHashCode()

Get index for hash code.

public getIndexForHashCode([string $pHashCode = '' ]) : int
Parameters
$pHashCode : string = ''
Return values
int

Index (-1 if not found)


        
On this page

Search results