Path

ez components / documentation / api reference / 2007.2 / persistentobject


PersistentObject: ezcPersistentObjectProperty

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

Class: ezcPersistentObjectProperty

Defines a persistent object field. [source]

Constants

PHP_TYPE_ARRAY = 4
PHP_TYPE_FLOAT = 3
PHP_TYPE_INT = 2
PHP_TYPE_OBJECT = 5
PHP_TYPE_STRING = 1
VISIBILITY_PRIVATE = 1
VISIBILITY_PROPERTY = 4
VISIBILITY_PROTECTED = 2
VISIBILITY_PUBLIC = 3

Properties

string read/write  $columnName
The name of the database field that stores the value.
string read/write  $propertyName
The name of the PersistentObject property that holds the value in the PHP object.
int read/write  $propertyType
The type of the PHP property. See class constants PHP_TYPE_*.

Method Summary

public ezcPersistentObjectProperty __construct( [$columnName = null], [$propertyName = null], [$type = self::PHP_TYPE_STRING] )
Constructs a new PersistentObjectField
public static ezcPersistentObjectProperty __set_state( $array )
Returns a new instance of this class with the data specified by $array.

Methods

__construct

ezcPersistentObjectProperty __construct( [string $columnName = null], [string $propertyName = null], [int $type = self::PHP_TYPE_STRING] )
Constructs a new PersistentObjectField

Parameters

Name Type Description
$columnName string The name of the column to map to.
$propertyName string The name of the class property to map to.
$type int The type of the class property.

__set_state

ezcPersistentObjectProperty __set_state( $array )
Returns a new instance of this class with the data specified by $array.
$array contains all the data members of this class in the form: array('member_name'=>value).
__set_state makes this class exportable with var_export. var_export() generates code, that calls this method when it is parsed with PHP.

Parameters

Name Type Description
$array array(string=>mixed)  

Last updated: Mon, 17 Dec 2007