PureMVC AS3 Framework - [Standard Version] | All Packages | All Classes | Index | Frames No Frames |
Interface IModel

Package | org.puremvc.as3.interfaces
Interface | public interface IModel
Implementors | Model

The interface definition for a PureMVC Model.

In PureMVC, `IModel` implementors provide access to `IProxy` objects by named lookup.

An `IModel` assumes these responsibilities:

- Maintain a cache of `IProxy` instances
- Provide methods for registering, retrieving, and removing `IProxy` instances

Public Methods

| Method | Defined by
--- | --- | ---
|  | hasProxy(proxyName:String):Boolean Check if a Proxy is registered | IModel
|  | registerProxy(proxy:IProxy):void Register an `IProxy` instance with the `Model`. | IModel
|  | removeProxy(proxyName:String):IProxy Remove an `IProxy` instance from the Model. | IModel
|  | retrieveProxy(proxyName:String):IProxy Retrieve an `IProxy` instance from the Model. | IModel

Method detail

hasProxy | () | method

`public function hasProxy(proxyName:String):Boolean`

Check if a Proxy is registered

Parameters

| `proxyName:String`

Returns

| `Boolean` — whether a Proxy is currently registered with the given `proxyName`.

registerProxy | () | method |

`public function registerProxy(proxy:IProxy):void`

Register an `IProxy` instance with the `Model`.

Parameters

| `proxy:IProxy` — the name to associate with this `IProxy` instance.

removeProxy | () | method |

`public function removeProxy(proxyName:String):IProxy`

Remove an `IProxy` instance from the Model.

Parameters

| `proxyName:String` — name of the `IProxy` instance to be removed.

Returns

| `IProxy` — the `IProxy` that was removed from the `Model`

retrieveProxy | () | method |

`public function retrieveProxy(proxyName:String):IProxy`

Retrieve an `IProxy` instance from the Model.

Parameters

| `proxyName:String`

Returns

| `IProxy` — the `IProxy` instance previously registered with the given `proxyName`.