Bigtable/src/Table.php
public function readRows(array $options = [])
    {
        $rowKeys = $this->pluck('rowKeys', $options, false) ?: [];
        $ranges = $this->pluck('rowRanges', $options, false) ?: [];
        $filter = $this->pluck('filter', $options, false) ?: null;

        array_walk($ranges, function (&$range) {
            $range = $this->serializer->decodeMessage(
                new RowRange(),
                $range
            );
        });
        if (!is_array($rowKeys)) {
            throw new \InvalidArgumentException(
                sprintf(
                    'Expected rowKeys to be of type array, instead got \'%s\'.',
                    gettype($rowKeys)
                )
            );
        }
        if ($ranges || $rowKeys) {
            $options['rows'] = $this->serializer->decodeMessage(
                new RowSet,
                [
                    'rowKeys' => $rowKeys,
                    'rowRanges' => $ranges
                ]
            );
        }
        if ($filter !== null) {
            if (!$filter instanceof FilterInterface) {
                throw new \InvalidArgumentException(
                    sprintf(
                        'Expected filter to be of type \'%s\', instead got \'%s\'.',
                        FilterInterface::class,
                        gettype($filter)
                    )
                );
            }
            $options['filter'] = $filter->toProto();
        }
        return new ChunkFormatter(
            [$this->gapicClient, 'readRows'],
            $this->tableName,
            $options + $this->options
        );
    }
public function readRows(array $options = [])
    {
        $rowKeys = $this->pluck('rowKeys', $options, false) ?: [];
        $ranges = $this->pluck('rowRanges', $options, false) ?: [];
        $filter = $this->pluck('filter', $options, false) ?: null;

        array_walk($ranges, function (&$range) {
            $range = $this->serializer->decodeMessage(
                new RowRange(),
                $range
            );
        });
        if (!is_array($rowKeys)) {
            throw new \InvalidArgumentException(
                sprintf(
                    'Expected rowKeys to be of type array, instead got \'%s\'.',
                    gettype($rowKeys)
                )
            );
        }
        if ($ranges || $rowKeys) {
            $options['rows'] = $this->serializer->decodeMessage(
                new RowSet,
                [
                    'rowKeys' => $rowKeys,
                    'rowRanges' => $ranges
                ]
            );
        }
        if ($filter !== null) {
            if (!$filter instanceof FilterInterface) {
                throw new \InvalidArgumentException(
                    sprintf(
                        'Expected filter to be of type \'%s\', instead got \'%s\'.',
                        FilterInterface::class,
                        gettype($filter)
                    )
                );
            }
            $options['filter'] = $filter->toProto();
        }
        return new ChunkFormatter(
            [$this->gapicClient, 'readRows'],
            $this->tableName,
            $options + $this->options
        );
    }
public function readRows ( array $ options = [ ] ) { $ rowKeys = $ this -> pluck ( 'rowKeys' , $ options , false ) ? : [ ] ; $ ranges = $ this -> pluck ( 'rowRanges' , $ options , false ) ? : [ ] ; $ filter = $ this -> pluck ( 'filter' , $ options , false ) ? : null ; array_walk ( $ ranges , function ( & $ range ) { $ range = $ this -> serializer -> decodeMessage ( new RowRange ( ) , $ range ) ; } ) ; if ( ! is_array ( $ rowKeys ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Expected rowKeys to be of type array, instead got \'%s\'.' , gettype ( $ rowKeys ) ) ) ; } if ( $ ranges || $ rowKeys ) { $ options [ 'rows' ] = $ this -> serializer -> decodeMessage ( new RowSet , [ 'rowKeys' => $ rowKeys , 'rowRanges' => $ ranges ] ) ; } if ( $ filter !== null ) { if ( ! $ filter instanceof FilterInterface ) { throw new \ InvalidArgumentException ( sprintf ( 'Expected filter to be of type \'%s\', instead got \'%s\'.' , FilterInterface :: class , gettype ( $ filter ) ) ) ; } $ options [ 'filter' ] = $ filter -> toProto ( ) ; } return new ChunkFormatter ( [ $ this -> gapicClient , 'readRows' ] , $ this -> tableName , $ options + $ this -> options ) ; }
Read rows from the table.

Example:
```
$rows = $table->readRows();

foreach ($rows as $row) {
print_r($row) . PHP_EOL;
}
```

```
// Specify a set of row ranges.
$rows = $table->readRows([
'rowRanges' => [
[
'startKeyOpen' => 'jefferson',
'endKeyOpen' => 'lincoln'
]
]
]);

foreach ($rows as $row) {
print_r($row) . PHP_EOL;
}
```

@param array $options [optional] {
Configuration options.

@type string[] $rowKeys A set of row keys to read.
@type array $rowRanges A set of row ranges. Each row range is an
associative array which may contain a start key
(`startKeyClosed` or `startKeyOpen`) and/or an end key
(`endKeyOpen` or `endKeyClosed`).
@type FilterInterface $filter A filter used to take an input row and
produce an alternate view of the row based on the specified rules.
To learn more please see {@see Google\Cloud\Bigtable\Filter} which
provides static factory methods for the various filter types.
@type int $rowsLimit The number of rows to scan.
@type int $retries Number of times to retry. **Defaults to** `3`.
}
@return ChunkFormatter
Read rows from the table .