PHP 클래스 Kronolith_Driver_Sql, horde

Copyright 1999-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (GPL). If you did not receive this file, see http://www.horde.org/licenses/gpl.
저자: Luc Saillard ([email protected])
저자: Chuck Hagenbuch ([email protected])
저자: Jan Schneider ([email protected])
상속: extends Kronolith_Driver
파일 보기 프로젝트 열기: horde/horde

보호된 프로퍼티들

프로퍼티 타입 설명
$_cache array Cache events as we fetch them to avoid fetching the same event from the DB twice.
$_columns array Column information as Horde_Db_Adapter_Base_Column objects.
$_db Horde_Db_Adapter The object handle for the current database connection.
$_eventClass string Can be overwritten by sub-classes.

공개 메소드들

메소드 설명
backgroundColor ( ) : string Returns the background color of the current calendar.
convertBlobs ( array $event ) : array Converts TEXT/CLOB fields in an event.
convertFromDriver ( mixed $value ) : mixed Converts a value from the driver's charset to the default charset.
convertToDriver ( mixed $value ) : mixed Converts a value from the default charset to the driver's charset.
countEvents ( ) : integer Returns the number of events in the current calendar.
delete ( string $calendar ) Delete all of a calendar's events.
exists ( string $uid, string $calendar_id = null ) : string | boolean Checks if the event's UID already exists and returns all event ids with that UID.
filterEventsByCalendar ( array $uids, array $calendar ) : array Filters a list of events to return only those that belong to certain calendars.
getByUID ( string $uid, array $calendars = null, boolean $getAll = false ) : Kronolith_Event Get an event or events with the given UID value.
getEvent ( $eventId = null )
initialize ( ) Attempts to open a connection to the SQL server.
listAlarms ( Horde_Date $date, boolean $fullevent = false ) : array
search ( object $query, boolean $json = false ) : mixed Searches a calendar.
supportsTimezones ( ) : boolean Returns whether this driver supports per-event timezones.

보호된 메소드들

메소드 설명
_addEvent ( Kronolith_Event $event ) : string Adds an event to the backend.
_buildEventHistory ( Kronolith_Event $event ) : array Builds a history hash for a modified event.
_deleteEvent ( string $eventId, boolean $silent = false ) Deletes an event.
_listEvents ( Horde_Date $startDate = null, Horde_Date $endDate = null, array $options = [] ) Lists all events in the time range, optionally restricting results to only events with alarms.
_move ( string $eventId, string $newCalendar ) : Kronolith_Event Moves an event to a new calendar.
_updateEvent ( Kronolith_Event $event ) : string Updates an existing event in the backend.

비공개 메소드들

메소드 설명
_listEventsConditional ( Horde_Date $startInterval = null, Horde_Date $endInterval = null, string $conditions = '', array $vals = [] ) : array Lists all events that satisfy the given conditions.

메소드 상세

_addEvent() 보호된 메소드

Adds an event to the backend.
protected _addEvent ( Kronolith_Event $event ) : string
$event Kronolith_Event The event to save.
리턴 string The event id.

_buildEventHistory() 보호된 메소드

We don't write it in here because we don't want to commit history before the actual changes are made.
protected _buildEventHistory ( Kronolith_Event $event ) : array
$event Kronolith_Event The event to log.
리턴 array The change log.

_deleteEvent() 보호된 메소드

Deletes an event.
protected _deleteEvent ( string $eventId, boolean $silent = false )
$eventId string The ID of the event to delete.
$silent boolean Don't send notifications, used when deleting events in bulk from maintenance tasks.

_listEvents() 보호된 메소드

Lists all events in the time range, optionally restricting results to only events with alarms.
protected _listEvents ( Horde_Date $startDate = null, Horde_Date $endDate = null, array $options = [] )
$startDate Horde_Date The start of range date.
$endDate Horde_Date The end of date range.
$options array Additional options: - show_recurrence: (boolean) Return every instance of a recurring event? DEFAULT: false (Only return recurring events once inside $startDate - $endDate range) - has_alarm: (boolean) Only return events with alarms. DEFAULT: false (Return all events) - json: (boolean) Store the results of the event's toJson() method? DEFAULT: false - cover_dates: (boolean) Add the events to all days that they cover? DEFAULT: true - hide_exceptions: (boolean) Hide events that represent exceptions to a recurring event. DEFAULT: false (Do not hide exception events) - fetch_tags: (boolean) Fetch tags for all events. DEFAULT: false (Do not fetch event tags)

_move() 보호된 메소드

Moves an event to a new calendar.
protected _move ( string $eventId, string $newCalendar ) : Kronolith_Event
$eventId string The event to move.
$newCalendar string The new calendar.
리턴 Kronolith_Event The old event.

_updateEvent() 보호된 메소드

Updates an existing event in the backend.
protected _updateEvent ( Kronolith_Event $event ) : string
$event Kronolith_Event The event to save.
리턴 string The event id.

backgroundColor() 공개 메소드

Returns the background color of the current calendar.
public backgroundColor ( ) : string
리턴 string The calendar color.

convertBlobs() 공개 메소드

Converts TEXT/CLOB fields in an event.
public convertBlobs ( array $event ) : array
$event array An event hash with TEXT/CLOB columns.
리턴 array The event with TEXT/CLOB columns converted to strings.

convertFromDriver() 공개 메소드

Converts a value from the driver's charset to the default charset.
public convertFromDriver ( mixed $value ) : mixed
$value mixed A value to convert.
리턴 mixed The converted value.

convertToDriver() 공개 메소드

Converts a value from the default charset to the driver's charset.
public convertToDriver ( mixed $value ) : mixed
$value mixed A value to convert.
리턴 mixed The converted value.

countEvents() 공개 메소드

Returns the number of events in the current calendar.
public countEvents ( ) : integer
리턴 integer The number of events.

delete() 공개 메소드

Delete all of a calendar's events.
public delete ( string $calendar )
$calendar string The name of the calendar to delete.

exists() 공개 메소드

Checks if the event's UID already exists and returns all event ids with that UID.
public exists ( string $uid, string $calendar_id = null ) : string | boolean
$uid string The event's uid.
$calendar_id string Calendar to search in.
리턴 string | boolean Returns a string with event_id or false if not found.

filterEventsByCalendar() 공개 메소드

Filters a list of events to return only those that belong to certain calendars.
public filterEventsByCalendar ( array $uids, array $calendar ) : array
$uids array A list of event UIDs.
$calendar array A list of calendar IDs.
리턴 array Event UIDs filtered by calendar IDs.

getByUID() 공개 메소드

Get an event or events with the given UID value.
public getByUID ( string $uid, array $calendars = null, boolean $getAll = false ) : Kronolith_Event
$uid string The UID to match
$calendars array A restricted array of calendar ids to search
$getAll boolean Return all matching events?
리턴 Kronolith_Event

getEvent() 공개 메소드

public getEvent ( $eventId = null )

initialize() 공개 메소드

Attempts to open a connection to the SQL server.
public initialize ( )

listAlarms() 공개 메소드

public listAlarms ( Horde_Date $date, boolean $fullevent = false ) : array
$date Horde_Date The date to list alarms for
$fullevent boolean Return the full event objects?
리턴 array An array of event ids, or Kronolith_Event objects

supportsTimezones() 공개 메소드

Returns whether this driver supports per-event timezones.
public supportsTimezones ( ) : boolean
리턴 boolean Whether this drivers suppports per-event timezones.

프로퍼티 상세

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

Cache events as we fetch them to avoid fetching the same event from the DB twice.
protected array $_cache
리턴 array

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

Column information as Horde_Db_Adapter_Base_Column objects.
protected array $_columns
리턴 array

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

The object handle for the current database connection.
protected Horde_Db_Adapter $_db
리턴 Horde_Db_Adapter

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

Can be overwritten by sub-classes.
protected string $_eventClass
리턴 string