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

Class: BlogCache

Source Location: /qp_inc/collections/model/_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::$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
array   $cache_siteurl_abs   Cache by absolute siteurl
array   $cache_urlname   Cache by urlname

[ Top ]
Method Summary
BlogCache   BlogCache()   Constructor
boolean   add()   Add object to cache, handling our own indices.
Blog   &get_by_url()   Get an object from cache by its url ("siteurl")
Blog|false   &get_by_urlname()   Get a blog from cache by its URL name.
void   get_option_list()   Returns form option list with cache contents
array   load_owner_blogs()   Load a list of blogs owner by specific ID into the cache
array   load_public()   Load a list of public blogs into the cache
array   load_user_blogs()   Load blogs a user has permissions for.

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

Cache by absolute siteurl


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

Cache by urlname


[ Top ]
Methods
Constructor BlogCache  [line 59]

  BlogCache BlogCache( )

Constructor



[ Top ]
add  [line 72]

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

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

Get an object from cache by its url ("siteurl")

Load the cache if necessary

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

Parameters:
string   $req_url:  URL of blog to load (should be 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!)

Information Tags:
Todo:  fp> de-factorize. cleanup. make efficient. split access types.

[ Top ]
get_by_urlname  [line 157]

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

Get a blog 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 ]
get_option_list  [line 347]

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

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::get_option_list()
Returns form option list with cache contents

[ Top ]
load_owner_blogs  [line 222]

  array load_owner_blogs( integer $owner_ID, [string $order_by = 'ID']  )

Load a list of blogs owner by specific ID into the cache

Parameters:
integer   $owner_ID: 
string   $order_by: 

API Tags:
Return:  of IDs


[ Top ]
load_public  [line 194]

  array load_public( [string $order_by = 'ID']  )

Load a list of public blogs into the cache

Parameters:
string   $order_by: 

API Tags:
Return:  of IDs


[ Top ]
load_user_blogs  [line 251]

  array load_user_blogs( [string $permname = 'blog_ismember'], [string $permlevel = 'view'], [integer $user_ID = NULL], [ $order_by = 'ID'], [ $limit = NULL]  )

Load blogs a user has permissions for.

Parameters:
string   $permname:  permission: 'member' (default), 'browse' (files)
string   $permlevel: 
integer   $user_ID:  user ID
   $order_by: 
   $limit: 

API Tags:
Return:  The blog IDs


[ Top ]