Download the PHP package provm/events without Composer

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

Events

WebSockets app for PHP. Using Ratchet as a base for creating the app it can be used as framework for connecting to the database from the web UI.

Introduction

I wrote this project because I had a hard time finding any alternative to handling Server-Side WebSocket with PHP. Ratchet handles the connection but not the app itself. I needed an app structure similar to Slim which was what I work with. This is the result.

Installation

Use composer.

Use

I recommend you setup your app with a Container like PHP-DI

Base example:

Breakdown:

The app is created similar to Ratchet with the wrapper ProVM\Common\Alias\Server\App but the message handler is from this package ProVM\Common\Alias\Event\Message which handles all event dispatches and listeners.

Then the event(s) are added with $app->add it requires a name for the event and a callable handler that work similar to Slim Controllers.

Finally just $app->run

You can use a Listener for the callable:

In the web UI just create a websocket:

Breakdown:

Create the websocket connection new WebSocket(websocket_url) where websocket_url can be something like ws://localhost:8010 or wss://localhost:8010 where the port is the same one set in the app.

Set the event listeners for open, message, error and close and start sending messages with send

Take note of the last lines where the message received by the app needs an action equivalent to the event names added before and the data associated if any (can be missing).


All versions of events with dependencies

PHP Build Version
Package Version
Requires cboden/ratchet Version ^0.4.3
psr/event-dispatcher Version ^1.0
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 provm/events contains the following files

Loading the files please wait ....