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

        return new ItemIterator(
            new PageIterator(
                function (array $subscription) {
                    return $this->subscriptionFactory(
                        $subscription['name'],
                        $subscription['topic'],
                        $subscription
                    );
                },
                [$this->connection, 'listSubscriptions'],
                $options + ['project' => $this->formatName('project', $this->projectId)],
                [
                    'itemsKey' => 'subscriptions',
                    'resultLimit' => $resultLimit
                ]
            )
        );
    }
public function subscriptions(array $options = [])
    {
        $resultLimit = $this->pluck('resultLimit', $options, false);

        return new ItemIterator(
            new PageIterator(
                function (array $subscription) {
                    return $this->subscriptionFactory(
                        $subscription['name'],
                        $subscription['topic'],
                        $subscription
                    );
                },
                [$this->connection, 'listSubscriptions'],
                $options + ['project' => $this->formatName('project', $this->projectId)],
                [
                    'itemsKey' => 'subscriptions',
                    'resultLimit' => $resultLimit
                ]
            )
        );
    }
public function subscriptions ( array $ options = [ ] ) { $ resultLimit = $ this -> pluck ( 'resultLimit' , $ options , false ) ; return new ItemIterator ( new PageIterator ( function ( array $ subscription ) { return $ this -> subscriptionFactory ( $ subscription [ 'name' ] , $ subscription [ 'topic' ] , $ subscription ) ; } , [ $ this -> connection , 'listSubscriptions' ] , $ options + [ 'project' => $ this -> formatName ( 'project' , $ this -> projectId ) ] , [ 'itemsKey' => 'subscriptions' , 'resultLimit' => $ resultLimit ] ) ) ; }
Get a list of the subscriptions registered to all of your project's
topics.

Example:
```
$subscriptions = $pubsub->subscriptions();
foreach ($subscriptions as $subscription) {
$info = $subscription->info();
echo $info['name']; // `projects/my-awesome-project/subscriptions/<subscription-name>`
}
```

@see https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.subscriptions/list List Subscriptions

@param array $options [optional] {
Configuration Options

@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<Subscription>
Get a list of the subscriptions registered to all of your project s topics .