MAKS\AmqpAgent\Helper\EventTrait
A trait containing events handling functions (adds events triggering and binding capabilities) to a class.
Synopsis
trait EventTrait
{
- // members
- protected static array $events = ;
- // methods
- protected static void trigger()
- protected static void bind()
- public static array getEvents()
Hierarchy
Used by
Coverage
Methods | 0% | 0 / 3 |
Lines | 0% | / |
Members
protected
- $events
—
array
Here lives all bindings.
Methods
protected
- bind() — Binds the passed function to the passed event.
- trigger() — Executes callbacks attached to the passed event with the passed arguments.
public
- getEvents() — Returns array of all registered events as an array `['event.name' => [$cb1, $cb2, ...]]`.
History
-
2021-01-12T21:10:21+00:00 (commit #d09424b)
Author: Marwan Al-Soltany (MarwanAlsoltany@gmail.com) / Commiter: Marwan Al-Soltany (MarwanAlsoltany@gmail.com)
Add strict types declaration * Add declare(strict_types=1) to all files * Fix file header DocBlock spacing of all files
-
2020-12-02T22:34:30+00:00 (commit #fa8b8fd)
Author: Marwan Al-Soltany (MarwanAlsoltany@gmail.com) / Commiter: Marwan Al-Soltany (MarwanAlsoltany@gmail.com)
Add event class * Add Event.php * Add EventTrait.php