Overview

Packages

  • Kronolith
  • None

Classes

  • Kronolith
  • Kronolith_Ajax_Application
  • Kronolith_Ajax_Imple_ContactAutoCompleter
  • Kronolith_Ajax_Imple_Embed
  • Kronolith_Ajax_Imple_TagActions
  • Kronolith_Ajax_Imple_TagAutoCompleter
  • Kronolith_Api
  • Kronolith_Calendar
  • Kronolith_Calendar_External
  • Kronolith_Calendar_External_Tasks
  • Kronolith_Calendar_Holiday
  • Kronolith_Calendar_Internal
  • Kronolith_Calendar_Remote
  • Kronolith_Calendar_Resource
  • Kronolith_Calendars_Base
  • Kronolith_Calendars_Default
  • Kronolith_Calendars_Kolab
  • Kronolith_Day
  • Kronolith_Driver
  • Kronolith_Driver_Holidays
  • Kronolith_Driver_Horde
  • Kronolith_Driver_Ical
  • Kronolith_Driver_Kolab
  • Kronolith_Driver_Mock
  • Kronolith_Driver_Resource
  • Kronolith_Driver_Sql
  • Kronolith_Event
  • Kronolith_Event_Holidays
  • Kronolith_Event_Horde
  • Kronolith_Event_Ical
  • Kronolith_Event_Kolab
  • Kronolith_Event_Resource
  • Kronolith_Event_Sql
  • Kronolith_Exception
  • Kronolith_Factory_Calendars
  • Kronolith_Factory_Geo
  • Kronolith_Form_CreateCalendar
  • Kronolith_Form_CreateResource
  • Kronolith_Form_CreateResourceGroup
  • Kronolith_Form_DeleteCalendar
  • Kronolith_Form_DeleteResource
  • Kronolith_Form_DeleteResourceGroup
  • Kronolith_Form_EditCalendar
  • Kronolith_Form_EditRemoteCalendar
  • Kronolith_Form_EditResource
  • Kronolith_Form_EditResourceGroup
  • Kronolith_Form_SubscribeRemoteCalendar
  • Kronolith_Form_UnsubscribeRemoteCalendar
  • Kronolith_FreeBusy
  • Kronolith_FreeBusy_View
  • Kronolith_FreeBusy_View_Day
  • Kronolith_FreeBusy_View_Month
  • Kronolith_FreeBusy_View_Week
  • Kronolith_FreeBusy_View_Workweek
  • Kronolith_Geo_Base
  • Kronolith_Geo_Mysql
  • Kronolith_Geo_Sql
  • Kronolith_LoginTasks_SystemTask_Upgrade
  • Kronolith_LoginTasks_Task_PurgeEvents
  • Kronolith_Notification_Listener_AjaxStatus
  • Kronolith_Resource
  • Kronolith_Resource_Base
  • Kronolith_Resource_Group
  • Kronolith_Resource_Single
  • Kronolith_Storage
  • Kronolith_Storage_Kolab
  • Kronolith_Storage_Sql
  • Kronolith_Tagger
  • Kronolith_Test
  • Kronolith_View_Day
  • Kronolith_View_DeleteEvent
  • Kronolith_View_EditEvent
  • Kronolith_View_Event
  • Kronolith_View_ExportEvent
  • Kronolith_View_Month
  • Kronolith_View_Week
  • Kronolith_View_WorkWeek
  • Kronolith_View_Year
  • Overview
  • Package
  • Class
  • Tree

Class Kronolith_Driver

Kronolith_Driver defines an API for implementing storage backends for Kronolith.

Copyright 1999-2012 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.

Direct known subclasses

Kronolith_Driver_Holidays, Kronolith_Driver_Horde, Kronolith_Driver_Ical, Kronolith_Driver_Kolab, Kronolith_Driver_Mock, Kronolith_Driver_Sql

Indirect known subclasses

Kronolith_Driver_Resource
Package: Kronolith
Author: Chuck Hagenbuch chuck@horde.org
Author: Jan Schneider jan@horde.org
Located at Driver.php
Methods summary
public
# __construct( array $params = array(), string $errormsg = null )

Constructor.

Constructor.

Just stores the $params in our newly-created object. All other work is done by Kronolith_Driver::initialize().

Parameters

$params
Any parameters needed for this driver.
$errormsg
A custom error message to use.
public mixed
# getParam( string $param )

Returns a configuration for this driver.

Returns a configuration for this driver.

Parameters

$param
A parameter name.

Returns

mixed
The parameter value or null if not set.
public
# setParam( string $param, mixed $value )

Sets a configuration for this driver.

Sets a configuration for this driver.

Parameters

$param
A parameter name.
$value
The parameter value.
public
# setParams( string $params )

Sets all configuration parameters for this driver.

Sets all configuration parameters for this driver.

Parameters

$params
A parameters hash.
public
# open( string $calendar )

Selects a calendar as the currently opened calendar.

Selects a calendar as the currently opened calendar.

Parameters

$calendar
A calendar identifier.
public string
# backgroundColor( )

Returns the background color of the current calendar.

Returns the background color of the current calendar.

Returns

string
The calendar color.
public array
# colors( )

Returns the colors of the current calendar.

Returns the colors of the current calendar.

Returns

array
The calendar background and foreground color.
public mixed
# search( object $query, boolean $json = false )

Searches a calendar.

Searches a calendar.

Parameters

$query
An object with the criteria to search for.
$json
Store the results of the events' toJson() method?

Returns

mixed
An array of Kronolith_Events.

Throws

Kronolith_Exception
public Horde_Date|boolean
# nextRecurrence( string $eventId, Horde_Date $afterDate )

Finds the next recurrence of $eventId that's after $afterDate.

Finds the next recurrence of $eventId that's after $afterDate.

Parameters

$eventId
The ID of the event to fetch.
$afterDate
Return events after this date.

Returns

Horde_Date|boolean

The date of the next recurrence or false if the event does not recur after $afterDate.

Throws

Kronolith_Exception
Horde_Exception_NotFound
public integer
# countEvents( )

Returns the number of events in the current calendar.

Returns the number of events in the current calendar.

Returns

integer
The number of events.

Throws

Kronolith_Exception
public
# initialize( )

Stub to initiate a driver.

Stub to initiate a driver.

Throws

Kronolith_Exception
public
# getEvent( )

Stub to be overridden in the child class.

Stub to be overridden in the child class.

Throws

Kronolith_Exception
Horde_Exception_NotFound
public
# getByUID( mixed $uid, mixed $calendars = null, mixed $getAll = false )

Stub to be overridden in the child class.

Stub to be overridden in the child class.

Throws

Kronolith_Exception
Horde_Exception_NotFound
public
# listAlarms( mixed $date, mixed $fullevent = false )

Stub to be overridden in the child class.

Stub to be overridden in the child class.

Throws

Kronolith_Exception
public
# listEvents( )

Stub to be overridden in the child class.

Stub to be overridden in the child class.

Throws

Kronolith_Exception
public string
# saveEvent( Kronolith_Event $event )

Saves an event in the backend.

Saves an event in the backend.

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

Parameters

$event
The event to save.

Returns

string
The event id.

Throws

Horde_Mime_Exception
Kronolith_Exception
public
# exists( mixed $uid, mixed $calendar_id = null )

Stub for child class to override if it can implement.

Stub for child class to override if it can implement.

Throws

Kronolith_Exception
public
# move( string $eventId, string $newCalendar )

Moves an event to a new calendar.

Moves an event to a new calendar.

Parameters

$eventId
The event to move.
$newCalendar
The new calendar.

Throws

Kronolith_Exception
Horde_Exception_NotFound
public
# delete( mixed $calendar )

Stub to be overridden in the child class.

Stub to be overridden in the child class.

Throws

Kronolith_Exception
public
# deleteEvent( mixed $eventId )

Stub to be overridden in the child class.

Stub to be overridden in the child class.

public
# filterEventsByCalendar( mixed $uids, mixed $calendar )

Stub to be overridden in the child class if it can implement.

Stub to be overridden in the child class if it can implement.

Throws

Kronolith_Exception
Properties summary
public string $calendar

The current calendar.

The current calendar.

#
public string $backgroundColor

The HTML background color to be used for this event.

The HTML background color to be used for this event.

# '#ddd'
public string $foregroundColor

The HTML foreground color to be used for this event.

The HTML foreground color to be used for this event.

# '#000'
API documentation generated by ApiGen