Class: BlogCache
Source Location: /blogs/inc/MODEL/collections/_blogcache.class.php
Class BlogCache
Class Overview
|
Blog Cache Class Located in /blogs/inc/MODEL/collections/_blogcache.class.php [line 46] DataObjectCache | --BlogCacheAuthor(s):
|
[ Top ]
Inherited Properties, Constants, and Methods
| Inherited Properties | Inherited Methods | Inherited Constants |
|---|---|---|
|
Inherited From DataObjectCache |
Inherited From DataObjectCache
|
[ Top ]
Property Summary
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
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 97]
|
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]
|
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]
|
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]
|
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]
|
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 ]
