Download the PHP package aesonus/events without Composer

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

Build Status

Events

A simple Event, Listener,and Dispatcher

Tests

phpunit

How to use

Create a dispatcher

Extend the base event class for each of your events:

Implement listener interface for each of your events and listeners

Implement the handle method in listener to do a specific task:

Attach listeners to event(s) in a queue:

You can assign priorities to listeners as well. The default priority is 0.

You can attach multiple listeners using an array.

Each listener attached will be assigned the given priority:

Note that if the listeners all have the same priority, the queue will start at the first element of the first attached listener(s). Consider the following code:

When this event is dispatched, the first listener to receive the event will be MyListenerA.

You can also override the default priority by passing the listener in a numbered array with the element at index 0 is the listener and the element at index 1 is the priority:

Please note that all priorities must be integers. Priorities provided through the array interface that are not integers will be set to the default priority.

Register events with dispatcher

Dispatch events with class name. This will call the handle method on each listener in the priority queue.

You can also dispatch an event without the help of a dispatcher:

The dispatch queue can be interrupted by an exception and resume where it left off.

The dispatch queue may also be reset to the state it was in just before dispatch() is called:

It is important to note that resuming execution of the event queue will change the cached copy of the queue. Use resumability with care.


All versions of events with dependencies

PHP Build Version
Package Version
Requires aesonus/paladin Version ^2
php Version >=7.1
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 aesonus/events contains the following files

Loading the files please wait ....