public function read(): \Generator
    {
        if ($key = $this->firstKey()) {
            yield $key => $this->get($key);
        }

        while ($key = $this->nextKey()) {
            yield $key => $this->get($key);
        }
    }
public function read(): \Generator
    {
        if ($key = $this->firstKey()) {
            yield $key => $this->get($key);
        }

        while ($key = $this->nextKey()) {
            yield $key => $this->get($key);
        }
    }
public function read ( ) : \ Generator { if ( $ key = $ this -> firstKey ( ) ) { yield $ key => $ this -> get ( $ key ) ; } while ( $ key = $ this -> nextKey ( ) ) { yield $ key => $ this -> get ( $ key ) ; } }
Read database keys.
@return \Generator
@throws Exception
Read database keys .