PluginInterface
extends
ListenerAggregateInterface
in
Interface for self-registering event listeners.
Classes implementing this interface may be registered by name or instance with an EventManager, without an event name. The method will then be called with the current EventManager instance, allowing the class to wire up one or more listeners.
Table of Contents
- attach() : void
- Attach one or more listeners
- detach() : void
- Detach all previously attached listeners
- getOptions() : PluginOptions
- Get options
- setOptions() : PluginInterface
- Set options
Methods
attach()
Attach one or more listeners
public
attach(EventManagerInterface $events[, int $priority = 1 ]) : void
Implementors may add an optional $priority argument; the EventManager implementation will pass this to the aggregate.
Parameters
- $events : EventManagerInterface
- $priority : int = 1
Return values
void —detach()
Detach all previously attached listeners
public
detach(EventManagerInterface $events) : void
Parameters
- $events : EventManagerInterface
Return values
void —getOptions()
Get options
public
getOptions() : PluginOptions
Return values
PluginOptions —setOptions()
Set options
public
setOptions(PluginOptions $options) : PluginInterface
Parameters
- $options : PluginOptions