Ubiquity 2.5.2
php rapid development framework
Loading...
Searching...
No Matches
EventsManager Class Reference

Manage events. More...

Static Public Member Functions

static addOneListener (string $eventName, $action)
 
static start ()
 Starts the event manager (in app/config/services.php)
 
static addListener ($eventNames, $action)
 Adds a listener on eventName.
 
static addListeners (array $listeners)
 Adds a list of listeners.
 
static store ()
 Store the managed events in cache (do not use in prod)
 
static trigger (string $eventName, &... $params)
 Trigger an event.
 

Static Protected Attributes

static $managedEvents = []
 

Static Private Member Functions

static triggerOne ($action, &$params)
 

Static Private Attributes

static string $key = 'events/events'
 

Detailed Description

Manage events.

Ubiquity\contents\transformation\events$EventsManager This class is part of Ubiquity

Author
jcheron myadd.nosp@m.ress.nosp@m.mail@.nosp@m.gmai.nosp@m.l.com
Version
1.0.2

Definition at line 16 of file EventsManager.php.

Member Function Documentation

◆ addListener()

static addListener (   $eventNames,
  $action 
)
static

Adds a listener on eventName.

Parameters
string | array$eventNames
EventListenerInterface | callable$action

Definition at line 46 of file EventsManager.php.

◆ addListeners()

static addListeners ( array  $listeners)
static

Adds a list of listeners.

Parameters
array$listeners

Definition at line 60 of file EventsManager.php.

◆ addOneListener()

static addOneListener ( string  $eventName,
  $action 
)
static

Definition at line 26 of file EventsManager.php.

◆ start()

static start ( )
static

Starts the event manager (in app/config/services.php)

Definition at line 34 of file EventsManager.php.

◆ store()

static store ( )
static

Store the managed events in cache (do not use in prod)

Definition at line 69 of file EventsManager.php.

◆ trigger()

static trigger ( string  $eventName,
&...  $params 
)
static

Trigger an event.

Parameters
string$eventName
mixed...$params

Definition at line 78 of file EventsManager.php.

◆ triggerOne()

static triggerOne (   $action,
$params 
)
staticprivate

Definition at line 86 of file EventsManager.php.

Field Documentation

◆ $key

string $key = 'events/events'
staticprivate

Definition at line 18 of file EventsManager.php.

◆ $managedEvents

$managedEvents = []
staticprotected

Definition at line 24 of file EventsManager.php.


The documentation for this class was generated from the following file: