#import <IFacade.h>
Inherited by Facade.
Public Member Functions | |
| (BOOL) | - hasCommand: |
| (BOOL) | - hasMediator: |
| (BOOL) | - hasProxy: |
| (void) | - notifyObservers: |
| (void) | - registerCommand:commandClassRef: |
| (void) | - registerMediator: |
| (void) | - registerProxy: |
| (void) | - removeCommand: |
| (id< IMediator >) | - removeMediator: |
| (id< IProxy >) | - removeProxy: |
| (id< IMediator >) | - retrieveMediator: |
| (id< IProxy >) | - retrieveProxy: |
| (void) | - sendNotification:body:type: |
The Facade Pattern suggests providing a single class to act as a central point of communication for a subsystem.
In PureMVC, the Facade acts as an interface between the core MVC actors (Model, View, Controller) and the rest of your application.
| - (BOOL) hasCommand: | (NSString *) | notificationName |
Check if a Command is registered for a given Notification
| notificationName |
notificationName. Reimplemented in Facade.
| - (BOOL) hasMediator: | (NSString *) | mediatorName |
| - (BOOL) hasProxy: | (NSString *) | proxyName |
| - (void) notifyObservers: | (id< INotification >) | notification |
Notify the IObservers for a particular INotification.
All previously attached IObservers for this INotification's list are notified and are passed a reference to the INotification in the order in which they were registered.
NOTE: Use this method only if you are sending custom Notifications. Otherwise use the sendNotification method which does not require you to create the Notification instance.
| notification | the INotification to notify IObservers of. |
Reimplemented in Facade.
| - (void) registerCommand: | (NSString *) | notificationName | ||
| commandClassRef: | (Class) | commandClassRef | ||
Register an ICommand with the Controller.
| notificationName | the name of the INotification to associate the ICommand with. | |
| commandClassRef | a reference to the Class of the ICommand. |
Reimplemented in Facade.
| - (void) registerMediator: | (id< IMediator >) | mediator |
| - (void) registerProxy: | (id< IProxy >) | proxy |
| - (void) removeCommand: | (NSString *) | notificationName |
Remove a previously registered ICommand to INotification mapping from the Controller.
| notificationName | the name of the INotification to remove the ICommand mapping for |
Reimplemented in Facade.
| - (id<IMediator>) removeMediator: | (NSString *) | mediatorName |
| - (id<IProxy>) removeProxy: | (NSString *) | proxyName |
| - (id<IMediator>) retrieveMediator: | (NSString *) | mediatorName |
| - (id<IProxy>) retrieveProxy: | (NSString *) | proxyName |
| - (void) sendNotification: | (NSString *) | notificationName | ||
| body: | (id) | body | ||
| type: | (NSString *) | type | ||
Create and send an INotification.
| notificationName | the name of the notiification to send | |
| body | the body of the notification | |
| type | the type of the notification |
Reimplemented in Facade.
1.5.7.1