This class is a data source driver for a PEAR::DB::DB_DataObject object
SUPPORTED OPTIONS:
labels_property: (string) The name of a property that you can set within
your DataObject. This property should contain
the same kind of information as the 'labels'
option. If the 'labels' option is set, this
one will not be used.
fields_property: (string) The name of a property that you can set within
your DataObject. This property is expected to
contain the same kind of information as the
'fields' option. If the 'fields' option is set,
this one will not be used.
fields_order_property: (string) The name of a property that you can set
within your DataObject. It will be used to
set the order in which fields are displayed,
as long as you're not configuring this by
adding/generating columns. Also requires the
fields_property to be set.
sort_property: (string) The name of a property that you can set within
your DataObject. This property should contain
an array of the form:
array("field1", "field1 DESC", ...)
If the data is already being sorted then this
this property's content will be ignored.
link_level: (int) The maximum link display level. If equal to 0
the links will not be followed.
link_property: (string) The name of a property you can set within a
linked DataObject. This property should
contain a array of field names that will
be used to display a string out of this
linked DataObject.
Has no effect when link_level is 0.
link_keep_key: (bool) Set this to true when you want to keep the
original values (usually foreign keys) of
fields which are being replaced by their linked
values. The record will then contain additional
keys with "__key" prepended. This option only
makes sense with link_level higher than 0.
Example: if the country_code original value
is 'FR' and this is replaced by "France" from
the linked country table, then setting
link_keep_key to true will keep the "FR"
value in country_code__key.
formbuilder_integration: (bool) DEPRECATED: use link_level and
fields_order_property instead.
For BC, Setting this to true is equivalent to
setting link_level to 3 and
fields_order_property to 'fb_preDefOrder'.
raw_count: (bool) If true: query all the records in order to
count them. This is needed when records are
grouped (GROUP BY, DISTINCT, etc..), but
might be heavy.
If false: perform a smart count query with
DB_DataObject::count().
return_objects: (bool) If true, the returned records will consists
of clones of the dataobject instead of
associative arrays. This is especially useful
when used in conjunction with the smarty
renderer for example, to directly access the
dataobject properties and methods from
your templates.
GENERAL NOTES:
You can use getters in your DataObject, this driver will look for them and call them if found, instead of accessing the corresponding property. Two slightly different types of getters are supported.
Example: if you have a property named my_field, this driver will first search for getMyField() (camel case), and then for getMy_field() (DB_DataObject compliant). If it can't find any it will access the my_field property directly.