Download the PHP package twipi-group/googlecloud-pubsub-php-adapter without Composer

On this page you can find all versions of the php package twipi-group/googlecloud-pubsub-php-adapter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package googlecloud-pubsub-php-adapter

googlecloud-pubsub-php-adapter

A Php class adapter for the Goolge Cloud PubSub package.

CI Minimum PHP Version

Installation

Samples

Publish

Consume

Functions

Uses

function createTopic(string $topicName): Topic

This function creates a topic from $topicName and returns topic object.

function getTopic(string $topicName): Topic

This function returns an existing topic object from $topicName or create a new topic if setAutoCreateTopic is true. If setAutoCreateTopic is false, an exception will be thrown.

function deleteTopic(string $topicName): Topic

This function deletes an existing topic from $topicName and returns topic object.

function updateTopic($topicName, $properties): Topic

This function updates an existing topic from $topicName and returns topic object. Note that the topic's name and kms key name are immutable properties and may not be modified. https://googleapis.github.io/google-cloud-php/#/docs/google-cloud/v0.131.0/pubsub/topic

function getTopics(): array

This function returns an array of existing topics objects.

function deleteTopics(): array

This function deletes all existing topics and returns array of topics name deleted.

function createSubscription(string $subscriptionName, string $topicName = ''): Subscription

This function creates a topic from $subscriptionName and returns subscription object. If setAutoCreateTopicFromSubscription and setAutoCreateTopic are true and $topicName is empty, so a topic will be created from $subscriptionName.

function getSubscription(string $subscriptionName, string $topicName = ''): Subscription

This function returns an existing subscription object from $subscriptionName or create a new subscription if setAutoCreateSubscription is true. If setAutoCreateSubscription is false, an exception will be thrown. If setAutoCreateTopicFromSubscription and setAutoCreateTopic are true and $topicName is empty, so a topic will be created from $subscriptionName. If setAutoCreateTopicFromSubscription or setAutoCreateTopic is false and $topicName is empty, an exception will be thrown.

function deleteSubscription($subscriptionName): Subscription

This function deletes an existing subscription from $subscriptionName and returns subscription object.

function updateSubscription($subscriptionName, $properties): Subscription

This function updates an existing subscription from $subscriptionName and returns subscription object. Note that subscription name and topic are immutable properties and may not be modified. https://googleapis.github.io/google-cloud-php/#/docs/google-cloud/v0.131.0/pubsub/subscription

function getSubscriptions(): array

This function returns an array of existing subscriptions objects.

function consume(string $subscriptionName, string $topicName = ''): array

This function always return immediately after one pull. You just can change setMaxMessages for receiving x messages from this pull. If setAutoCreateTopic and setAutoCreateTopicFromSubscription are true, and if $topicName is empty, it will auto create topic from subscription name if topic not already exists. This function returns an array of messages.

function subscribe(string $subscriptionName, callable $handler, string $topicName = '', $infiniteLoop = true): void

This function is an infinite loop by default thanks to $infiniteLoop = true.

Settings

Tests

Contribution

You can contribute to this package by discovering bugs, opening issues or purpose new features.

Licence

This project is licensed under the terms of the MIT license. See License file for more information.


All versions of googlecloud-pubsub-php-adapter with dependencies

PHP Build Version
Package Version
Requires php Version ~7.1
google/cloud-pubsub Version ^1.21
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package twipi-group/googlecloud-pubsub-php-adapter contains the following files

Loading the files please wait ....