Class Persistent

(line 844)

Description

Object
   |
   --Persistent

Located in File: /classes.inc.php

A base class for persistent objects which are the ones which provide the required features to be serialized/unserialized easily.

If you want to create a component that has persistance capabilities, you can inherit from this class to get all the mecanisms you need. The internal session handling uses properties and methods found on this class to serialize/unserialize components to the session and recover application state.



Classes extended from Persistent:
Component
Component is the common ancestor of all component classes.
ListColumn
ListColumn represents a column of a ListView.
ListItem
ListItem is an individual item of a ListView control.
TreeNode
TreeNode describes an individual node in a tree view control.
SubLabel
This is a helper class for the Label used in the LabeledEdit control
Layout
Layout encapsulation to allow any component to hold controls and render them in very different ways
Font
Font encapsulates all properties required to represent a font on the browser.
Pen
Pen is used to draw lines or outline shapes on a canvas.
Brush
Brush represents the color and pattern used to fill solid shapes.
Canvas
Canvas provides an abstract drawing space for objects that must render their own images.
ZCacheOptions
A base class for persistent objects which are the ones which provide the required features to be serialized/unserialized easily.

Properties

Summary:
NamePath Used to serialize/unserialize. It returns the full path to identify this component.
Owner Owner of the component.

property NamePath (line 853)

string NamePath

Used to serialize/unserialize. It returns the full path to identify this component.

Info


property Owner (line 876)

Component Owner

Owner of the component.

In Persistent, it always returns null. In Component, it returns the owner of the component if assigned.


Methods

Summary:
allowserialize This method provides an opportunity for the component developer to prevent the serialization/unserialization of a property.
assign Assigns the source properties to this object.
assignError Raises an assignation error.
assignTo Assigns this object to another object.
inSession This method determines if this object exists in the current session.
serialize Stores this object into the session.
unserialize This method uses PHP reflection to iterate through published properties (the ones starting with get) and retrieve the properties stored by a previous serialize() call.

Defined in class Object

__construct Constructs an object and initializes its data before the object is first used.
className Returns a string indicating the type of the object instance (as opposed to the type of the variable passed as an argument).
classParent Returns the type of the immediate ancestor of a class.

Method allowserialize (line 1037)

boolean allowserialize( string $propname)

This method provides an opportunity for the component developer to prevent the serialization/unserialization of a property.

Override the filter $propname, and return false if you do not want to allow a property to be serialized.

Parameters

  • string $propname: Name of the property

Info


Method assign (line 891)

void assign( Persistent $source)

Assigns the source properties to this object.

This method calls the assignTo method of the source component. If $source is null, an assign error is raised.

Parameters

  • Persistent $source: Object to get assigned to this object

Info


Method assignError (line 922)

void assignError( Persistent $source)

Raises an assignation error.

$source can be null, but if not, the class name will be used to show the error and give the user more info.

Parameters

Info


Method assignTo (line 907)

void assignTo( Persistent $dest)

Assigns this object to another object.

Override this method to implement the code required to copy one object instance into this one.

Parameters

  • Persistent $dest: Object to assign this object to

Info


Method inSession (line 1049)

boolean inSession( $name)

This method determines if this object exists in the current session.

Parameters

  • $name:

Info


Method serialize (line 949)

void serialize( )

Stores this object into the session.

It uses PHP reflection to get the published properties that will be stored. Component persistance is achieved by iterating through all published properties (the ones starting with get) and storing that value into the session.

Those values are retrieved at the right time to recover the component state.

To be serialized, components need an owner to be unique on the session array. If an owner is not assigned, an exception will be raised.

Info


Method unserialize (line 1067)

void unserialize( )

This method uses PHP reflection to iterate through published properties (the ones starting with get) and retrieve the properties stored by a previous serialize() call.

To be unserialized, components need the owner to be unique on the session array. If the owner is notassigned, an exception will be raised.

Info


Events

Summary:

[none]

Javascript Events

Summary:

[none]

Documentation generated on Fri, 26 Dec 2008 11:43:45 +0100 by phpDocumentor 1.4.0a2