KWeb
6.4
|
Public Member Functions | |
__destruct () | |
installGenre ($genre) | |
getObject ($genre, $id, $critical=true, $param=false) | |
objectExists ($genre, $id, $params=false) | |
checkObjectId ($genre, $id) | |
getObjects ($genre, $ids, $param=false) | |
isNameOccupied ($name, $lang=false) | |
Returns TRUE if pathname is already taken. | |
getItem ($id, $critical=true, $lang=false) | |
getLink ($id, $critical=true) | |
itemExists ($id, $lang=false) | |
checkItemId ($id) | |
checkLinkId ($id) | |
getItems ($ids, $lang=false) | |
getLinks ($ids) | |
Zwraca linki o identyfikatorach z listy. | |
storeUpdates () | |
All updates will be commited to the database at the end of the script (in commitUpdates) | |
sqlUpdateItems () | |
commitUpdates ($force=false) | |
findCachedObject ($genre, $id) | |
Obsługa elementów. | |
getCachedObjects ($genre, $ids, $params) | |
Loads objects with provided ids, from provided genre. | |
storeCacheObject ($genre, $obj, $idHint=null) | |
Stores the object in the INTERNAL cache. | |
getCacheObject ($genre, $id) | |
releaseObjects ($genre, array $ids=null) | |
Calls releaseObject() on all objects, that are currently held by cache... | |
unsetCacheObject ($genre, $id) | |
Removes the object from the INTERNAL cache. | |
unsetAllCacheObjects ($genre=false) | |
Purge internal cache. | |
makeCachedFilename ($genre, $id) | |
Obsługa linków. | |
prepareAccessCache ($recreate=false) | |
prepareNamesCache ($lang=false, $recreate=false) | |
storeCache () | |
resetDataCache () | |
resetObjectsCache ($genre=false) | |
resetWholeCache () | |
Static Public Member Functions | |
static | instance ($create=true) |
Data Fields | |
$masterSwitch | |
$access | |
$names = array() | |
Cache nazw ( lang => array(name => id) , ...) | |
$items | |
Cache elementów jako item_id=>obiekt. | |
$drafts = array() | |
$users = array() | |
$links | |
Cache linków jako link_id=>obiekt. | |
$objects = array() | |
Cache obiektów segregowany przez GENRE typów. | |
$resetData = false | |
$resetObjects = false | |
$cachePath | |
$cacheType | |
$cacheDirPrefix = 'obj_' | |
$block = array() | |
Static Public Attributes | |
static | $inst = null |
Protected Member Functions | |
__construct () | |
_initialize () | |
Protected Attributes | |
$hasUpdates = false |
KWebCache::__construct | ( | ) | [protected] |
KWebCache::__destruct | ( | ) |
KWebCache::_initialize | ( | ) | [protected] |
KWebCache::checkItemId | ( | $ | id | ) |
KWebCache::checkLinkId | ( | $ | id | ) |
KWebCache::checkObjectId | ( | $ | genre, |
$ | id | ||
) |
KWebCache::commitUpdates | ( | $ | force = false | ) |
KWebCache::findCachedObject | ( | $ | genre, |
$ | id | ||
) |
Obsługa elementów.
KWebCache::getCachedObjects | ( | $ | genre, |
$ | ids, | ||
$ | params | ||
) |
Loads objects with provided ids, from provided genre.
Object are loaded in this manner:
KWebCache::getCacheObject | ( | $ | genre, |
$ | id | ||
) |
KWebCache::getItem | ( | $ | id, |
$ | critical = true , |
||
$ | lang = false |
||
) |
KWebCache::getItems | ( | $ | ids, |
$ | lang = false |
||
) |
KWebCache::getLink | ( | $ | id, |
$ | critical = true |
||
) |
KWebCache::getLinks | ( | $ | ids | ) |
Zwraca linki o identyfikatorach z listy.
KWebCache::getObject | ( | $ | genre, |
$ | id, | ||
$ | critical = true , |
||
$ | param = false |
||
) |
$genre | If genre is false, $id is treated as UID |
KWebCache::getObjects | ( | $ | genre, |
$ | ids, | ||
$ | param = false |
||
) |
KWebCache::installGenre | ( | $ | genre | ) |
static KWebCache::instance | ( | $ | create = true | ) | [static] |
KWebCache::isNameOccupied | ( | $ | name, |
$ | lang = false |
||
) |
Returns TRUE if pathname is already taken.
KWebCache::itemExists | ( | $ | id, |
$ | lang = false |
||
) |
KWebCache::makeCachedFilename | ( | $ | genre, |
$ | id | ||
) |
Obsługa linków.
KWebCache::objectExists | ( | $ | genre, |
$ | id, | ||
$ | params = false |
||
) |
KWebCache::prepareAccessCache | ( | $ | recreate = false | ) |
KWebCache::prepareNamesCache | ( | $ | lang = false , |
$ | recreate = false |
||
) |
isset($this->names[$lang]) ||
KWebCache::releaseObjects | ( | $ | genre, |
array $ | ids = null |
||
) |
Calls releaseObject() on all objects, that are currently held by cache...
KWebCache::resetDataCache | ( | ) |
KWebCache::resetObjectsCache | ( | $ | genre = false | ) |
KWebCache::resetWholeCache | ( | ) |
KWebCache::sqlUpdateItems | ( | ) |
KWebCache::storeCache | ( | ) |
KWebCache::storeCacheObject | ( | $ | genre, |
$ | obj, | ||
$ | idHint = null |
||
) |
Stores the object in the INTERNAL cache.
This cache is valid only for the current request.
When new object is instantiated (by creating new one, ore reading from the database) it has to be stored in the internal cache, so that subsequent requests for the same object can use this instance.
If the object is read from the disk cache, it's put into internal cache automatically.
Additionaly, in case of ID change (from temporary to DB id, or ID switch) object should be registered under the new ID, but the old reference should be kept intact. This way the object can be referenced by both IDs easily.
To store the object permanently on disk, use KWebObject::updateCache
$idHint | ID of the object to use. If false, KWebObject::getObjectId() will be used |
KWebCache::storeUpdates | ( | ) |
All updates will be commited to the database at the end of the script (in commitUpdates)
KWebCache::unsetAllCacheObjects | ( | $ | genre = false | ) |
Purge internal cache.
KWebCache::unsetCacheObject | ( | $ | genre, |
$ | id | ||
) |
Removes the object from the INTERNAL cache.
This cache is valid only for the current request.
KWebCache::$access |
KWebCache::$block = array() |
KWebCache::$cacheDirPrefix = 'obj_' |
KWebCache::$cachePath |
KWebCache::$cacheType |
KWebCache::$drafts = array() |
KWebCache::$hasUpdates = false [protected] |
KWebCache::$inst = null [static] |
KWebCache::$items |
Cache elementów jako item_id=>obiekt.
KWebCache::$links |
Cache linków jako link_id=>obiekt.
KWebCache::$masterSwitch |
KWebCache::$names = array() |
Cache nazw ( lang => array(name => id) , ...)
KWebCache::$objects = array() |
Cache obiektów segregowany przez GENRE typów.
KWebCache::$resetData = false |
KWebCache::$resetObjects = false |
KWebCache::$users = array() |