Initializes controller components
API Tags:
Performs actions before script termination
API Tags:
bool bind(
string
$event, string
$id, [string
$realm = COT_DEFAULT_REALM], [int
$type = COT_CACHE_TYPE_DEFAULT]
)
|
|
Binds an event to automatic cache field invalidation
Parameters:
string |
$event: |
Event name |
string |
$id: |
Cache entry id |
string |
$realm: |
Cache realm name |
int |
$type: |
Storage type, one of COT_CACHE_TYPE_* values |
API Tags:
Return: | TRUE on success, FALSE on error |
Access: | public |
int bind_array(
array
$bindings
)
|
|
Binds multiple cache fields to events, all represented as an associative array
Binding keys: event - name of the event the field is binded to id - cache object id realm - cache realm name type - cache storage type, one of COT_CACHE_TYPE_* constants
Parameters:
array |
$bindings: |
An indexed array of bindings. Each binding is an associative array with keys: event, realm, id, type. |
API Tags:
Return: | Number of bindings added |
Access: | public |
void clear(
[int
$type = COT_CACHE_TYPE_ALL]
)
|
|
Clears all cache entries
Parameters:
int |
$type: |
Cache storage type: COT_CACHE_TYPE_ALL, COT_CACHE_TYPE_DB, COT_CACHE_TYPE_DISK, COT_CACHE_TYPE_MEMORY. |
API Tags:
void clear_realm(
[string
$realm = COT_DEFAULT_REALM], [int
$type = COT_CACHE_TYPE_ALL]
)
|
|
Clears cache in specific realm
Parameters:
string |
$realm: |
Realm name |
int |
$type: |
Cache storage type: COT_CACHE_TYPE_ALL, COT_CACHE_TYPE_DB, COT_CACHE_TYPE_DISK, COT_CACHE_TYPE_MEMORY. |
API Tags:
Returns information about memory driver usage
API Tags:
Return: | Usage information |
Access: | public |
int trigger(
string
$event
)
|
|
Invalidates cache cells which were binded to the event.
Parameters:
string |
$event: |
Event name |
API Tags:
Return: | Number of cells cleaned |
Access: | public |
int unbind(
string
$realm, [string
$id = '']
)
|
|
Removes event/cache bindings
Parameters:
string |
$realm: |
Realm name (required) |
string |
$id: |
Object identifier. Optional, if not specified, all bindings from the realm are removed. |
API Tags:
Return: | Number of bindings removed |
Access: | public |
mixed __get(
string
$name
)
|
|
Property handler
Parameters:
string |
$name: |
Property name |
API Tags:
Return: | Property value |
Access: | public |