Spanner/src/SpannerClient.php
public function instances(array $options = [])
    {
        $options += [
            'filter' => null
        ];

        $resultLimit = $this->pluck('resultLimit', $options, false);
        return new ItemIterator(
            new PageIterator(
                function (array $instance) {
                    $name = InstanceAdminClient::parseName($instance['name'])['instance'];
                    return $this->instance($name, $instance);
                },
                [$this->connection, 'listInstances'],
                ['projectId' => InstanceAdminClient::projectName($this->projectId)] + $options,
                [
                    'itemsKey' => 'instances',
                    'resultLimit' => $resultLimit
                ]
            )
        );
    }
public function instances(array $options = [])
    {
        $options += [
            'filter' => null
        ];

        $resultLimit = $this->pluck('resultLimit', $options, false);
        return new ItemIterator(
            new PageIterator(
                function (array $instance) {
                    $name = InstanceAdminClient::parseName($instance['name'])['instance'];
                    return $this->instance($name, $instance);
                },
                [$this->connection, 'listInstances'],
                ['projectId' => InstanceAdminClient::projectName($this->projectId)] + $options,
                [
                    'itemsKey' => 'instances',
                    'resultLimit' => $resultLimit
                ]
            )
        );
    }
public function instances ( array $ options = [ ] ) { $ options += [ 'filter' => null ] ; $ resultLimit = $ this -> pluck ( 'resultLimit' , $ options , false ) ; return new ItemIterator ( new PageIterator ( function ( array $ instance ) { $ name = InstanceAdminClient :: parseName ( $ instance [ 'name' ] ) [ 'instance' ] ; return $ this -> instance ( $ name , $ instance ) ; } , [ $ this -> connection , 'listInstances' ] , [ 'projectId' => InstanceAdminClient :: projectName ( $ this -> projectId ) ] + $ options , [ 'itemsKey' => 'instances' , 'resultLimit' => $ resultLimit ] ) ) ; }
List instances in the project

Example:
```
$instances = $spanner->instances();
```

@codingStandardsIgnoreStart
@see https://cloud.google.com/spanner/docs/reference/rpc/google.spanner.admin.instance.v1#listinstancesrequest ListInstancesRequest
@codingStandardsIgnoreEnd

@param array $options [optional] {
Configuration options

@type string $filter An expression for filtering the results of the
request.
@type int $pageSize Maximum number of results to return per
request.
@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<Instance>
List instances in the project