$calendar
$calendar : string
The current calendar.
The Kronolith_Driver_Sql class implements the Kronolith_Driver API for a SQL backend.
Copyright 1999-2017 Horde LLC (http://www.horde.org/)
See the enclosed file LICENSE for license information (GPL). If you did not receive this file, see http://www.horde.org/licenses/gpl.
nextRecurrence(string $eventId, \Horde_Date $afterDate) : \Horde_Date|boolean
Finds the next recurrence of $eventId that's after $afterDate.
string | $eventId | The ID of the event to fetch. |
\Horde_Date | $afterDate | Return events after this date. |
The date of the next recurrence or false if the event does not recur after $afterDate.
getByUID(string $uid, array $calendars = null, boolean $getAll = false) : \Kronolith_Event
Get an event or events with the given UID value.
string | $uid | The UID to match |
array | $calendars | A restricted array of calendar ids to search |
boolean | $getAll | Return all matching events? |
listAlarms(\Horde_Date $date, boolean $fullevent = false) : array
Stub to be overridden in the child class.
\Horde_Date | $date | The date to list alarms for |
boolean | $fullevent | Return the full event objects? |
An array of event ids, or Kronolith_Event objects
listEvents(\Horde_Date $startDate = null, \Horde_Date $endDate = null, array $options = array())
Lists all events in the time range, optionally restricting results to only events with alarms.
\Horde_Date | $startDate | The start of range date. |
\Horde_Date | $endDate | The end of date range. |
array | $options | Additional options:
|
saveEvent(\Kronolith_Event $event) : string
Saves an event in the backend.
If it is a new event, it is added, otherwise the event is updated.
\Kronolith_Event | $event | The event to save. |
The event id.
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.
string | $uid | The event's uid. |
string | $calendar_id | Calendar to search in. |
Returns a string with event_id or false if not found.
deleteEvent(mixed $eventId, boolean $silent = false)
Deletes an event.
mixed | $eventId | Either the event id to delete, or the event object. |
boolean | $silent | Don't send notifications, used when deleting events in bulk from maintenance tasks. |
filterEventsByCalendar(array $uids, array $calendar) : array
Filters a list of events to return only those that belong to certain calendars.
array | $uids | A list of event UIDs. |
array | $calendar | A list of calendar IDs. |
Event UIDs filtered by calendar IDs.
synchronize(boolean $force = false, string $token = false)
Synchronize if driver needs to.
boolean | $force | If true, forces synchronization, even if we have already done so. |
string | $token | A synchroniziation token, if available. |
None found |
convertFromDriver(mixed $value) : mixed
Converts a value from the driver's charset to the default charset.
mixed | $value | A value to convert. |
The converted value.
None found |
convertToDriver(mixed $value) : mixed
Converts a value from the default charset to the driver's charset.
mixed | $value | A value to convert. |
The converted value.
None found |
convertBlobs(array $event) : array
Converts TEXT/CLOB fields in an event.
array | $event | An event hash with TEXT/CLOB columns. |
The event with TEXT/CLOB columns converted to strings.
None found |
_listEvents(\Horde_Date $startDate = null, \Horde_Date $endDate = null, array $options = array())
Lists all events in the time range, optionally restricting results to only events with alarms.
\Horde_Date | $startDate | The start of range date. |
\Horde_Date | $endDate | The end of date range. |
array | $options | Additional options:
|
None found |
_addEvent(\Kronolith_Event $event) : string
Adds an event to the backend.
\Kronolith_Event | $event | The event to save. |
The event id.
None found |
_updateEvent(\Kronolith_Event $event) : string
Updates an existing event in the backend.
\Kronolith_Event | $event | The event to save. |
The event id.
None found |
_move(string $eventId, string $newCalendar) : \Kronolith_Event
Moves an event to a new calendar.
string | $eventId | The event to move. |
string | $newCalendar | The new calendar. |
The old event.
None found |
_deleteEvent(string $eventId, boolean $silent = false) : \Kronolith_Event
Deletes an event.
string | $eventId | The ID of the event to delete. |
boolean | $silent | Don't send notifications, used when deleting events in bulk from maintenance tasks. |
Returns the deleted event.
None found |
_handleNotifications(\Kronolith_Event $event, string $action)
Wrapper for sending notifications, so that we can overwrite this action in Kronolith_Driver_Resource.
\Kronolith_Event | $event | |
string | $action |
None found |
_updateTags(\Kronolith_Event $event)
Helper function to update an existing event's tags to tagger storage.
\Kronolith_Event | $event | The event to update |
None found |
_addTags(\Kronolith_Event $event)
Helper function to add tags from a newly creted event to the tagger.
\Kronolith_Event | $event | The event to save tags to storage for. |
None found |
_buildEventHistory(\Kronolith_Event $event) : array
Builds a history hash for a modified event.
We don't write it in here because we don't want to commit history before the actual changes are made.
\Kronolith_Event | $event | The event to log. |
The change log.
None found |
_listEventsConditional(\Horde_Date $startInterval = null, \Horde_Date $endInterval = null, string $conditions = '', array $vals = array()) : array
Lists all events that satisfy the given conditions.
\Horde_Date | $startInterval | Start of range date object. |
\Horde_Date | $endInterval | End of range data object. |
string | $conditions | Conditions, given as SQL clauses. |
array | $vals | SQL bind variables for use with $conditions clauses. |
Events in the given time range satisfying the given conditions.
None found |