org.puremvc.php.core
[ class tree: org.puremvc.php.core ] [ index: org.puremvc.php.core ] [ all elements ]

Class: Model

Source Location: /core/Model.php

Class Overview


A Singleton
implementation.


Author(s):

Implements interfaces:

Variables

Methods



Class Details

[line 43]
A Singleton
implementation.

In PureMVC, the

class provides access to model objects (Proxies) by named lookup.

The

assumes these responsibilities:

  • Maintain a cache of
    instances.
  • Provide methods for registering, retrieving, and removing
    instances.
Your application must register
instances with the
. Typically, you use an
to create and register
instances once the
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( )

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
instance to check for.

[ Top ]

method initializeModel [line 79]

void initializeModel( )

Initialize the Singleton
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
with the
.



Tags:

access:  public


Parameters:

proxy   $proxy   an
to be held by the
.

[ Top ]

method removeProxy [line 121]

void removeProxy( proxyName $proxyName)

Remove an
from the
.



Tags:

access:  public


Parameters:

proxyName   $proxyName   name of the
instance to be removed.

[ Top ]

method retrieveProxy [line 111]

the retrieveProxy( proxyName $proxyName)

Retrieve an
from the
.



Tags:

return:  
instance previously registered with the given
  1. proxyName
.
access:  public


Parameters:

proxyName   $proxyName  

[ Top ]


Documentation generated on Tue, 30 Sep 2008 08:05:45 -0700 by phpDocumentor 1.4.0