org-puremvc-php-multicore
[ class tree: org-puremvc-php-multicore ] [ index: org-puremvc-php-multicore ] [ all elements ]

Class: INotifier

Source Location: /org/puremvc/php/multicore/interfaces/INotifier.php

Interface Overview


The interface definition for a PureMVC Notifier.


Author(s):

Methods


Child classes:

ICommand
The interface definition for a PureMVC Command.
IFacade
The interface definition for a PureMVC Facade.
IMediator
The interface definition for a PureMVC Mediator.
IProxy
The interface definition for a PureMVC Proxy.

Class Details

[line 46]
The interface definition for a PureMVC Notifier.

MacroCommand, SimpleCommand, Mediator and Proxy all have a need to send Notifications.

The INotifier interface provides a common method called sendNotification that relieves implementation code of the necessity to actually construct Notifications.

The Notifier class, which all of the above mentioned classes extend, also provides an initialized reference to the Facade Singleton, which is required for the convienience method for sending Notifications, but also eases implementation as these classes have frequent Facade interactions and usually require access to the facade anyway.




Tags:

see:  INotification
see:  IFacade


[ Top ]


Class Methods


method initializeNotifier [line 71]

void initializeNotifier( string $key)

Initialize this INotifier instance.

This is how a Notifier gets its multitonKey. Calls to sendNotification or to access the facade will fail until after this method has been called.




Tags:

access:  public


Parameters:

string   $key   The multitonKey for this INotifier to use.

[ Top ]

method sendNotification [line 59]

void sendNotification( string $notificationName, [mixed $body = null], [string $type = null])

Send a INotification.

Convenience method to prevent having to construct new notification instances in our implementation code.




Tags:

access:  public


Parameters:

string   $notificationName   The name of the notification to send.
mixed   $body   The body of the notification (optional).
string   $type   The type of the notification (optional).

[ Top ]


Documentation generated on Mon, 03 Aug 2009 04:57:56 +0000 by phpDocumentor 1.4.2