hashToValue[$hash]; } public function setValue(object $key, mixed $value): self { $hash = spl_object_id($key); $this->hashToKey[$hash] = $key; $this->hashToValue[$hash] = $value; return $this; } /** * @return mixed[] */ public function getAllKeys(): array { return array_values($this->hashToKey); } /** * @return mixed[] */ public function getAllValues(): array { return array_values($this->hashToValue); } public function count(): int { return count($this->hashToKey); } }