org.puremvc.php.core

# Class: Model Source Location: /core/Model.php
### Class Overview
A Singleton IModel implementation. #### Author(s): Implements interfaces: IModel | ### Variables $instance $proxyMap | ### Methods getInstance hasProxy initializeModel registerProxy removeProxy retrieveProxy
### Class Details [line 43] A Singleton IModel implementation. In PureMVC, the Model class provides access to model objects (Proxies) by named lookup. The Model assumes these responsibilities: Maintain a cache of IProxy instances. Provide methods for registering, retrieving, and removing IProxy instances. Your application must register IProxy instances with the Model . Typically, you use an ICommand to create and register IProxy instances once the Facade has initialized the Core actors. #### Tags:
see: | org.puremvc.php.interfaces.IProxy IProxy
see: | org.puremvc.php.patterns.proxy.Proxy Proxy
[ Top ] ### Class Variables #### static $instance = [line 49] #### Tags:
access: | protected
Type: | mixed
[ Top ] #### $proxyMap = [line 46] #### Tags:
access: | protected
Type: | mixed
[ Top ] ### Class Methods ### static method getInstance [line 88]
`static the getInstance( )`
Model Singleton Factory method. #### Tags:
return: | Singleton instance
access: | public
[ Top ] ### method hasProxy [line 140]
`void hasProxy( proxyName $proxyName)`
Check to see if a Proxy is registered with the Model. #### Tags:
access: | public
#### Parameters:
proxyName | $proxyName | name of the IProxy instance to check for.
[ Top ] ### method initializeModel [line 79]
`void initializeModel( )`
Initialize the Singleton Model instance. Called automatically by the constructor, this is your opportunity to initialize the Singleton instance in your subclass without overriding the constructor. #### Tags:
access: | protected
[ Top ] ### method registerProxy [line 99]
`void registerProxy( $proxy)`
Register an IProxy with the Model . #### Tags:
access: | public
#### Parameters:
proxy | $proxy | an IProxy to be held by the Model .
[ Top ] ### method removeProxy [line 121]
`void removeProxy( proxyName $proxyName)`
Remove an IProxy from the Model . #### Tags:
access: | public
#### Parameters:
proxyName | $proxyName | name of the IProxy instance to be removed.
[ Top ] ### method retrieveProxy [line 111]
`the retrieveProxy( proxyName $proxyName)`
Retrieve an IProxy from the Model . #### Tags:
return: | IProxy instance previously registered with the given proxyName .
access: | public
#### Parameters:
proxyName | $proxyName |
[ Top ] Documentation generated on Tue, 30 Sep 2008 08:05:45 -0700 by phpDocumentor 1.4.0