Path

ez components / documentation / api reference / 2007.2alpha1 / persistentobject


eZ Components 2007.2alpha1

PersistentObject: ezcPersistentObjectIdProperty

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

Class: ezcPersistentObjectIdProperty

Defines a persistent object id field. [source]
The column must be of type int both in PHP and in the database. The default value will always be null.
For descriptions for some the constants used in this class see: ezcPersisentObjectProperty

Properties

string read/write  $columnName
The name of the database field that stores the value.
ezcPersistentGeneratorDefinition read/write  $generator
The type of generator to use for the identifier. The identifier generator must be an object that extends the abstract class ezcPersistentIdentifierGenerator. The current options that are part of this package are:
  • ezcPersistentSequenceGenerator
  • ezcPersistentManualGenerator
  • ezcPersistentNativeGenerator
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 ezcPersistentObjectProperty::PHP_TYPE_*.
int read/write  $visibility
The visibility of the property. This property is deprecated!

Method Summary

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

Methods

__construct

ezcPersistentObjectIdProperty __construct( [string $columnName = null], [string $propertyName = null], [int $visibility = null], [ezcPersistentGeneratorDefinition $generator = null], [int $propertyType = ezcPersistentObjectProperty::PHP_TYPE_INT] )
Constructs a new PersistentObjectField

Parameters

Name Type Description
$columnName string The name of the database field that stores the value.
$propertyName string The name of the class member
$visibility int See $visibility for possible values.
$generator ezcPersistentGeneratorDefinition Definition of the identifier generator
$propertyType int See ezcPersistentObjectProperty for possible values.

__set_state

ezcPersistentObjectIdProperty __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, 12 Nov 2007