Download the PHP package wunderwerkio/emitter-sdk without Composer

On this page you can find all versions of the php package wunderwerkio/emitter-sdk. 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 emitter-sdk

This repository provides a PHP SDK for Emitter.

Installation

Using composer:

Emitter API

This PHP SDK implements the following methods as described in the emitter docs:

Examples

Connect to emitter server

Publish

Subscribe

Please note that this method simply subscribes for a channel.
To receive messages, the addMessageHandler method must be used!

Listen for messages

In order to receive incoming messages from the server, a callback handler must be registered with addMessageHandler.

Additionally, a event loop must be started by calling loop() to start listening for server connections.
This loop method is blocking, but can be released by calling the interrupt() method.

To avoid a deadlock, make sure you structure your code so that the interrupt() method is called once the desired messages are received.

Loop handler

The internal event loop supports calling custom handlers on each loop cycle. This can be used to implement timeouts for example to interrupt the event loop if no messages are received in 10 seconds.

Generate a channel key

To publish and subscribe to channels, emitter needs a channel key. A channel key can be generated with the keygen() method by passing the master key, the channel name, the desired permissions and optionally a TTL in seconds for the channel key.

Device presence

Emitter has built-in support for device presence.
To receive presence data from other users, the presence() method can be used to subscribe to presence events.

If the changes argument is FALSE changes in presence of other users will not be automatically received and have to be requested via presence() again.
Please note, that emitter only sends presence info for a maximum of 1000 users.


All versions of emitter-sdk with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4|^8.0
php-mqtt/client Version ^1.2
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 wunderwerkio/emitter-sdk contains the following files

Loading the files please wait ....