Dart DocumentationpuremvcIController

IController Interface

The interface definition for a PureMVC MultiCore Controller.

In PureMVC, an IController implementor follows the 'Command and Controller' strategy, and assumes these responsibilities:

See INotification, ICommand

Implemented by

Controller

Methods

Code void executeCommand(INotification note) #

Execute the ICommand previously registered as the handler for INotifications with the given notification's name.

void executeCommand( INotification note );

Code bool hasCommand(String noteName) #

Check if an ICommand is registered for a given INotification name with the IController.

  • Param noteName - the name of the INotification.
  • Returns bool - whether an ICommand is currently registered for the given noteName.
bool hasCommand( String noteName );

Code String get multitonKey() #

String get multitonKey();

Code void set multitonKey(String key) #

This IController's Multiton Key

void set multitonKey( String key );

Code void registerCommand(String notificationName, Function commandFactory) #

Register an INotification to ICommand mapping with the IController.

  • Param noteName - the name of the INotification to associate the ICommand with.
  • Param commandFactory - a function that creates a new instance of the ICommand.
void registerCommand( String notificationName, Function commandFactory );

Code void removeCommand(String noteName) #

Remove a previously registered INotification to ICommand mapping from the IController.

void removeCommand( String noteName );