Bigtable/src/ChunkFormatter.php
public function readAll()
    {
        // Chunks contain 3 properties:
        // - rowContents: The row contents, this essentially is all data
        //   pertaining to a single family.
        // - commitRow: This is a boolean telling us the all previous chunks for
        //   this row are ok to consume.
        // - resetRow: This is a boolean telling us that all the previous chunks
        //   are to be discarded.

        foreach ($this->stream as $readRowsResponse) {
            foreach ($readRowsResponse->getChunks() as $chunk) {
                switch ($this->state) {
                    case self::$rowStateEnum['NEW_ROW']:
                        $this->newRow($chunk);
                        break;
                    case self::$rowStateEnum['ROW_IN_PROGRESS']:
                        $this->rowInProgress($chunk);
                        break;
                    case self::$rowStateEnum['CELL_IN_PROGRESS']:
                        $this->cellInProgress($chunk);
                        break;
                }

                if ($chunk->getCommitRow()) {
                    $row = $this->row;
                    $rowKey = $this->rowKey;
                    $this->commit();
                    yield $rowKey => $row;
                    $this->numberOfRowsRead++;
                }
            }
        }

        $this->onStreamEnd();
    }
public function readAll()
    {
        // Chunks contain 3 properties:
        // - rowContents: The row contents, this essentially is all data
        //   pertaining to a single family.
        // - commitRow: This is a boolean telling us the all previous chunks for
        //   this row are ok to consume.
        // - resetRow: This is a boolean telling us that all the previous chunks
        //   are to be discarded.

        foreach ($this->stream as $readRowsResponse) {
            foreach ($readRowsResponse->getChunks() as $chunk) {
                switch ($this->state) {
                    case self::$rowStateEnum['NEW_ROW']:
                        $this->newRow($chunk);
                        break;
                    case self::$rowStateEnum['ROW_IN_PROGRESS']:
                        $this->rowInProgress($chunk);
                        break;
                    case self::$rowStateEnum['CELL_IN_PROGRESS']:
                        $this->cellInProgress($chunk);
                        break;
                }

                if ($chunk->getCommitRow()) {
                    $row = $this->row;
                    $rowKey = $this->rowKey;
                    $this->commit();
                    yield $rowKey => $row;
                    $this->numberOfRowsRead++;
                }
            }
        }

        $this->onStreamEnd();
    }
public function readAll ( ) { // Chunks contain 3 properties: // - rowContents: The row contents, this essentially is all data //   pertaining to a single family. // - commitRow: This is a boolean telling us the all previous chunks for //   this row are ok to consume. // - resetRow: This is a boolean telling us that all the previous chunks //   are to be discarded. foreach ( $ this -> stream as $ readRowsResponse ) { foreach ( $ readRowsResponse -> getChunks ( ) as $ chunk ) { switch ( $ this -> state ) { case self :: $ rowStateEnum [ 'NEW_ROW' ] : $ this -> newRow ( $ chunk ) ; break ; case self :: $ rowStateEnum [ 'ROW_IN_PROGRESS' ] : $ this -> rowInProgress ( $ chunk ) ; break ; case self :: $ rowStateEnum [ 'CELL_IN_PROGRESS' ] : $ this -> cellInProgress ( $ chunk ) ; break ; } if ( $ chunk -> getCommitRow ( ) ) { $ row = $ this -> row ; $ rowKey = $ this -> rowKey ; $ this -> commit ( ) ; yield $ rowKey => $ row ; $ this -> numberOfRowsRead ++ ; } } } $ this -> onStreamEnd ( ) ; }
Formats the row's chunks into a friendly format.

Example:
```
$rows = $formatter->readAll();
```

@return \Generator
@throws BigtableDataOperationException If a malformed response is received.
Formats the row s chunks into a friendly format .