1
This commit is contained in:
@@ -4,8 +4,9 @@ namespace Kiri\Core;
|
|||||||
|
|
||||||
use JetBrains\PhpStorm\Pure;
|
use JetBrains\PhpStorm\Pure;
|
||||||
use ReturnTypeWillChange;
|
use ReturnTypeWillChange;
|
||||||
|
use Traversable;
|
||||||
|
|
||||||
class HashMap implements \ArrayAccess
|
class HashMap implements \ArrayAccess, \IteratorAggregate
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -14,6 +15,15 @@ class HashMap implements \ArrayAccess
|
|||||||
private array $lists = [];
|
private array $lists = [];
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Traversable
|
||||||
|
*/
|
||||||
|
public function getIterator(): Traversable
|
||||||
|
{
|
||||||
|
return new \ArrayIterator($this->lists);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $key
|
* @param string $key
|
||||||
* @param $value
|
* @param $value
|
||||||
|
|||||||
Reference in New Issue
Block a user