You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.1 KiB

15 years ago
  1. <?php
  2. class Event
  3. {
  4. private $conf;
  5. function __construct()
  6. {
  7. $this->conf = new \system\Conf();
  8. }
  9. function runEvent($type, $event = false)
  10. {
  11. global $polling;
  12. if(!$polling) { // avoids issues while loading pages.
  13. return;
  14. }
  15. $widgets = WidgetWrapper::getInstance(false);
  16. /*
  17. * $widgets->iterate('runEvents', array(
  18. array(
  19. 'type' => 'allEvents',
  20. 'data' => $event,
  21. )));*/
  22. $widgets->iterate('runEvents', array(
  23. array(
  24. 'type' => $type,
  25. 'data' => $event,
  26. )));
  27. /*$widgets->iterateAll('isEvents', array(
  28. array(
  29. 'type' => $type,
  30. 'data' => $event,
  31. )));*/
  32. // Outputting any RPC calls.
  33. RPC::commit();
  34. }
  35. }
  36. ?>