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

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

        return new ItemIterator(
            new PageIterator(
                function ($subscription) {
                    return $this->subscriptionFactory($subscription);
                },
                [$this->connection, 'listSubscriptionsByTopic'],
                $options + ['topic' => $this->name],
                [
                    'itemsKey' => 'subscriptions',
                    'resultLimit' => $resultLimit
                ]
            )
        );
    }
public function subscriptions ( array $ options = [ ] ) { $ resultLimit = $ this -> pluck ( 'resultLimit' , $ options , false ) ; return new ItemIterator ( new PageIterator ( function ( $ subscription ) { return $ this -> subscriptionFactory ( $ subscription ) ; } , [ $ this -> connection , 'listSubscriptionsByTopic' ] , $ options + [ 'topic' => $ this -> name ] , [ 'itemsKey' => 'subscriptions' , 'resultLimit' => $ resultLimit ] ) ) ; }
Retrieve a list of active subscriptions to the current topic.

Example:
```
$subscriptions = $topic->subscriptions();
foreach ($subscriptions as $subscription) {
echo $subscription->name();
}
```

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

@param array $options [optional] {
Configuration Options

@type int $pageSize Maximum number of subscriptions to return.
@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>
Retrieve a list of active subscriptions to the current topic .