31        if ($pSource !== 
null) {
 
   45        if ($pSource == 
null) {
 
   49        foreach ($pSource as $item) {
 
   62        if (!isset($this->items[$hash])) {
 
   63            $this->items[$hash] = $pSource;
 
   64            $this->keyMap[
count($this->items) - 1] = $hash;
 
   76        if (isset($this->items[$hash])) {
 
   77            unset($this->items[$hash]);
 
   80            foreach ($this->keyMap as 
$key => $value) {
 
   81                if ($deleteKey >= 0) {
 
   82                    $this->keyMap[
$key - 1] = $value;
 
   85                if ($value == $hash) {
 
   89            unset($this->keyMap[
count($this->keyMap) - 1]);
 
  109        return count($this->items);
 
  121        return array_search($pHashCode, $this->keyMap);
 
  133        if (isset($this->keyMap[$pIndex])) {
 
  149        if (isset($this->items[$pHashCode])) {
 
  150            return $this->items[$pHashCode];
 
  171        $vars = get_object_vars($this);
 
  172        foreach ($vars as 
$key => $value) {
 
  174            if (is_array($value)) {
 
  176                foreach ($array1 as $key1 => $value1) {
 
  177                    if (is_object($value1)) {
 
  178                        $array1[$key1] = clone $value1;
 
  181                $this->
$key = $array1;
 
An exception for terminatinating execution or to throw for unit testing.
@template T of IComparable
addFromSource(?array $pSource=null)
Add HashTable items from source.
add(IComparable $pSource)
Add HashTable item.
getByHashCode($pHashCode)
Get by hashcode.
__construct($pSource=null)
Create a new \PhpOffice\PhpSpreadsheet\HashTable.
toArray()
HashTable to array.
getIndexForHashCode($pHashCode)
Get index for hash code.
getByIndex($pIndex)
Get by index.
__clone()
Implement PHP __clone to create a deep clone, not just a shallow copy.
getHashCode()
Get hash code.