Constructor - just store the $params in our newly-created object. All other work is done by initialize().
Horde_Alarm
Horde_Alarm
([array $params = array()], [ $errormsg = null])
-
array
$params: Any parameters needed for this driver.
-
$errormsg
Deletes an alarm from the backend.
void
delete
(string $id, [string $user = null])
-
string
$id: The alarm's unique id.
-
string
$user: The alarm's user. All users' alarms if null.
Returns whether an alarm with the given id exists already.
boolean
exists
(string $id, string $user)
-
string
$id: The alarm's unique id.
-
string
$user: The alarm's user
Attempts to return a concrete Horde_Alarm instance based on $driver.
mixed
factory
([string $driver = null], [array $params = null])
-
string
$driver: The type of concrete Horde_Alarm subclass to return. The class name is based on the storage driver ($driver). The code is dynamically included.
-
array
$params: A hash containing any additional configuration or connection parameters a subclass might need.
Garbage collects old alarms in the backend.
void
gc
()
Returns an alarm hash from the backend.
array
get
(string $id, string $user)
-
string
$id: The alarm's unique id.
-
string
$user: The alarm's user
Returns a list of all global alarms from the backend.
array
globalAlarms
()
Returns whether an alarm is snoozed.
boolean
isSnoozed
(
string $id,
string $user, [
Horde_Date $time =
null])
-
string
$id: The alarm's unique id.
-
string
$user: The alarm's user
-
Horde_Date
$time: The time when the alarm may be snoozed. Defaults to now.
Returns a list of alarms from the backend.
array
listAlarms
([
string $user =
null], [
Horde_Date $time =
null], [
boolean $load =
false], [
boolean $preload =
true])
-
string
$user: Return alarms for this user, all users if null, or global alarms if empty.
-
Horde_Date
$time: The time when the alarms should be active. Defaults to now.
-
boolean
$load: Update active alarms from all applications?
-
boolean
$preload: Preload alarms that go off within the next ttl time span?
Retrieves active alarms from all applications and stores them in the backend.
The applications will only be called once in the configured time span, by default 5 minutes.
void
load
([string $user = null], [boolean $preload = true])
-
string
$user: Retrieve alarms for this user, or for all users if null.
-
boolean
$preload: Preload alarms that go off within the next ttl time span?
Returns a list of available notification methods and method parameters.
The returned list is a hash with method names as the keys and optionally associated parameters as values. The parameters are hashes again with parameter names as keys and parameter information as values. The parameter information is hash with the following keys: 'desc' contains a parameter description; 'required' specifies whether this parameter is required.
array
notificationMethods
()
Notifies the user about any active alarms.
void
notify
([string $user = null], [boolean $load = true], [boolean $preload = true], [array $exclude = array()])
-
string
$user: Notify this user, all users if null, or guest users if empty.
-
boolean
$load: Update active alarms from all applications?
-
boolean
$preload: Preload alarms that go off within the next ttl time span?
-
array
$exclude: Don't notify with these methods.
Stores an alarm hash in the backend.
The alarm will be added if it doesn't exist, and updated otherwise.
void
set
(array $alarm)
-
array
$alarm: An alarm hash.
Delays (snoozes) an alarm for a certain period.
void
snooze
(string $id, string $user, integer $minutes)
-
string
$id: The alarm's unique id.
-
string
$user: The notified user.
-
integer
$minutes: The delay in minutes. A negative value dismisses the alarm completely.
void
_add
()
Redefined in descendants as:
void
_delete
()
Redefined in descendants as:
void
_exists
()
Redefined in descendants as:
Converts a value from the driver's charset.
mixed
_fromDriver
(mixed $value)
-
mixed
$value: Value to convert.
Redefined in descendants as:
void
_get
()
Redefined in descendants as:
void
_internal
()
Redefined in descendants as:
void
_isSnoozed
()
Redefined in descendants as:
void
_list
()
Redefined in descendants as:
Notifies about an alarm by email.
void
_mail
(array $alarm)
-
array
$alarm: An alarm hash.
Notifies about an alarm through Horde_Notification.
void
_notify
(array $alarm)
-
array
$alarm: An alarm hash.
Notifies about an alarm by a javascript popup.
void
_popup
(array $alarm)
-
array
$alarm: An alarm hash.
Notifies about an alarm with an SMS through the sms/send API method.
void
_sms
(array $alarm)
-
array
$alarm: An alarm hash.
void
_snooze
()
Redefined in descendants as:
Converts a value to the driver's charset.
mixed
_toDriver
(mixed $value)
-
mixed
$value: Value to convert.
Redefined in descendants as:
void
_update
()
Redefined in descendants as: