public function notify($user = null, $load = true, $preload = true, array $exclude = array())
{
try {
$alarms = $this->listAlarms($user, null, $load, $preload);
} catch (Horde_Alarm_Exception $e) {
if ($this->_logger) {
$this->_logger->log($e, 'ERR');
}
throw $e;
}
if (empty($alarms)) {
return;
}
$handlers = $this->handlers();
foreach ($alarms as $alarm) {
foreach ($alarm['methods'] as $alarm_method) {
if (isset($handlers[$alarm_method]) && !in_array($alarm_method, $exclude)) {
try {
$handlers[$alarm_method]->notify($alarm);
} catch (Horde_Alarm_Exception $e) {
$this->_errors[] = $e;
}
}
}
}
}