KWeb  6.4
KWebTasks Class Reference

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 
)
Parameters:
$doneCzy są już wykonane
KWebTasks::handler_hideItem ( $  task)
Parameters:
$taskKWebTask
KWebTasks::handler_publish ( $  task)
Parameters:
$taskKWebTask
KWebTasks::handler_remove ( $  task)
Parameters:
$taskKWebTask
KWebTasks::handler_showItem ( $  task)
Parameters:
$taskKWebTask
static KWebTasks::instance ( $  create = true) [static]
Returns:
KWebTasks
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 ( )

Registers all standard handlers.

Loads config/tasks.php configuration files

static KWebTasks::runTasks ( ) [static]

Run tasks.


Field Documentation

KWebTasks::$handlers = null [protected]
KWebTasks::$inst = null [static]
const KWebTasks::EVENT_AFTER_TASKS = 'kweb.tasks.after_tasks'
const KWebTasks::EVENT_BEFORE_TASKS = 'kweb.tasks.before_tasks'
const KWebTasks::SELECT_ALL = '*'
const KWebTasks::SELECT_COUNT = 'count'
const KWebTasks::SELECT_DELETE = 'delete'
const KWebTasks::SELECT_EXISTS = 'exists'
const KWebTasks::SELECT_TASK_ID = 'task_id'

The documentation for this class was generated from the following file: