Package | org.puremvc.as3.interfaces |
Interface | public interface IController |
Implementors | Controller |
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
.See also
Method | Defined by | ||
---|---|---|---|
executeCommand(notification:INotification):void
Execute the
ICommand previously registered as the
handler for INotification s with the given notification name. | IController | ||
hasCommand(notificationName:String):Boolean
Check if a Command is registered for a given Notification
| IController | ||
registerCommand(notificationName:String, commandClassRef:Class):void
Register a particular
ICommand class as the handler
for a particular INotification . | IController | ||
removeCommand(notificationName:String):void
Remove a previously registered
ICommand to INotification mapping. | IController |
executeCommand | () | method |
public function executeCommand(notification:INotification):void
Execute the ICommand
previously registered as the
handler for INotification
s with the given notification name.
notification:INotification — the INotification to execute the associated ICommand for
|
hasCommand | () | method |
public function hasCommand(notificationName:String):Boolean
Check if a Command is registered for a given Notification
ParametersnotificationName:String |
Boolean — whether a Command is currently registered for the given notificationName .
|
registerCommand | () | method |
public function registerCommand(notificationName:String, commandClassRef:Class):void
Register a particular ICommand
class as the handler
for a particular INotification
.
notificationName:String — the name of the INotification
|
|
commandClassRef:Class — the Class of the ICommand
|
removeCommand | () | method |
public function removeCommand(notificationName:String):void
Remove a previously registered ICommand
to INotification
mapping.
notificationName:String — the name of the INotification to remove the ICommand mapping for
|