PubSub/src/Topic.php
public function subscribe($name, array $options = [])
    {
        $subscription = $this->subscriptionFactory($name);

        $subscription->create($options);

        return $subscription;
    }
public function subscribe($name, array $options = [])
    {
        $subscription = $this->subscriptionFactory($name);

        $subscription->create($options);

        return $subscription;
    }
public function subscribe ( $ name , array $ options = [ ] ) { $ subscription = $ this -> subscriptionFactory ( $ name ) ; $ subscription -> create ( $ options ) ; return $ subscription ; }
Create a subscription to the topic.

Example:
```
$subscription = $topic->subscribe('my-new-subscription');
```

@see https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.subscriptions/create Create Subscription

@param string $name The subscription name
@param array $options [optional] Please see {@see Google\Cloud\PubSub\Subscription::create()}
for configuration details.
@return Subscription
Create a subscription to the topic .