Download the PHP package aatis/event-dispatcher without Composer

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

Aatis ED

Advertisement

This package is a part of Aatis and can't be used without the following packages :

Installation

Usage

Requirements

Add the EventDispatcher service to the Container:

Event

This package provides an abstract Event class that can be extended to create custom events like the following :

StoppableEvent

This package provides also an abstract StoppableEvent class that can be extended to create custom stoppable events like the following :

This class implements a custom StoppableEventInterface that extends the Psr\EventDispatcher\StoppableEventInterface.

So, with this class, you can access 2 specific methods :

Priority

The EventDispatcher service can dispatch events with a priority amount that is an integer. The higher the priority, the earlier the event will be dispatched.

If two listeners have the same priority for the same event, the order of execution is for this two listeners is random.

By default, the priority is set to 0.

EventListener

A listener is a class that can be called when an event is dispatched. It must contains a __invoke method with only one parameter that must be the event listened.

Example of a listener targeting the ExampleEvent :

You can specify the priority of a listener by attaching a EventListener attribute to the class with a priority parameter :

Finally, you must inform the container that this class is a listener by adding the event-listener tag to the service :

EventSubscriber

A subscriber is a class that contains multiple listener methods and subscibe to several events.

It must provide a getSubscribedEvents method that returns the array of the events to which the service subscribes and their associated listener method.

Example of a subscriber :

You can also specify multiple listeners for the same event by passing an array instead :

For the priority, you can also pass an array with the listener method and the priority as an integer :


All versions of event-dispatcher with dependencies

PHP Build Version
Package Version
Requires psr/event-dispatcher Version ^1.0
php Version >=8.2
aatis/dependency-injection Version ^1.5
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 aatis/event-dispatcher contains the following files

Loading the files please wait ....