Google\Cloud\ServiceBuilder::pubsub PHP Method

pubsub() public method

Example: $pubsub = $cloud->pubsub();
public pubsub ( array $config = [] ) : PubSubClient
$config array [optional] { Configuration options. See {@see \Google\Cloud\ServiceBuilder::__construct()} for the other available options. @type string $transport The transport type used for requests. May be either `grpc` or `rest`. **Defaults to** `grpc` if gRPC support is detected on the system.
return Google\Cloud\PubSub\PubSubClient
    public function pubsub(array $config = [])
    {
        return new PubSubClient($config ? $this->resolveConfig($config) : $this->config);
    }