Detailed Description

PersistentObjectProxy is proxy for an PersistentObject instance.

Author
ingo herwig ingo@.nosp@m.wemo.nosp@m.ve.co.nosp@m.m

Definition at line 24 of file PersistentObjectProxy.php.

+ Inheritance diagram for PersistentObjectProxy:

Public Member Functions

 __construct (ObjectId $oid)
 
 getRealSubject ()
 
 __call ($name, array $arguments)
 
 resolve ($buildDepth=BuildDepth::SINGLE)
 
 initialize (array $data)
 
 getType ()
 
 getMapper ()
 
 getOID ()
 
 setOID (ObjectId $oid)
 
 getState ()
 
 setState ($state)
 
 delete ()
 
 __clone ()
 
 copyValues (PersistentObject $object, $copyPkValues=true)
 
 mergeValues (PersistentObject $object)
 
 clearValues ()
 
 afterCreate ()
 
 beforeInsert ()
 
 afterInsert ()
 
 afterLoad ()
 
 beforeUpdate ()
 
 afterUpdate ()
 
 beforeDelete ()
 
 afterDelete ()
 
 getValue ($name)
 
 setValue ($name, $value, $forceSet=false, $trackChange=true)
 
 hasValue ($name)
 
 removeValue ($name)
 
 validateValues ()
 
 validateValue ($name, $value)
 
 getChangedValues ()
 
 getOriginalValues ()
 
 getIndispensableObjects ()
 
 getProperty ($name)
 
 setProperty ($name, $value)
 
 getPropertyNames ()
 
 getValueProperty ($name, $property)
 
 setValueProperty ($name, $property, $value)
 
 getValuePropertyNames ($name)
 
 getValueNames ($excludeTransient=false)
 
 getDisplayValue ()
 
 dump ()
 
 __toString ()
 

Static Public Member Functions

static fromObject ($object)
 

Protected Attributes

 $oid = null
 
 $realSubject = null
 

Additional Inherited Members

- Public Attributes inherited from PersistentObject
const STATE_CLEAN = 0
 
const STATE_DIRTY = 1
 
const STATE_NEW = 2
 
const STATE_DELETED = 3
 

Constructor & Destructor Documentation

__construct ( ObjectId  $oid)

Constructor.

Parameters
$oidThe object id of the PersistentObject instance.

Definition at line 33 of file PersistentObjectProxy.php.

Member Function Documentation

static fromObject (   $object)
static

Create a PersistenceProxy instance from a PersistentObject.

This is useful if you want to prevent automatic loading of the subject if it is already loaded. Returns the argument, if already an PersistentObjectProxy instance.

Parameters
$objectThe PersistentObject or PersistentObjectProxy
Returns
PersistentObjectProxy

Definition at line 44 of file PersistentObjectProxy.php.

getRealSubject ( )

Get the PersistentObject instance.

Returns
PersistentObject

Definition at line 62 of file PersistentObjectProxy.php.

__call (   $name,
array  $arguments 
)

Delegate method call to the instance.

Definition at line 72 of file PersistentObjectProxy.php.

resolve (   $buildDepth = BuildDepth::SINGLE)

Load the PersistentObject instance.

Use this method if the subject should be loaded with a depth greater than BuildDepth::SINGLE

Parameters
$buildDepthOne of the BUILDDEPTH constants or a number describing the number of generations to build (default: BuildDepth::SINGLE)

Definition at line 85 of file PersistentObjectProxy.php.

initialize ( array  $data)
See also
PersistentObject::initialize()

Definition at line 95 of file PersistentObjectProxy.php.

getType ( )

Get the type of the PersistentObject.

Returns
String

Implements PersistentObject.

Definition at line 103 of file PersistentObjectProxy.php.

getMapper ( )
See also
PersistentObject::getMapper()

Implements PersistentObject.

Definition at line 110 of file PersistentObjectProxy.php.

getOID ( )

Get the object id of the PersistentObject.

Returns
ObjectId

Implements PersistentObject.

Definition at line 118 of file PersistentObjectProxy.php.

setOID ( ObjectId  $oid)
See also
PersistentObject::setOID()

Implements PersistentObject.

Definition at line 125 of file PersistentObjectProxy.php.

getState ( )
See also
PersistentObject::getState()

Implements PersistentObject.

Definition at line 132 of file PersistentObjectProxy.php.

setState (   $state)
See also
PersistentObject::setState()

Implements PersistentObject.

Definition at line 139 of file PersistentObjectProxy.php.

delete ( )
See also
PersistentObject::delete()

Implements PersistentObject.

Definition at line 146 of file PersistentObjectProxy.php.

__clone ( )
See also
PersistentObject::__clone()

Implements PersistentObject.

Definition at line 153 of file PersistentObjectProxy.php.

copyValues ( PersistentObject  $object,
  $copyPkValues = true 
)
See also
PersistentObject::copyValues()

Implements PersistentObject.

Definition at line 160 of file PersistentObjectProxy.php.

mergeValues ( PersistentObject  $object)
See also
PersistentObject::mergeValues()

Implements PersistentObject.

Definition at line 167 of file PersistentObjectProxy.php.

clearValues ( )
See also
PersistentObject::clearValues()

Implements PersistentObject.

Definition at line 174 of file PersistentObjectProxy.php.

afterCreate ( )
See also
PersistentObject::afterCreate()

Implements PersistentObject.

Definition at line 181 of file PersistentObjectProxy.php.

beforeInsert ( )
See also
PersistentObject::beforeInsert()

Implements PersistentObject.

Definition at line 188 of file PersistentObjectProxy.php.

afterInsert ( )
See also
PersistentObject::afterInsert()

Implements PersistentObject.

Definition at line 195 of file PersistentObjectProxy.php.

afterLoad ( )
See also
PersistentObject::afterLoad()

Implements PersistentObject.

Definition at line 202 of file PersistentObjectProxy.php.

beforeUpdate ( )
See also
PersistentObject::beforeUpdate()

Implements PersistentObject.

Definition at line 209 of file PersistentObjectProxy.php.

afterUpdate ( )
See also
PersistentObject::afterUpdate()

Implements PersistentObject.

Definition at line 216 of file PersistentObjectProxy.php.

beforeDelete ( )
See also
PersistentObject::beforeDelete()

Implements PersistentObject.

Definition at line 223 of file PersistentObjectProxy.php.

afterDelete ( )
See also
PersistentObject::afterDelete()

Implements PersistentObject.

Definition at line 230 of file PersistentObjectProxy.php.

getValue (   $name)

Get the value of a named item.

Parameters
$nameThe name of the item to query.
Returns
The value of the item / null if it doesn't exits.

Implements PersistentObject.

Definition at line 239 of file PersistentObjectProxy.php.

setValue (   $name,
  $value,
  $forceSet = false,
  $trackChange = true 
)
See also
PersistentObject::setValue()

Implements PersistentObject.

Definition at line 255 of file PersistentObjectProxy.php.

hasValue (   $name)
See also
PersistentObject::hasValue()

Implements PersistentObject.

Definition at line 262 of file PersistentObjectProxy.php.

removeValue (   $name)
See also
PersistentObject::removeValue()

Implements PersistentObject.

Definition at line 269 of file PersistentObjectProxy.php.

validateValues ( )
See also
PersistentObject::validateValues()

Implements PersistentObject.

Definition at line 276 of file PersistentObjectProxy.php.

validateValue (   $name,
  $value 
)
See also
PersistentObject::validateValue()

Implements PersistentObject.

Definition at line 283 of file PersistentObjectProxy.php.

getChangedValues ( )
getOriginalValues ( )
getIndispensableObjects ( )
getProperty (   $name)
See also
PersistentObject::getProperty()

Implements PersistentObject.

Definition at line 311 of file PersistentObjectProxy.php.

setProperty (   $name,
  $value 
)
See also
PersistentObject::setProperty()

Implements PersistentObject.

Definition at line 318 of file PersistentObjectProxy.php.

getPropertyNames ( )
getValueProperty (   $name,
  $property 
)
setValueProperty (   $name,
  $property,
  $value 
)
getValuePropertyNames (   $name)
getValueNames (   $excludeTransient = false)
See also
PersistentObject::getValueNames()

Implements PersistentObject.

Definition at line 353 of file PersistentObjectProxy.php.

getDisplayValue ( )
See also
PersistentObject::getDisplayValue()
Note
Subclasses will override this for special application requirements

Implements PersistentObject.

Definition at line 361 of file PersistentObjectProxy.php.

dump ( )
See also
PersistentObject::dump()

Implements PersistentObject.

Definition at line 368 of file PersistentObjectProxy.php.

__toString ( )

Get a string representation of the instance.

Returns
String

Definition at line 376 of file PersistentObjectProxy.php.

Member Data Documentation

$oid = null
protected

Definition at line 26 of file PersistentObjectProxy.php.

$realSubject = null
protected

Definition at line 27 of file PersistentObjectProxy.php.