Class: BlogCache
Source Location: /blogs/inc/collections/model/_blogcache.class.php
Class BlogCache
Class Overview
|
Blog Cache Class Located in /blogs/inc/collections/model/_blogcache.class.php [line 43] DataObjectCache | --BlogCacheAuthor(s):
|
[ Top ]
Inherited Properties, Constants, and Methods
[ Top ]
Property Summary
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
Methods
add [line 73]
|
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 99]
|
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 158]
|
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 348]
|
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 223]
|
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 195]
|
Load a list of public blogs into the cache
Parameters:| string | $order_by: |
API Tags:
| Return: | of IDs |
[ Top ]
load_user_blogs [line 252]
|
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 ]
