org.puremvc.php.interfaces

# Class: IView Source Location: /interfaces/IView.php
### Interface Overview
The interface definition for a PureMVC View. #### Author(s): | ### Methods hasMediator notifyObservers registerMediator registerObserver removeMediator retrieveMediator
### Class Details [line 35] 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: | org.puremvc.php.interfaces.INotification INotification
see: | org.puremvc.php.interfaces.IObserver IObserver
see: | org.puremvc.php.interfaces.IMediator IMediator
[ Top ] ### Class Methods ### method hasMediator [line 97]
`void hasMediator( mediatorName $mediatorName)`
Check to see if a Mediator is registered with the View. #### Tags:
access: | public
#### Parameters:
mediatorName | $mediatorName | name of the IMediator instance to check for.
[ Top ] ### method notifyObservers [line 56]
`void notifyObservers( INotification $note)`
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:
notification | $note | the INotification to notify IObservers of.
[ Top ] ### method registerMediator [line 75]
`void registerMediator( IMediator $mediator, mediator 1)`
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:
mediator | 1 | a reference to the IMediator instance
mediatorName | $mediator | the name to associate with this IMediator instance
[ Top ] ### method registerObserver [line 44]
`void registerObserver( notificationName $noteName, IObserver $observer)`
Register an IObserver to be notified of INotifications with a given name. #### Tags:
access: | public
#### Parameters:
notificationName | $noteName | the name of the INotifications to notify this IObserver of
observer | $observer | the IObserver to register
[ Top ] ### method removeMediator [line 90]
`void removeMediator( mediatorName $mediatorName)`
Remove an IMediator from the View . #### Tags:
access: | public
#### Parameters:
mediatorName | $mediatorName | name of the IMediator instance to be removed.
[ Top ] ### method retrieveMediator [line 83]
`the retrieveMediator( mediatorName $mediatorName)`
Retrieve an IMediator from the View . #### Tags:
return: | IMediator instance previously registered with the given mediatorName .
access: | public
#### Parameters:
mediatorName | $mediatorName | the name of the IMediator instance to retrieve.
[ Top ] Documentation generated on Tue, 30 Sep 2008 08:05:45 -0700 by phpDocumentor 1.4.0