PureMVC Framework for Haxe: API Documentation
Back | Index
class org.puremvc.haxe.core.View
implements org.puremvc.haxe.interfaces.IView

A Singleton `IView` implementation.

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.

function new() : Void

  Constructor.

  This `IView` implementation is a Singleton, so you should not call the constructor directly, but instead call the static Singleton Factory method `View.getInstance()`

function hasMediator(mediatorName : String) : Bool
function notifyObservers(notification : org.puremvc.haxe.interfaces.INotification) : Void
function registerMediator(mediator : org.puremvc.haxe.interfaces.IMediator) : Void
function registerObserver(notificationName : String, observer : org.puremvc.haxe.interfaces.IObserver) : Void
function removeMediator(mediatorName : String) : org.puremvc.haxe.interfaces.IMediator
function removeObserver(notificationName : String, notifyContext : Dynamic) : Void
function retrieveMediator(mediatorName : String) : org.puremvc.haxe.interfaces.IMediator
static function getInstance() : org.puremvc.haxe.interfaces.IView

Back | Index