Class Kronolith_Driver_sql

Description

The Kronolith_Driver_sql:: class implements the Kronolith_Driver API for a SQL backend.

$Horde: kronolith/lib/Driver/sql.php,v 1.136.2.48 2010/05/13 17:24:33 jan Exp $

Located in /lib/Driver/sql.php (line 13)

Kronolith_Driver
   |
   --Kronolith_Driver_sql
Variable Summary
 array $_cache
 DB $_db
Method Summary
 mixed convertFromDriver (mixed $value)
 mixed convertToDriver (mixed $value)
 mixed delete (string $calendar)
 mixed deleteEvent (string $eventId, [boolean $silent = false])
 string|boolean exists (string $uid, [string $calendar_id = null])
 Kronolith_Event &getByUID (string $uid, [array $calendars = null], [boolean $getAll = false])
 void &getEvent ([ $eventId = null])
 boolean initialize ()
 void listAlarms ( $date, [ $fullevent = false])
 array listEvents ([ $startDate = null], [ $endDate = null], [boolean $hasAlarm = false], Horde_Date $startInterval, Horde_Date $endInterval)
 array listEventsConditional ([Horde_Date $startInterval = null], [Horde_Date $endInterval = null], [string $conditions = ''], [array $vals = array()])
 void move (string $eventId, string $newCalendar)
 void removeUserData (string $user, mixed 1)
 void saveEvent ( &$event, Kronolith_Event $event)
 void search ( $query)
 void _initConn ( &$db)
Variables
array $_cache = array() (line 36)

Cache events as we fetch them to avoid fetching the same event from the DB twice.

DB $_db (line 20)

The object handle for the current database connection.

DB $_write_db (line 28)

Handle for the current database connection, used for writing. Defaults to the same handle as $_db if a separate write database is not required.

Inherited Variables

Inherited from Kronolith_Driver

Kronolith_Driver::$_calendar
Kronolith_Driver::$_errormsg
Kronolith_Driver::$_params
Methods
convertFromDriver (line 806)

Converts a value from the driver's charset to the default charset.

  • return: The converted value.
mixed convertFromDriver (mixed $value)
  • mixed $value: A value to convert.
convertToDriver (line 819)

Converts a value from the default charset to the driver's charset.

  • return: The converted value.
mixed convertToDriver (mixed $value)
  • mixed $value: A value to convert.
delete (line 641)

Delete a calendar and all its events.

  • return: True or a PEAR_Error on failure.
mixed delete (string $calendar)
  • string $calendar: The name of the calendar to delete.
deleteEvent (line 663)

Delete an event.

  • return: True or a PEAR_Error on failure.
mixed deleteEvent (string $eventId, [boolean $silent = false])
  • string $eventId: The ID of the event to delete.
  • boolean $silent: Don't send notifications, used when deleting events in bulk from maintenance tasks.
exists (line 203)

Checks if the event's UID already exists and returns all event ids with that UID.

  • return: Returns a string with event_id or false if not found.
string|boolean exists (string $uid, [string $calendar_id = null])
  • string $uid: The event's uid.
  • string $calendar_id: Calendar to search in.
getByUID (line 419)

Get an event or events with the given UID value.

Kronolith_Event &getByUID (string $uid, [array $calendars = null], [boolean $getAll = false])
  • string $uid: The UID to match
  • array $calendars: A restricted array of calendar ids to search
  • boolean $getAll: Return all matching events? If this is false, an error will be returned if more than one event is found.
getEvent (line 370)
void &getEvent ([ $eventId = null])
  • $eventId

Redefinition of:
Kronolith_Driver::getEvent()
Stub to be overridden in the child class.
initialize (line 712)

Attempts to open a connection to the SQL server.

  • return: True.
boolean initialize ()

Redefinition of:
Kronolith_Driver::initialize()
Stub to initiate a driver.
listAlarms (line 38)
void listAlarms ( $date, [ $fullevent = false])
  • $date
  • $fullevent

Redefinition of:
Kronolith_Driver::listAlarms()
Stub to be overridden in the child class.
listEvents (line 242)

Lists all events in the time range, optionally restricting results to only events with alarms.

  • return: Events in the given time range.
array listEvents ([ $startDate = null], [ $endDate = null], [boolean $hasAlarm = false], Horde_Date $startInterval, Horde_Date $endInterval)
  • Horde_Date $startInterval: Start of range date object.
  • Horde_Date $endInterval: End of range data object.
  • boolean $hasAlarm: Only return events with alarms? Defaults to all events.
  • $startDate
  • $endDate

Redefinition of:
Kronolith_Driver::listEvents()
Stub to be overridden in the child class.
listEventsConditional (line 275)

Lists all events that satisfy the given conditions.

  • return: Events in the given time range satisfying the given conditions.
array listEventsConditional ([Horde_Date $startInterval = null], [Horde_Date $endInterval = null], [string $conditions = ''], [array $vals = array()])
  • 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.
move (line 600)

Move an event to a new calendar.

void move (string $eventId, string $newCalendar)
  • string $eventId: The event to move.
  • string $newCalendar: The new calendar.
removeUserData (line 832)

Remove all events owned by the specified user in all calendars.

void removeUserData (string $user, mixed 1)
  • string $user: The user name to delete events for.
  • mixed 1: True | PEAR_Error

Redefinition of:
Kronolith_Driver::removeUserData()
Stub for child class to override if it can implement.
saveEvent (line 498)

Saves an event in the backend.

If it is a new event, it is added, otherwise the event is updated.

void saveEvent ( &$event, Kronolith_Event $event)

Redefinition of:
Kronolith_Driver::saveEvent()
Stub o be overridden in the child class.
search (line 103)
void search ( $query)
  • $query

Redefinition of:
Kronolith_Driver::search()
Searches a calendar.
_initConn (line 761)
void _initConn ( &$db)
  • &$db

Inherited Methods

Inherited From Kronolith_Driver

 Kronolith_Driver::Kronolith_Driver()
 Kronolith_Driver::factory()
 Kronolith_Driver::generateUID()
 Kronolith_Driver::getCalendar()
 Kronolith_Driver::getEvent()
 Kronolith_Driver::initialize()
 Kronolith_Driver::listAlarms()
 Kronolith_Driver::listEvents()
 Kronolith_Driver::nextRecurrence()
 Kronolith_Driver::open()
 Kronolith_Driver::removeUserData()
 Kronolith_Driver::rename()
 Kronolith_Driver::saveEvent()
 Kronolith_Driver::search()

Documentation generated on Sun, 30 Jan 2011 05:31:49 +0000 by phpDocumentor 1.4.3