Public Member Functions |
| registerHandlers () |
| Registers all standard handlers.
|
| registerHandler ($action, $callback, $genre=false) |
| Registers task handler for specified action and genre If genre is not specified the task is registered globally.
|
| getHandler ($action, $genre=false) |
| Returns task handlers.
|
| getTasks ($select, $genre, $objectId, $action=null, $done=null, $where=false, $order=false, $limit=false, $object=true) |
| countObjectTasks ($genre, $id, $done=false) |
| handler_publish ($task) |
| handler_remove ($task) |
| handler_hideItem ($task) |
| handler_showItem ($task) |
Static Public Member Functions |
static | instance ($create=true) |
static | runTasks () |
| Run tasks.
|
Data Fields |
const | EVENT_BEFORE_TASKS = 'kweb.tasks.before_tasks' |
const | EVENT_AFTER_TASKS = 'kweb.tasks.after_tasks' |
const | SELECT_COUNT = 'count' |
const | SELECT_EXISTS = 'exists' |
const | SELECT_TASK_ID = 'task_id' |
const | SELECT_DELETE = 'delete' |
const | SELECT_ALL = '*' |
Static Public Attributes |
static | $inst = null |
Protected Member Functions |
| __construct () |
Protected Attributes |
| $handlers = null |
Constructor & Destructor Documentation
KWebTasks::__construct |
( |
| ) |
[protected] |
Member Function Documentation
KWebTasks::countObjectTasks |
( |
$ |
genre, |
|
|
$ |
id, |
|
|
$ |
done = false |
|
) |
| |
KWebTasks::getHandler |
( |
$ |
action, |
|
|
$ |
genre = false |
|
) |
| |
Returns task handlers.
- Returns:
- callable
KWebTasks::getTasks |
( |
$ |
select, |
|
|
$ |
genre, |
|
|
$ |
objectId, |
|
|
$ |
action = null , |
|
|
$ |
done = null , |
|
|
$ |
where = false , |
|
|
$ |
order = false , |
|
|
$ |
limit = false , |
|
|
$ |
object = true |
|
) |
| |
KWebTasks::handler_hideItem |
( |
$ |
task | ) |
|
KWebTasks::handler_publish |
( |
$ |
task | ) |
|
KWebTasks::handler_remove |
( |
$ |
task | ) |
|
KWebTasks::handler_showItem |
( |
$ |
task | ) |
|
static KWebTasks::instance |
( |
$ |
create = true | ) |
[static] |
KWebTasks::registerHandler |
( |
$ |
action, |
|
|
$ |
callback, |
|
|
$ |
genre = false |
|
) |
| |
Registers task handler for specified action and genre If genre is not specified the task is registered globally.
Callbacks are called with callback(KWebTask $task). Returned value is stored as the result of the task.
Errors should be reported through exceptions
KWebTasks::registerHandlers |
( |
| ) |
|
static KWebTasks::runTasks |
( |
| ) |
[static] |
Field Documentation
KWebTasks::$handlers = null [protected] |
KWebTasks::$inst = null [static] |
The documentation for this class was generated from the following file: