Path

ez components / documentation / api reference / 2007.1 / persistentobject


eZ Components 2007.1

PersistentObject: ezcPersistentObject

[ Tutorial ] [ Class tree ] [ Element index ] [ ChangeLog ] [ Credits ]

Interface: ezcPersistentObject

ezcPersistentObject is an (optional) interface for classes that provide persistent objects. [source]
The PersistentObject component does not require a class to inherit from a certain base class or implement a certain interface to be used with the component. However, this interface can (optionally) be implemented by your persistent classes, to ensure they provide all necessary methods.

Method Summary

public array(string=>mixed) getState( )
Returns the current state of an object.
public void setState( $state )
Sets the state of the object.

Methods

getState

array(string=>mixed) getState( )
Returns the current state of an object.
This method returns an array representing the current state of the object. The array must contain a key for every attribute of the object, assigned to the value of the attribute.

setState

void setState( $state )
Sets the state of the object.
This method sets the state of the object accoring to a given array, which must conform to the standards defined at getState().

Parameters

Name Type Description
$state array The new state for the object.

Last updated: Thu, 01 Nov 2007