Download the PHP package phalcon/incubator-events without Composer

On this page you can find all versions of the php package phalcon/incubator-events. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

Please rate this library. Is it a good library?

All versions of incubator-events with dependencies

Informations about the package incubator-events

Phalcon\Incubator\Events

Usage examples of the features is here:

Manager

Classic event handling

Classic event handling requires one class with a bunch of methods named equal to event name.

And multiple $eventsManager->attach() calls if you use more than one handler for single event:

Featured event handling

This manager version provides a feature of single responsible event handlers via configs, using __invoke.

Create your handler class:

Define configuration in config file:

Define Phalcon\Incubator\Events\Manager in container as eventsManager service using config of handlers:

There are multiple ways to define configs of handlers:

Flat classname usage, if your handler is invokable:

Same, but more informative and with optional priority:

Using callable constructions:

Grouping more than one handler for one event:


Version
Requires php Version >=7.2
ext-phalcon Version ^4.0

The package phalcon/incubator-events contains the following files

Loading the files please wait ....