Send a INotification
.
Convenience method to prevent having to construct new notification instances in our implementation code.
The name of the notification to send.
Optional
body: anyOptional data associated with the notification.
Optional
type: stringOptional type of the notification.
INotifier
The interface definition for a PureMVCNotifier
.MacroCommand
,Command
,Mediator
andProxy
all have a need to sendNotifications
.The
INotifier
interface provides a common method calledsendNotification
that relieves implementation code of the necessity to actually constructNotifications
.The
Notifier
class, which all the above-mentioned classes extend, also provides an initialized reference to theFacade
Singleton, which is required for the convenience method for sendingNotifications
, but also eases implementation as these classes have frequentFacade
interactions and usually require access to the facade anyway.INotifier