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

Class: IController

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

Interface Overview


The interface definition for a PureMVC Controller.


Author(s):

Methods



Class Details

[line 48]
The interface definition for a PureMVC Controller.

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

  • Remembering which ICommands are intended to handle which INotifications.
  • Registering itself as an IObserver with the IView for each INotification that it has an ICommand mapping for.
  • Creating a new instance of the proper ICommand to handle a given INotification when notified by the IView.
  • Calling the ICommand's execute method, passing in the INotification.




Tags:

see:  ICommand
see:  INotification


[ Top ]


Class Methods


method executeCommand [line 71]

void executeCommand( INotification $notification)

Execute Command

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




Tags:

access:  public


Parameters:

INotification   $notification   The INotification to execute the associated ICommand for.

[ Top ]

method hasCommand [line 91]

bool hasCommand( string $notificationName)

Has Command

Check if a Command is registered for a given INotification




Tags:

return:  Boolean: Whether a Command is currently registered for the given notificationName.
access:  public


Parameters:

string   $notificationName   Name of the INotification to check for.

[ Top ]

method registerCommand [line 60]

void registerCommand( string $notificationName, string $commandClassRef)

Register Command

Register a particular ICommand class as the handler for a particular INotification.




Tags:

access:  public


Parameters:

string   $notificationName   Name of the INotification.
string   $commandClassRef   Class name of the ICommand implementation to register.

[ Top ]

method removeCommand [line 81]

void removeCommand( string $notificationName)

Remove Command

Remove a previously registered ICommand to INotification mapping.




Tags:

access:  public


Parameters:

string   $notificationName   Name of the INotification to remove the ICommand mapping for.

[ Top ]


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