org-puremvc-php-multicore
[ class tree: org-puremvc-php-multicore ] [ index: org-puremvc-php-multicore ] [ all elements ]

Class: Proxy

Source Location: /org/puremvc/php/multicore/patterns/proxy/Proxy.php

Class Overview

Notifier
   |
   --Proxy

A base IProxy implementation.


Author(s):

Implements interfaces:

Variables

Constants

Methods


Inherited Constants

Inherited Variables

Inherited Methods

Class: Notifier

Notifier::__construct()
Notifier::facade()
Return the Multiton Facade instance
Notifier::initializeNotifier()
Initialize this INotifier instance.
Notifier::sendNotification()
Send a INotification.

Class Details

[line 49]
A base IProxy implementation.

In PureMVC, Proxy classes are used to manage parts of the application's data model.

A Proxy might simply manage a reference to a local data object, in which case interacting with it might involve setting and getting of its data in synchronous fashion.

Proxy classes are also used to encapsulate the application's interaction with remote services to save or retrieve data, in which case, we adopt an asyncronous idiom; setting data (or calling a method) on the Proxy and listening for a Notification to be sent when the Proxy has retrieved the data from the service.




Tags:

see:  Model
see:  Notifier


[ Top ]


Class Variables

$data =

[line 68]

The data object managed by the proxy



Tags:

access:  protected

Type:   mixed


[ Top ]

$proxyName =

[line 62]

The name of the proxy



Tags:

access:  protected

Type:   string


[ Top ]



Class Methods


constructor __construct [line 76]

Proxy __construct( [string $proxyName = null], [mixed $data = null])

Constructor



Tags:

access:  public


Overrides Notifier::__construct() (parent method not documented)

Parameters:

string   $proxyName   [OPTIONAL] Name for the proxy instance will default to Proxy::NAME if not set.
mixed   $data   [OPTIONAL] Data object to be managed by the proxy may be set later with setData().

[ Top ]

method getData [line 115]

mixed getData( )

Data getter

Get the data object




Tags:

return:  The data Object. null if not set.
access:  public



Implementation of:
IProxy::getData()
Data getter
[ Top ]

method getProxyName [line 87]

string getProxyName( )

Get the Proxy name



Tags:

return:  The Proxy instance name
access:  public



Implementation of:
IProxy::getProxyName()
Get the Proxy name
[ Top ]

method onRegister [line 127]

void onRegister( )

onRegister event

Called by the Model when the Proxy is registered




Tags:

access:  public



Implementation of:
IProxy::onRegister()
onRegister event
[ Top ]

method onRemove [line 137]

void onRemove( )

onRemove event Called by the Model when the Proxy is removed



Tags:

access:  public



Implementation of:
IProxy::onRemove()
onRemove event Called by the Model when the Proxy is removed
[ Top ]

method setData [line 100]

void setData( mixed $data)

Data setter

Set the data object




Tags:

access:  public



Implementation of:
IProxy::setData()
Data setter

Parameters:

mixed   $data   the data object

[ Top ]


Class Constants

NAME =  'Proxy'

[line 56]

Define the default name of the proxy


[ Top ]



Documentation generated on Mon, 03 Aug 2009 04:58:02 +0000 by phpDocumentor 1.4.2