Download the PHP package chipslays/event without Composer
On this page you can find all versions of the php package chipslays/event. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download chipslays/event
More information about chipslays/event
Files in chipslays/event
Download chipslays/event
More information about chipslays/event
Files in chipslays/event
Vendor chipslays
Package event
Short Description A simple event dispatching mechanism (like routing) for chat bots.
License MIT
Package event
Short Description A simple event dispatching mechanism (like routing) for chat bots.
License MIT
Keywords eventsevent-driver
Please rate this library. Is it a good library?
Informations about the package event
☎ Event
A simple event dispatching mechanism (like routing) for chat bots and not only.
Installation
Methods
__construct($data)
Parameter $data
must be a array
, json
, stdClass
or instance of Chipslays\Collection\Collection
.
on(string $event, callable|string|array $fn [, int $sort = 500]): Event
Paramater $fn
must be a function or class (support static and non-static methods).
Pass any args for $fn
:
Pass $event = true
for force execute event.
Parameter $sort
responsible for the execution priority.
run(): void
Dispatch and execute all caught events.
Usage
Own Event class
You can use events in your class by trait:
Redefine methods on
, run
:
All versions of event with dependencies
PHP Build Version
Package Version
The package chipslays/event contains the following files
Loading the files please wait ....