Newsletterdeveloper's documentation

dbo_attr_def Class Reference
[DBO Core API]

DBO entity attribute type definition. More...

List of all members.

Public Member Functions

 __construct (dbo_def $dbo_def, $name, $type, $options)
 Constructor.
 sql_quote_value ($value)
 Escape atribute value for use in SQL.

Public Attributes

 $dbo_def
 [dbo_def] Definition of DBO that owns this attribute.
 $name
 [string] Name of the attribute.
 $type
 [string] Attribute type (XXX: list).
 $optional
 [boolean] Attribute may be null.
 $default
 [any] Default value of an attribute.
 $max_length
 [int] Maximum length of the attribute (if type == string).
 $min_length
 [int] Minimum length of the attribute (if type == string).
 $multilang
 [boolean] Attribute is stored in multiple languages.
 $readonly
 [boolean] Readonly attribute, can't be chnaged, does not have setter.
 $volatile
 [boolean] Volatile attribute, must be read from DB on each attr_get().
 $title
 [string] Title for the attribute in the forms, sortabs, etc.
 $help
 [string] Help text.
 $tip
 [string] Tip text.
 $control
 [string] Default form control type for this attribute.

Private Member Functions

 sql_date ($v)
 Convert date into YYYY-MM-DD HH:MM:SS format (for use in SQL statements).


Detailed Description

DBO entity attribute type definition.

This class contains information about specific entity attribute. You may access entity attributes using dbo_registry::get('name')->attrs.


Constructor & Destructor Documentation

dbo_attr_def::__construct ( dbo_def dbo_def,
name,
type,
options 
)

Constructor.

Used internally.

References $name, and $type.


Member Function Documentation

dbo_attr_def::sql_date ( v  )  [private]

Convert date into YYYY-MM-DD HH:MM:SS format (for use in SQL statements).

Parameters:
v [string|int] Date/time string or UNIX time.
Returns:
[string] Formatted date/time string for SQL.

Referenced by sql_quote_value().

dbo_attr_def::sql_quote_value ( value  ) 

Escape atribute value for use in SQL.

This function may use different escape styles based on the type of the attribute.

Parameters:
value [string] Attribute value.
Returns:
[string] Escaped attribute value.

References sql_date().


Member Data Documentation

dbo_attr_def::$control

[string] Default form control type for this attribute.

dbo_attr_def::$dbo_def

[dbo_def] Definition of DBO that owns this attribute.

dbo_attr_def::$default

[any] Default value of an attribute.

dbo_attr_def::$help

[string] Help text.

dbo_attr_def::$max_length

[int] Maximum length of the attribute (if type == string).

dbo_attr_def::$min_length

[int] Minimum length of the attribute (if type == string).

dbo_attr_def::$multilang

[boolean] Attribute is stored in multiple languages.

dbo_attr_def::$name

[string] Name of the attribute.

Referenced by __construct().

dbo_attr_def::$optional

[boolean] Attribute may be null.

dbo_attr_def::$readonly

[boolean] Readonly attribute, can't be chnaged, does not have setter.

dbo_attr_def::$tip

[string] Tip text.

dbo_attr_def::$title

[string] Title for the attribute in the forms, sortabs, etc.

dbo_attr_def::$type

[string] Attribute type (XXX: list).

Referenced by __construct().

dbo_attr_def::$volatile

[boolean] Volatile attribute, must be read from DB on each attr_get().


The documentation for this class was generated from the following file:
Documentation for Newsletter, Tue Nov 11 07:50:02 2008.