b2evolution

Multilingual multiuser multiblog engine

b2evolution Technical Documentation (Version 1.8) [ class tree: evocore ] [ index: evocore ] [ all elements ]

Class: UserCache

Source Location: /blogs/inc/MODEL/users/_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::$dbIDname
DataObjectCache::$dbprefix
DataObjectCache::$dbtablename
DataObjectCache::$load_add
DataObjectCache::$name_field
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_ID_array()
Get an array of all (loaded) IDs.
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()
TODO
DataObjectCache::option_list()
Display form option list with cache contents
DataObjectCache::option_list_return()
Returns form option list with cache contents
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   blog_member_list()   Loads cache with blog memeber, then display form option list with cache contents
void   clear()   Clear our caches.
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   option_list()   Display form option list with cache contents
void   remove_by_ID()   Handle our login cache.

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

Remember special cache loads.

API Tags:
Access:  protected


[ Top ]
Methods
Constructor UserCache  [line 66]

  UserCache UserCache( )

Constructor



[ Top ]
add  [line 149]

  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 ]
blog_member_list  [line 222]

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

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
integer   $default:  selected ID
boolean   $allow_none:  provide a choice for "none" with ID 0
   $always_load_default: 
   $disp: 


[ Top ]
clear  [line 268]

  void clear( [ $keep_shadow = false]  )

Clear our caches.

Parameters:
   $keep_shadow: 


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

[ Top ]
get_by_login  [line 88]

  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 122]

  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 168]

  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 ]
option_list  [line 259]

  void option_list( [integer $default = 0], [boolean $allow_none = false]  )

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 0


Redefinition of:
DataObjectCache::option_list()
Display form option list with cache contents

[ Top ]
remove_by_ID  [line 279]

  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 ]

Documentation generated on Tue, 18 Dec 2007 23:23:56 +0100 by phpDocumentor 1.4.0