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

        return new ItemIterator(
            new PageIterator(
                function (array $job) {
                    return new Job(
                        $this->connection,
                        $job['jobReference']['jobId'],
                        $this->projectId,
                        $this->mapper,
                        $job
                    );
                },
                [$this->connection, 'listJobs'],
                $options + ['projectId' => $this->projectId],
                [
                    'itemsKey' => 'jobs',
                    'resultLimit' => $resultLimit
                ]
            )
        );
    }
public function jobs(array $options = [])
    {
        $resultLimit = $this->pluck('resultLimit', $options, false);

        return new ItemIterator(
            new PageIterator(
                function (array $job) {
                    return new Job(
                        $this->connection,
                        $job['jobReference']['jobId'],
                        $this->projectId,
                        $this->mapper,
                        $job
                    );
                },
                [$this->connection, 'listJobs'],
                $options + ['projectId' => $this->projectId],
                [
                    'itemsKey' => 'jobs',
                    'resultLimit' => $resultLimit
                ]
            )
        );
    }
public function jobs ( array $ options = [ ] ) { $ resultLimit = $ this -> pluck ( 'resultLimit' , $ options , false ) ; return new ItemIterator ( new PageIterator ( function ( array $ job ) { return new Job ( $ this -> connection , $ job [ 'jobReference' ] [ 'jobId' ] , $ this -> projectId , $ this -> mapper , $ job ) ; } , [ $ this -> connection , 'listJobs' ] , $ options + [ 'projectId' => $ this -> projectId ] , [ 'itemsKey' => 'jobs' , 'resultLimit' => $ resultLimit ] ) ) ; }
Fetches jobs in the project.

Example:
```
// Get all jobs with the state of 'done'
$jobs = $bigQuery->jobs([
'stateFilter' => 'done'
]);

foreach ($jobs as $job) {
echo $job->id() . PHP_EOL;
}
```

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

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

@type bool $allUsers Whether to display jobs owned by all users in
the project. **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.
@type string $stateFilter Filter for job state. Maybe be either
`done`, `pending`, or `running`.
@type int $maxCreationTime Milliseconds since the POSIX epoch. If set, only jobs created
before or at this timestamp are returned.
@type int $minCreationTime Milliseconds since the POSIX epoch. If set, only jobs created
after or at this timestamp are returned.
}
@return ItemIterator<Job>
Fetches jobs in the project .