#import <IController.h>
Inherited by Controller.
Public Member Functions | |
(void) | - executeCommand: |
(BOOL) | - hasCommand: |
(void) | - registerCommand:commandClassRef: |
(void) | - removeCommand: |
In PureMVC, an IController
implementor follows the 'Command and Controller' strategy, and assumes these responsibilities:
ICommand
s are intended to handle which INotifications
. IObserver
with the View
for each INotification
that it has an ICommand
mapping for. ICommand
to handle a given INotification
when notified by the View
. ICommand
's execute
method, passing in the INotification
.
- (void) executeCommand: | (id< INotification >) | notification |
Execute the ICommand
previously registered as the handler for INotification
s with the given notification name.
notification | the INotification to execute the associated ICommand for |
Reimplemented in Controller.
- (BOOL) hasCommand: | (NSString *) | notificationName |
Check if a Command is registered for a given Notification
notificationName |
notificationName
. Reimplemented in Controller.
- (void) registerCommand: | (NSString *) | notificationName | ||
commandClassRef: | (Class) | commandClassRef | ||
Register a particular ICommand
class as the handler for a particular INotification
.
notificationName | the name of the INotification | |
commandClassRef | the Class of the ICommand |
Reimplemented in Controller.
- (void) removeCommand: | (NSString *) | notificationName |
Remove a previously registered ICommand
to INotification
mapping.
notificationName | the name of the INotification to remove the ICommand mapping for |
Reimplemented in Controller.