Skip to content
docsv0.19.1

PluginEvents

Every event this package dispatches, declared once and next to the code that dispatches it. The names below are the constants {@see PluginsManager} hands to `dispatch()`: the declaration and the dispatch read the SAME constant, so neither can drift from the other. The manager declares this list to whichever dispatcher it resolves, provided that dispatcher implements {@see \Milpa\Interfaces\Event\DeclaredEvents}; a dispatcher that does not is asked nothing (greenhouse decisions/0228: the emitter is the authority on what events exist). As a {@see DeclaresEvents} holder it also answers one step earlier: `composer.json` names this class under `extra.milpa.events`, so a host reading the installed manifests can declare these events on behalf of a {@see PluginsManager} the running process never constructs.

PluginEvents::declarations()

public static function declarations(): array

The declarations of the lifecycle events, in the order one boot dispatches them.