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

Class: IView

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

Interface Overview


The interface definition for a PureMVC View.


Author(s):

Methods



Class Details

[line 50]
The interface definition for a PureMVC View.

In PureMVC, IView implementors assume these responsibilities:

In PureMVC, the View class assumes these responsibilities:

  • Maintain a cache of IMediator instances.
  • Provide methods for registering, retrieving, and removing IMediators.
  • Managing the observer lists for each INotification in the application.
  • Providing a method for attaching IObservers to an INotification's observer list.
  • Providing a method for broadcasting an INotification.
  • Notifying the IObservers of a given INotification when it broadcast.




Tags:

see:  INotification
see:  IObserver
see:  IMediator


[ Top ]


Class Methods


method hasMediator [line 138]

bool hasMediator( string $mediatorName)

Has Mediator

Check if a IMediator is registered or not.




Tags:

return:  Boolean: Whether a IMediator is registered with the given mediatorName.
access:  public


Parameters:

string   $mediatorName   The name of the IMediator to check for.

[ Top ]

method notifyObservers [line 88]

void notifyObservers( INotification $notification, INotification $note)

Notify Observers

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.




Tags:

access:  public


Parameters:

INotification   $note   The INotification to notify IObservers of.
INotification   $notification  

[ Top ]

method registerMediator [line 108]

void registerMediator( IMediator $mediator)

Register Mediator

Register an IMediator instance with the View.

Registers the IMediator so that it can be retrieved by name, and further interrogates the IMediator for its INotification interests.

If the IMediator returns any INotification names to be notified about, an Observer is created encapsulating the IMediator instance's handleNotification method and registering it as an Observer for all INotifications the IMediator is interested in.




Tags:

access:  public


Parameters:

IMediator   $mediator   Reference to the IMediator instance.

[ Top ]

method registerObserver [line 63]

void registerObserver( string $notificationName, IObserver $observer)

Register Observer

Register an IObserver to be notified of INotifications with a given name.




Tags:

access:  public


Parameters:

string   $notificationName   The name of the INotifications to notify this IObserver of.
IObserver   $observer   The IObserver to register.

[ Top ]

method removeMediator [line 128]

IMediator removeMediator( string $mediatorName)

Remove Mediator

Remove a previously registered IMediator instance from the View.




Tags:

return:  The IMediator instance previously registered with the given mediatorName.
access:  public


Parameters:

string   $mediatorName   Name of the IMediator instance to be removed.

[ Top ]

method removeObserver [line 74]

void removeObserver( string $notificationName, mixed $notifyContext)

Remove Observer

Remove a group of observers from the observer list for a given Notification name.




Tags:

access:  public


Parameters:

string   $notificationName   Which observer list to remove from.
mixed   $notifyContext   Remove the observers with this object as their notifyContext

[ Top ]

method retrieveMediator [line 118]

IMediator retrieveMediator( string $mediatorName)

Retreive Mediator

Retrieve a previously registered IMediator instance from the View.




Tags:

return:  The IMediator previously registered with the given mediatorName.
access:  public


Parameters:

string   $mediatorName   Name of the IMediator instance to retrieve.

[ Top ]


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