Google\Cloud\PubSub\PubSubClient::topicFactory PHP Method

topicFactory() private method

Create an instance of a topic
private topicFactory ( string $name, array $info = null ) : Topic
$name string The topic name
$info array [optional] Information about the topic. Used internally to populate topic objects with an API result. Should be a representation of a [Topic](https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.topics#Topic).
return Topic
    private function topicFactory($name, array $info = null)
    {
        return new Topic($this->connection, $this->projectId, $name, $this->encode, $info);
    }