b2evolution

Multilingual multiuser multiblog engine

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

Class: BlogCache

Source Location: /blogs/inc/MODEL/collections/_blogcache.class.php

Class BlogCache

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 ]
Method Summary
BlogCache   BlogCache()   Constructor
boolean   add()   Add object to cache, handling our own indices.
Blog|false   &get_by_url()   Get an object from cache by its url ("siteurl") or based on access_type == 'stub'.
Blog|false   &get_by_urlname()   Get an object from cache by its URL name.
array   load_user_blogs()   Load blogs of a user.
void   option_list()   Display form option list with cache contents
void   option_list_return()   Returns form option list with cache contents

[ Top ]
Properties
array   $cache_siteurl_abs = array() [line 51]

[ Top ]
array   $cache_urlname = array() [line 56]

[ Top ]
Methods
Constructor BlogCache  [line 61]

  BlogCache BlogCache( )

Constructor



[ Top ]
add  [line 73]

  boolean add( Blog &$Blog  )

Add object to cache, handling our own indices.

Parameters:
Blog   &$Blog: 

API Tags:
Return:  True on add, false if already existing.


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

[ Top ]
get_by_url  [line 97]

  Blog|false &get_by_url( string $req_url, [boolean $halt_on_error = true]  )

Get an object from cache by its url ("siteurl") or based on access_type == 'stub'.

Load the cache if necessary

This gets used in /index.php to detect blogs according to the requested HostWithPath

Parameters:
string   $req_url:  URL of object to load (this should the whole requested URL/path, e.g. "http://mr.example.com/permalink")
boolean   $halt_on_error:  false if you want to return false on error

API Tags:
Return:  A Blog object on success, false on failure (may also halt!)


[ Top ]
get_by_urlname  [line 158]

  Blog|false &get_by_urlname( string $req_urlname, [boolean $halt_on_error = true]  )

Get an object from cache by its URL name.

Load the object into cache, if necessary.

Parameters:
string   $req_urlname:  URL name of object to load
boolean   $halt_on_error:  false if you want to return false on error

API Tags:
Return:  A Blog object on success, false on failure (may also halt!)


[ Top ]
load_user_blogs  [line 199]

  array load_user_blogs( [string $criterion = 'member'], integer $user_ID  )

Load blogs of a user.

Parameters:
string   $criterion:  criterion: 'member' (default), 'browse'
integer   $user_ID:  user ID

API Tags:
Return:  The blog IDs

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

[ Top ]
option_list  [line 248]

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

Display form option list with cache contents

Loads the whole cache!

Parameters:
integer   $default:  selected ID
boolean   $allow_none:  provide a choice for "none" with ID 0

Information Tags:
Todo:  is it good to load all entries here? check usage! (Default blog/linkblog selecrtion, MT plugin...)

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

[ Top ]
option_list_return  [line 265]

  void option_list_return( [integer $default = 0], [boolean $allow_none = false], [ $method = 'name_return']  )

Returns form option list with cache contents

Loads the whole cache!

Parameters:
integer   $default:  selected ID
boolean   $allow_none:  provide a choice for "none" with ID 0
   $method: 


Redefinition of:
DataObjectCache::option_list_return()
Returns form option list with cache contents

[ Top ]

Documentation generated on Tue, 18 Dec 2007 19:11:19 +0100 by phpDocumentor 1.4.0