b2evolution

Multilingual multiuser multiblog engine

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

Class: UserCache

Source Location: /blogs/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::$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_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 57]

Remember special cache loads.

API Tags:
Access:  protected


[ Top ]
Methods
Constructor UserCache  [line 63]

  UserCache UserCache( )

Constructor



[ Top ]
add  [line 148]

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

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

  void get_blog_member_option_list( integer $blog_ID, [integer $default = 0], [boolean $allow_none = false], [ $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
integer   $default:  selected ID
boolean   $allow_none:  provide a choice for "none" with ID 0
   $always_load_default: 

API Tags:
Usedby:  Item::get_assigned_user_options()


[ Top ]
get_by_login  [line 86]

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

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

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

  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 Sat, 06 Mar 2010 03:42:12 +0100 by phpDocumentor 1.4.2. This site is hosted and maintained by Daniel HAHLER (Contact).