HashTable
Table of Contents
| $items | HashTable elements. | \PhpOffice\PhpSpreadsheet\IComparable[] |
|---|---|---|
| $keyMap | HashTable key map. | string[] |
| __construct() | Create a new \PhpOffice\PhpSpreadsheet\HashTable. | mixed |
| addFromSource() | Add HashTable items from source. | void |
| add() | Add HashTable item. | void |
| remove() | Remove HashTable item. | void |
| clear() | Clear HashTable. | void |
| count() | Count. | int |
| getIndexForHashCode() | Get index for hash code. | int |
| getByIndex() | Get by index. | IComparable |
| getByHashCode() | Get by hashcode. | IComparable |
| toArray() | HashTable to array. | \PhpOffice\PhpSpreadsheet\IComparable[] |
| __clone() | Implement PHP __clone to create a deep clone, not just a shallow copy. | mixed |
Properties
$items
HashTable elements.
protected
\PhpOffice\PhpSpreadsheet\IComparable[]
$items
= []
$keyMap
HashTable key map.
protected
string[]
$keyMap
= []
Methods
__construct()
Create a new \PhpOffice\PhpSpreadsheet\HashTable.
public
__construct(
[ $pSource :
\PhpOffice\PhpSpreadsheet\IComparable[]
= null ]
)
: mixed
Parameters
- $pSource : \PhpOffice\PhpSpreadsheet\IComparable[] = null
Optional source array to create HashTable from
Return values
mixedaddFromSource()
Add HashTable items from source.
public
addFromSource(
[ $pSource :
\PhpOffice\PhpSpreadsheet\IComparable[]
= null ]
)
: void
Parameters
- $pSource : \PhpOffice\PhpSpreadsheet\IComparable[] = null
Source array to create HashTable from
add()
Add HashTable item.
public
add(
$pSource :
IComparable
)
: void
Parameters
- $pSource : IComparable
Item to add
remove()
Remove HashTable item.
public
remove(
$pSource :
IComparable
)
: void
Parameters
- $pSource : IComparable
Item to remove
clear()
Clear HashTable.
public
clear(
)
: void
count()
Count.
public
count(
)
: int
Return values
intgetIndexForHashCode()
Get index for hash code.
public
getIndexForHashCode(
$pHashCode :
string
)
: int
Parameters
- $pHashCode : string
Return values
int —Index
getByIndex()
Get by index.
public
getByIndex(
$pIndex :
int
)
: IComparable
Parameters
- $pIndex : int
Return values
IComparablegetByHashCode()
Get by hashcode.
public
getByHashCode(
$pHashCode :
string
)
: IComparable
Parameters
- $pHashCode : string
Return values
IComparabletoArray()
HashTable to array.
public
toArray(
)
: \PhpOffice\PhpSpreadsheet\IComparable[]
Return values
\PhpOffice\PhpSpreadsheet\IComparable[]__clone()
Implement PHP __clone to create a deep clone, not just a shallow copy.
public
__clone(
)
: mixed