Package puremvc :: Module interfaces :: Class IModel
[hide private]
[frames] | no frames]

classobj IModel

source code

Known Subclasses:

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 and Provide methods for registering, retrieving, and removing IProxy instances

Instance Methods [hide private]
 
registerProxy(self, proxy)
Register an IProxy instance with the Model.
source code
 
retrieveProxy(self, proxyName)
Retrieve an IProxy instance from the Model.
source code
 
removeProxy(self, proxyName)
Remove an IProxy instance from the Model.
source code
 
hasProxy(self, proxyName)
Check if a Proxy is registered
source code
Method Details [hide private]

registerProxy(self, proxy)

source code 

Register an IProxy instance with the Model.

Parameters:
  • proxy - an object reference to be held by the Model.

retrieveProxy(self, proxyName)

source code 

Retrieve an IProxy instance from the Model.

Parameters:
  • proxyName - name of the IProxy instance to retrieve.
Returns:
the IProxy instance previously registered with the given proxyName.

removeProxy(self, proxyName)

source code 

Remove an IProxy instance from the Model.

Parameters:
  • proxyName - name of the IProxy instance to be removed.
Returns:
the IProxy that was removed from the Model

hasProxy(self, proxyName)

source code 

Check if a Proxy is registered

Parameters:
  • proxyName - name of the IProxy instance
Returns:
whether a Proxy is currently registered with the given proxyName.