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

Class: UserCache

Source Location: /qp_inc/users/model/_usercache.class.php

Class UserCache

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 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   $alreadyCached   Remember special cache loads.

[ Top ]
Method Summary
UserCache   UserCache()   Constructor
boolean   add()   Overload parent's function to also maintain the login cache.
void   clear()   Clear our caches.
void   get_blog_member_option_list()   Loads cache with blog memeber, then display form option list with cache contents
false|User   &get_by_login()   Get a user object by login.
false|User   &get_by_loginAndPwd()   Get a user object by login, only if password matches.
void   load_blogmembers()   Load members of a given blog
void   remove_by_ID()   Handle our login cache.

[ Top ]
Properties
mixed   $alreadyCached = array() [line 56]

Remember special cache loads.

API Tags:
Access:  protected


[ Top ]
Methods
Constructor UserCache  [line 62]

  UserCache UserCache( )

Constructor



[ Top ]
add  [line 143]

  boolean add( User &$Obj  )

Overload parent's function to also maintain the login cache.

Parameters:
User   &$Obj: 


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

[ Top ]
clear  [line 241]

  void clear( [ $keep_shadow = false]  )

Clear our caches.

Parameters:
   $keep_shadow: 


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

[ Top ]
get_blog_member_option_list  [line 217]

  void get_blog_member_option_list( integer $blog_ID, [integer $default = 0], [boolean $allow_none = false], [boolean $always_load_default = false]  )

Loads cache with blog memeber, then display form option list with cache contents

Optionally, also adds default choice to the cache.

Parameters:
integer   $blog_ID:  blog ID or 0 for ALL
integer   $default:  selected ID
boolean   $allow_none:  provide a choice for "none" with ID 0
boolean   $always_load_default:  make sur the current default user is part of the choices

API Tags:
Usedby:  Item::get_assigned_user_options()


[ Top ]
get_by_login  [line 85]

  false|User &get_by_login( $login  )

Get a user object by login.

Does not halt on error.

Parameters:
   $login: 

API Tags:
Return:  Reference to the user object or false if not found


[ Top ]
get_by_loginAndPwd  [line 120]

  false|User &get_by_loginAndPwd( string $login, string $pass, [boolean $pass_is_md5 = true]  )

Get a user object by login, only if password matches.

Parameters:
string   $login:  Login
string   $pass:  Password
boolean   $pass_is_md5:  Password is MD5()'ed


[ Top ]
load_blogmembers  [line 162]

  void load_blogmembers( integer $blog_ID  )

Load members of a given blog

Parameters:
integer   $blog_ID:  blog ID to load members for

Information Tags:
Todo:  make a UNION query when we upgrade to MySQL 4

[ Top ]
remove_by_ID  [line 252]

  void remove_by_ID( $reg_ID  )

Handle our login cache.

Parameters:
   $reg_ID: 


Redefinition of:
DataObjectCache::remove_by_ID()
Remove an object from cache by ID

[ Top ]