PHP Class Horde_Alarm_Object, horde

Author: Jan Schneider ([email protected])
Inheritance: extends Horde_Alarm
ファイルを表示 Open project: horde/horde

Protected Properties

Property Type Description
$_alarms

Public Methods

Method Description
initialize ( ) Attempts to initialize the backend.
internal ( string $id, string $user, array $internal ) Updates internal alarm properties, i.e. properties not determined by the application setting the alarm.

Protected Methods

Method Description
_add ( array $alarm ) Adds an alarm hash to the backend.
_delete ( string $id, string $user = null ) Deletes an alarm from the backend.
_dismiss ( string $id, string $user ) Dismisses an alarm.
_exists ( string $id, string $user, string $instanceid = null ) : boolean Returns whether an alarm with the given id exists already.
_findAlarm ( string $id, string $user, string $instanceid = null ) : array Returns a certain alarm.
_fromDriver ( mixed $value ) : mixed Converts a value from the driver's charset.
_gc ( ) Garbage collects old alarms in the backend.
_get ( string $id, string $user ) : array Returns an alarm hash from the backend.
_global ( ) : array Returns a list of all global alarms from the backend.
_isSnoozed ( string $id, string $user, Horde_Date $time ) : boolean Returns whether an alarm is snoozed.
_list ( string $user, Horde_Date $time ) : array Returns a list of alarms from the backend.
_snooze ( string $id, string $user, Horde_Date $snooze ) Delays (snoozes) an alarm for a certain period.
_sortAlarms ( $a, $b ) Sorts a number of alarms in chronological order.
_toDriver ( mixed $value ) : mixed Converts a value to the driver's charset.
_update ( array $alarm, boolean $keepsnooze = false ) Updates an alarm hash in the backend.

Method Details

_add() protected method

Adds an alarm hash to the backend.
protected _add ( array $alarm )
$alarm array An alarm hash.

_delete() protected method

Deletes an alarm from the backend.
protected _delete ( string $id, string $user = null )
$id string The alarm's unique id.
$user string The alarm's user. All users' alarms if null.

_dismiss() protected method

Dismisses an alarm.
protected _dismiss ( string $id, string $user )
$id string The alarm's unique id.
$user string The alarm's user

_exists() protected method

Returns whether an alarm with the given id exists already.
protected _exists ( string $id, string $user, string $instanceid = null ) : boolean
$id string The alarm's unique id.
$user string The alarm's user
$instanceid string An optional instanceid to match.
return boolean True if the specified alarm exists.

_findAlarm() protected method

Returns a certain alarm.
protected _findAlarm ( string $id, string $user, string $instanceid = null ) : array
$id string The alarm's unique id.
$user string The alarm's user
$instanceid string An optional instanceid to match.
return array An alarm hash.

_fromDriver() protected method

Converts a value from the driver's charset.
protected _fromDriver ( mixed $value ) : mixed
$value mixed Value to convert.
return mixed Converted value.

_gc() protected method

Garbage collects old alarms in the backend.
protected _gc ( )

_get() protected method

Returns an alarm hash from the backend.
protected _get ( string $id, string $user ) : array
$id string The alarm's unique id.
$user string The alarm's user.
return array An alarm hash.

_global() protected method

Returns a list of all global alarms from the backend.
protected _global ( ) : array
return array A list of alarm hashes.

_isSnoozed() protected method

Returns whether an alarm is snoozed.
protected _isSnoozed ( string $id, string $user, Horde_Date $time ) : boolean
$id string The alarm's unique id.
$user string The alarm's user
$time Horde_Date The time when the alarm may be snoozed.
return boolean True if the alarm is snoozed.

_list() protected method

Returns a list of alarms from the backend.
protected _list ( string $user, Horde_Date $time ) : array
$user string Return alarms for this user, all users if null, or global alarms if empty.
$time Horde_Date The time when the alarms should be active.
return array A list of alarm hashes.

_snooze() protected method

Delays (snoozes) an alarm for a certain period.
protected _snooze ( string $id, string $user, Horde_Date $snooze )
$id string The alarm's unique id.
$user string The alarm's user
$snooze Horde_Date The snooze time.

_sortAlarms() protected method

Sorts a number of alarms in chronological order.
protected _sortAlarms ( $a, $b )

_toDriver() protected method

Converts a value to the driver's charset.
protected _toDriver ( mixed $value ) : mixed
$value mixed Value to convert.
return mixed Converted value.

_update() protected method

Updates an alarm hash in the backend.
protected _update ( array $alarm, boolean $keepsnooze = false )
$alarm array An alarm hash.
$keepsnooze boolean Whether to keep the snooze value unchanged.

initialize() public method

Attempts to initialize the backend.
public initialize ( )

internal() public method

Updates internal alarm properties, i.e. properties not determined by the application setting the alarm.
public internal ( string $id, string $user, array $internal )
$id string The alarm's unique id.
$user string The alarm's user
$internal array A hash with the internal data.

Property Details

$_alarms protected_oe property

protected $_alarms