BigQuery/src/BigQueryClient.php
public function datasets(array $options = [])
    {
        $resultLimit = $this->pluck('resultLimit', $options, false);

        return new ItemIterator(
            new PageIterator(
                function (array $dataset) {
                    return new Dataset(
                        $this->connection,
                        $dataset['datasetReference']['datasetId'],
                        $this->projectId,
                        $this->mapper,
                        $dataset
                    );
                },
                [$this->connection, 'listDatasets'],
                $options + ['projectId' => $this->projectId],
                [
                    'itemsKey' => 'datasets',
                    'resultLimit' => $resultLimit
                ]
            )
        );
    }
public function datasets(array $options = [])
    {
        $resultLimit = $this->pluck('resultLimit', $options, false);

        return new ItemIterator(
            new PageIterator(
                function (array $dataset) {
                    return new Dataset(
                        $this->connection,
                        $dataset['datasetReference']['datasetId'],
                        $this->projectId,
                        $this->mapper,
                        $dataset
                    );
                },
                [$this->connection, 'listDatasets'],
                $options + ['projectId' => $this->projectId],
                [
                    'itemsKey' => 'datasets',
                    'resultLimit' => $resultLimit
                ]
            )
        );
    }
public function datasets ( array $ options = [ ] ) { $ resultLimit = $ this -> pluck ( 'resultLimit' , $ options , false ) ; return new ItemIterator ( new PageIterator ( function ( array $ dataset ) { return new Dataset ( $ this -> connection , $ dataset [ 'datasetReference' ] [ 'datasetId' ] , $ this -> projectId , $ this -> mapper , $ dataset ) ; } , [ $ this -> connection , 'listDatasets' ] , $ options + [ 'projectId' => $ this -> projectId ] , [ 'itemsKey' => 'datasets' , 'resultLimit' => $ resultLimit ] ) ) ; }
Fetches datasets in the project.

Example:
```
$datasets = $bigQuery->datasets();

foreach ($datasets as $dataset) {
echo $dataset->id() . PHP_EOL;
}
```

@see https://cloud.google.com/bigquery/docs/reference/v2/datasets/list Datasets list API documentation.

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

@type bool $all Whether to list all datasets, including hidden ones.
**Defaults to** `false`.
@type int $maxResults Maximum number of results to return per page.
@type int $resultLimit Limit the number of results returned in total.
**Defaults to** `0` (return all results).
@type string $pageToken A previously-returned page token used to
resume the loading of results from a specific point.
}
@return ItemIterator<Dataset>
Fetches datasets in the project .