[ Index ]

Source Code Reference for V1.00

title

Body

[close]

/classes/ -> event_queue.class.php (summary)

Event handling queue class.

File Size: 207 lines (6 kb)
Included or required: 2 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

EventQueue:: (8 methods):
  EventQueue()
  add()
  remove()
  find()
  execute()
  scan()
  update_event()
  commit_updates()


Class: EventQueue  - X-Ref

EventQueue()   X-Ref
No description

add($callback, &$args, $module, $sysmodule = false, $id = 0, $type = '', $date = 0, $repeat_interval = 0, $repeat_count = 1)   X-Ref
Add an event to the queue.

The callback can either be the name of a global function or the
name of a class
param: mixed $callback function to call when this event is due.
param: mixed $args Arguments to pass to the callback
param: string $module module, or originator of the event
param: string $type type of event (to allow searching)
param: integer $id id of originating event.
param: integer $date Seconds since 1970 to trigger event.
param: integer $repeat_interval seconds to repeat
param: integer $repeat_count number of times to repeat
return: integer queue id

remove($id)   X-Ref
Remove the event from the queue.


find($module, $type, $id = null)   X-Ref
Find a queue record (or records) based upon the


execute(&$fields)   X-Ref
Execute a queue entry.  This involves resolving the
method to execute and passing the arguments to it.


scan()   X-Ref
Scans the queue for entries that are older than current date.
If it finds one it tries to execute the attached function.
If successful, the entry is removed from the queue, or if
it is a repeatable event the repeat time is added to the
start time and the repeat count (if set) is decremented.


update_event(&$fields)   X-Ref
No description

commit_updates()   X-Ref
No description



Generated: Thu Nov 20 03:00:14 2008 Cross-referenced by PHPXref 0.7