Example: use Google\Cloud\ServiceBuilder; $client = new ServiceBuilder(); $pubsub = $client->pubsub(); $topic = $pubsub->topic('my-new-topic'); You can also pass a fully-qualified topic name: $topic = $pubsub->topic('projects/my-awesome-project/topics/my-new-topic');
Inheritance: use trait ResourceNameTrait
Beispiel #1
0
 public function testIam()
 {
     $topic = new Topic($this->connection->reveal(), 'topic-name', 'project-name');
     $this->assertInstanceOf(Iam::class, $topic->iam());
 }