PHP 클래스 Horde_Alarm_Sql, horde

The table structure can be created by the migration script.
저자: Jan Schneider ([email protected])
상속: extends Horde_Alarm
파일 보기 프로젝트 열기: horde/horde

보호된 프로퍼티들

프로퍼티 타입 설명
$_db Horde_Db_Adapter Handle for the current database connection.

공개 메소드들

메소드 설명
__construct ( array $params = [] ) Constructor.
initialize ( ) Initialization tasks.
internal ( string $id, string $user, array $internal ) Updates internal alarm properties, i.e. properties not determined by the application setting the alarm.

보호된 메소드들

메소드 설명
_add ( array $alarm ) Adds an alarm hash to the backend.
_convertBinary ( string $column, mixed $value ) : string Converts results from TEXT columns to strings.
_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.
_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.
_getHash ( array $alarm )
_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.
_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.

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( array $params = [] )
$params array Configuration parameters:
'db' - (Horde_Db_Adapter) [REQUIRED] The DB instance.
'table' - (string) The name of the alarm table in 'database'.
          DEFAULT: 'horde_alarms'

_add() 보호된 메소드

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

_convertBinary() 보호된 메소드

Converts results from TEXT columns to strings.
protected _convertBinary ( string $column, mixed $value ) : string
$column string A column name.
$value mixed A TEXT column value.
리턴 string The column value as plain string.

_delete() 보호된 메소드

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() 보호된 메소드

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

_exists() 보호된 메소드

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.
리턴 boolean True if the specified alarm exists.

_fromDriver() 보호된 메소드

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

_gc() 보호된 메소드

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

_get() 보호된 메소드

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
리턴 array An alarm hash.

_getHash() 보호된 메소드

protected _getHash ( array $alarm )
$alarm array

_global() 보호된 메소드

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

_isSnoozed() 보호된 메소드

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.
리턴 boolean True if the alarm is snoozed.

_list() 보호된 메소드

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.
리턴 array A list of alarm hashes.

_snooze() 보호된 메소드

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.

_toDriver() 보호된 메소드

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

_update() 보호된 메소드

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() 공개 메소드

Initialization tasks.
public initialize ( )

internal() 공개 메소드

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.

프로퍼티 상세

$_db 보호되어 있는 프로퍼티

Handle for the current database connection.
protected Horde_Db_Adapter $_db
리턴 Horde_Db_Adapter