IProxy
public protocol IProxy : INotifier
The interface definition for a PureMVC Proxy.
In PureMVC, IProxy implementors assume these responsibilities:
- Implement a common method which returns the name of the Proxy.
- Provide methods for setting and getting the data object.
Additionally, IProxys typically:
- Maintain references to one or more pieces of model data.
- Provide methods for manipulating that data.
- Generate
INotificationswhen their model data changes. - Expose their name as a
public static constcalledNAME, if they are not instantiated multiple times. - Encapsulate interaction with local or remote services used to fetch and persist model data.
-
Get the Proxy name
Declaration
Swift
var name: String { get } -
Get or set the data object
Declaration
Swift
var data: Any? { get set } -
Called by the Model when the Proxy is registered
Declaration
Swift
func onRegister() -
Called by the Model when the Proxy is removed
Declaration
Swift
func onRemove()
IProxy Protocol Reference