phpDocumentor pond
[ class tree: pond ] [ index: pond ] [ all elements ]

Class: GenericCategoryCache

Source Location: /qp_inc/generic/model/_genericcategorycache.class.php

Class GenericCategoryCache

Descendants
Child Class Description
ChapterCache ChapterCache Class

[ Top ]
Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From DataObjectCache

DataObjectCache::$all_loaded
DataObjectCache::$cache
DataObjectCache::$current_idx
DataObjectCache::$DataObject_array
DataObjectCache::$dbIDname
DataObjectCache::$dbprefix
DataObjectCache::$dbtablename
DataObjectCache::$load_all
DataObjectCache::$name_field
DataObjectCache::$none_option_text
DataObjectCache::$none_option_value
DataObjectCache::$objtype
DataObjectCache::$order_by
DataObjectCache::$shadow_cache

Inherited From GenericCache

GenericCache::GenericCache()
Constructor
GenericCache::new_obj()
Instanciate a new object within this cache

Inherited From DataObjectCache

DataObjectCache::DataObjectCache()
Constructor
DataObjectCache::add()
Add a dataobject to the cache
DataObjectCache::clear()
Clear the cache **extensively**
DataObjectCache::dbdelete_by_ID()
Delete an object from DB by ID.
DataObjectCache::get_by_ID()
Get an object from cache by ID
DataObjectCache::get_by_name()
Get an object from cache by name
DataObjectCache::get_first()
This provides a simple interface for looping over the contents of the Cache.
DataObjectCache::get_ID_array()
Get an array of all (loaded) IDs.
DataObjectCache::get_next()
This provides a simple interface for looping over the contents of the Cache.
DataObjectCache::get_option_array()
Returns option array with cache contents
DataObjectCache::get_option_list()
Returns form option list with cache contents
DataObjectCache::instantiate()
Instantiate a DataObject from a table row and then cache it.
DataObjectCache::load_all()
Load the cache **extensively**
DataObjectCache::load_list()
Load a list of objects into the cache
DataObjectCache::new_obj()
Instanciate a new object within this cache
DataObjectCache::remove_by_ID()
Remove an object from cache by ID

[ Top ]
Property Summary
mixed   $loaded_subsets   Which subsets have been loaded
mixed   $revealed_all_children   Have the children been revealed for all subsets yet?
mixed   $revealed_subsets   Have the children been revealed for all subsets yet?
mixed   $root_cats   These are the level 0 categories (which have no parent)
mixed   $subset_cache  
mixed   $subset_property   Which property of the objects defines the subset
mixed   $subset_root_cats   These are the level 0 categories (which have no parent) for each subset

[ Top ]
Method Summary
GenericCategoryCache   GenericCategoryCache()   Constructor
void   add()   Add a dataobject to the cache
true   check_path_to_root()   Support function for reveal_children()
void   clear()   Empty/reset the cache
string   recurse()   Return recursive display of loaded categories
string   recurse_select()   Return recursive select options list of all loaded categories
void   reveal_children()   Reveal children

[ Top ]
Properties
mixed   $loaded_subsets = array() [line 59]

Which subsets have been loaded


[ Top ]
mixed   $revealed_all_children = false [line 74]

Have the children been revealed for all subsets yet?


[ Top ]
mixed   $revealed_subsets = array() [line 78]

Have the children been revealed for all subsets yet?


[ Top ]
mixed   $root_cats = array() [line 64]

These are the level 0 categories (which have no parent)


[ Top ]
mixed   $subset_cache = array() [line 49]

[ Top ]
mixed   $subset_property [line 54]

Which property of the objects defines the subset


[ Top ]
mixed   $subset_root_cats = array() [line 69]

These are the level 0 categories (which have no parent) for each subset


[ Top ]
Methods
Constructor GenericCategoryCache  [line 84]

  GenericCategoryCache GenericCategoryCache( $objtype, $load_all, $tablename, [ $prefix = ''], [ $dbIDname = 'ID'], [ $name_field = NULL], [ $subset_property = NULL], [ $order_by = '']  )

Constructor

Parameters:
   $objtype: 
   $load_all: 
   $tablename: 
   $prefix: 
   $dbIDname: 
   $name_field: 
   $subset_property: 
   $order_by: 


[ Top ]
add  [line 110]

  void add( &$Obj  )

Add a dataobject to the cache

Parameters:
   &$Obj: 


Redefinition of:
DataObjectCache::add()
Add a dataobject to the cache

[ Top ]
check_path_to_root  [line 251]

  true check_path_to_root( integer $subset_ID, integer $cat_ID, [ $path_array = array()]  )

Support function for reveal_children()

Parameters:
integer   $subset_ID: 
integer   $cat_ID: 
   $path_array: 

API Tags:
Return:  if root parent


[ Top ]
clear  [line 95]

  void clear( )

Empty/reset the cache



Redefinition of:
DataObjectCache::clear()
Clear the cache **extensively**

Redefined in descendants as:

[ Top ]
recurse  [line 293]

  string recurse( array $callbacks, [integer|NULL $subset_ID = NULL], [array $cat_array = NULL], [int $level = 0]  )

Return recursive display of loaded categories

Parameters:
array   $callbacks:  callback funtions (to format the display)
integer|NULL   $subset_ID:  NULL for all subsets
array   $cat_array:  categories list to display
int   $level:  depth of categories list

API Tags:
Return:  recursive list of all loaded categories


[ Top ]
recurse_select  [line 376]

  string recurse_select( [integer $selected = NULL], [integer $subset_ID = NULL], [boolean $include_root = false], [array $Cat_array = NULL], [integer $level = 0], [array $exclude_array = array()]  )

Return recursive select options list of all loaded categories

Parameters:
integer   $selected:  selected category in the select input
integer   $subset_ID:  NULL for all subsets
boolean   $include_root:  Include the root element?
array   $Cat_array:  GenercCategory objects to display (will recurse from those starting points)
integer   $level:  depth of categories list
array   $exclude_array:  IDs of categories to exclude (their children will be ignored to)

API Tags:
Return:  select options list of all loaded categories


[ Top ]
reveal_children  [line 135]

  void reveal_children( [integer|NULL $subset_ID = NULL]  )

Reveal children

After this each Category will have an array pointing to its direct children

Parameters:
integer|NULL   $subset_ID:  NULL for all subsets


[ Top ]