src/GoogleCloudPubSubAdapter.php
protected function getTopicForChannel($channel)
    {
        $topic = $this->client->topic($channel);
        if ($this->autoCreateTopics && !$topic->exists()) {
            $topic->create();
        }
        return $topic;
    }
protected function getTopicForChannel($channel)
    {
        $topic = $this->client->topic($channel);
        if ($this->autoCreateTopics && !$topic->exists()) {
            $topic->create();
        }
        return $topic;
    }
protected function getTopicForChannel ( $ channel ) { $ topic = $ this -> client -> topic ( $ channel ) ; if ( $ this -> autoCreateTopics && ! $ topic -> exists ( ) ) { $ topic -> create ( ) ; } return $ topic ; }
Return a `Topic` instance from a channel name.

If the topic doesn't exist, the topic is first created.

@param string $channel

@return \Google\Cloud\PubSub\Topic
Return a Topic instance from a channel name .