Public Member Functions | |
adopt_child ( $in_object_to_own) | |
count () | |
children_ids () | |
children () | |
generic_search ( $in_search_parameters=NULL, $page_size=0, $initial_page=0, $and_writeable=false, $count_only=false, $ids_only=false) | |
Public Attributes | |
$my_owner_id = NULL | |
This is the ID We will use for the "owner." If left NULL, then the instance ID is used instead. More... | |
Protected Attributes | |
$_cached_ids = NULL | |
This will contain our "owned" IDs after we load. More... | |
This is a trait for the basic "owner" aggregator functionality.
Owners are VERY simple aggregates. They only allow a very rough "pre-filter" for searches. If you want to get fancier, use a collection (but you won't be able to handle as many children).
Definition at line 36 of file tco_owner.interface.php.
tCO_Owner::adopt_child | ( | $in_object_to_own | ) |
This method will change a given object to have this as its owner.
$in_object_to_own | The instance that will be "owned" by this instance. The user must have write privileges on the onject. |
Definition at line 46 of file tco_owner.interface.php.
References CO_CHAMELEON_Lang_Common\$co_owner_error_code_user_not_authorized, CO_CHAMELEON_Lang\$co_owner_error_desc_user_not_authorized, and CO_CHAMELEON_Lang\$co_owner_error_name_user_not_authorized.
tCO_Owner::children | ( | ) |
WARNING: Since the "owner" object is for big, fat datasets, this could blow up memory!
Definition at line 96 of file tco_owner.interface.php.
tCO_Owner::children_ids | ( | ) |
Definition at line 81 of file tco_owner.interface.php.
tCO_Owner::count | ( | ) |
This counts the direct children of this collection, and returns that count.
Definition at line 70 of file tco_owner.interface.php.
tCO_Owner::generic_search | ( | $in_search_parameters = NULL , |
|
$page_size = 0 , |
|||
$initial_page = 0 , |
|||
$and_writeable = false , |
|||
$count_only = false , |
|||
$ids_only = false |
|||
) |
This is a "generic" data database search. It can be called from external user contexts, and allows a fairly generalized search of the "data" database. Sorting will be done for the "owner" and "location" values. "owner" will be sorted by the ID of the returned records, and "location" will be by distance from the center. This will ignore any "owner" parameters, and will only look for this specific owner. There is no "OR" search. It is always "AND."
It is "security-safe."
$in_search_parameters | This is an associative array of terms to define the search. The keys should be:
|
$page_size | If specified with a 1-based integer, this denotes the size of a "page" of results. NOTE: This is only applicable to MySQL or Postgres, and will be ignored if the DB is not MySQL or Postgres. |
$initial_page | This is ignored unless $page_size is greater than 0. If so, then this 0-based index will specify which page of results to return. |
$and_writeable | If true, then we only want records we can modify. |
$count_only | If true (default is false), then only a single integer will be returned, with the count of items that fit the search. |
$ids_only | If true (default is false), then the return array will consist only of integers (the object IDs). If $count_only is true, this is ignored. |
Definition at line 112 of file tco_owner.interface.php.
|
protected |
This will contain our "owned" IDs after we load.
Definition at line 38 of file tco_owner.interface.php.
tCO_Owner::$my_owner_id = NULL |
This is the ID We will use for the "owner." If left NULL, then the instance ID is used instead.
Definition at line 37 of file tco_owner.interface.php.