DataObjectCache DataObjectCache(
string
$objtype, boolean
$load_all, string
$tablename, [string
$prefix = ''], string
$dbIDname, [
$name_field = NULL], [
$order_by = '']
)
|
|
Constructor
Parameters:
|
string |
$objtype: |
Name of DataObject class we are cacheing |
|
boolean |
$load_all: |
true if it's OK to just load all items! |
|
string |
$tablename: |
Name of table in database |
|
string |
$prefix: |
Prefix of fields in the table |
|
string |
$dbIDname: |
Name of the ID field (including prefix) |
|
|
$name_field: |
|
|
|
$order_by: |
|
Add a dataobject to the cache
Parameters:
Redefined in descendants as:
void clear(
[
$keep_shadow = false]
)
|
|
Clear the cache **extensively**
Parameters:
Redefined in descendants as:
boolean dbdelete_by_ID(
integer
$req_ID
)
|
|
Delete an object from DB by ID.
Parameters:
|
integer |
$req_ID: |
ID of object to delete |
reference &get_by_ID(
integer
$req_ID, [boolean
$halt_on_error = true], [boolean
$halt_on_empty = true]
)
|
|
Get an object from cache by ID
Load the cache if necessary (all at once if allowed).
Parameters:
|
integer |
$req_ID: |
ID of object to load |
|
boolean |
$halt_on_error: |
true if function should die on error |
|
boolean |
$halt_on_empty: |
true if function should die on empty/null |
API Tags:
reference &get_by_name(
integer
$req_name, [boolean
$halt_on_error = true], [boolean
$halt_on_empty = true]
)
|
|
Get an object from cache by name
Load the cache if necessary (all at once if allowed).
Parameters:
|
integer |
$req_name: |
ID of object to load |
|
boolean |
$halt_on_error: |
true if function should die on error |
|
boolean |
$halt_on_empty: |
true if function should die on empty/null |
API Tags:
Get an array of all (loaded) IDs.
Object &instantiate(
Object
&$db_row
)
|
|
Instantiate a DataObject from a table row and then cache it.
Parameters:
|
Object |
&$db_row: |
Database row |
Redefined in descendants as:
Load the cache **extensively**
void load_list(
string
$req_list
)
|
|
Load a list of objects into the cache
Parameters:
|
string |
$req_list: |
list of IDs of objects to load |
void &new_obj(
[
$row = NULL]
)
|
|
TODO
Parameters:
Redefined in descendants as:
void option_list(
[integer
$default = 0], [boolean
$allow_none = false], [
$method = 'name']
)
|
|
Display form option list with cache contents
Load the cache if necessary
Parameters:
|
integer |
$default: |
selected ID |
|
boolean |
$allow_none: |
provide a choice for "none" with ID '' |
|
|
$method: |
|
Information Tags:
Redefined in descendants as:
void option_list_return(
[integer
$default = 0], [boolean
$allow_none = false], [
$method = 'name_return']
)
|
|
Returns form option list with cache contents
Load the cache if necessary
Parameters:
|
integer |
$default: |
selected ID |
|
boolean |
$allow_none: |
provide a choice for "none" with ID '' |
|
|
$method: |
|
Redefined in descendants as:
void remove_by_ID(
integer
$req_ID
)
|
|
Remove an object from cache by ID
Parameters:
|
integer |
$req_ID: |
ID of object to remove |
Redefined in descendants as: