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_Api

Kronolith external API interface.

This file defines Kronolith's external API interface. Other applications can interact with Kronolith through this API.

Horde_Registry_Api
Extended by Kronolith_Api
Package: Kronolith
Located at Api.php
Methods summary
public string
# shareHelp( )

Returns the share helper prefix

Returns the share helper prefix

Returns

string
public integer
# modified( string $uid )

Returns the last modification timestamp for the given uid.

Returns the last modification timestamp for the given uid.

Parameters

$uid
The uid to look for.

Returns

integer
The timestamp for the last modification of $uid.
public array
# browse( string $path = '', array $properties = array() )

Browse through Kronolith's object tree.

Browse through Kronolith's object tree.

Parameters

$path
The level of the tree to browse.
$properties
<p>The item properties to return. Defaults to 'name', 'icon', and 'browseable'.</p>

Returns

array
The contents of $path

Throws

Kronolith_Exception
public array
# put( string $path, string $content, string $content_type )

Saves a file into the Kronolith tree.

Saves a file into the Kronolith tree.

Parameters

$path
The path where to PUT the file.
$content
The file content.
$content_type
The file's content type.

Returns

array
The event UIDs.

Throws

Kronolith_Exception
public
# path_delete( string $path )

Deletes a file from the Kronolith tree.

Deletes a file from the Kronolith tree.

Parameters

$path
The path to the file.

Throws

Kronolith_Exception
public array
# listCalendars( boolean $owneronly = false, integer $permission = null )

Returns all calendars a user has access to, according to several parameters/permission levels.

Returns all calendars a user has access to, according to several parameters/permission levels.

Parameters

$owneronly
<p>Only return calenders that this user owns? Defaults to false.</p>
$permission
The permission to filter calendars by.

Returns

array
The calendar list.
public array
# listUids( string $calendars = null, object $startstamp = 0, object $endstamp = 0 )

Returns the ids of all the events that happen within a time period. Only includes recurring events once per time period, and does not include events that represent exceptions, making this method useful for syncing purposes. For more control, use the listEvents method.

Returns the ids of all the events that happen within a time period. Only includes recurring events once per time period, and does not include events that represent exceptions, making this method useful for syncing purposes. For more control, use the listEvents method.

Parameters

$calendars
The calendar to check for events.
$startstamp
The start of the time range.
$endstamp
The end of the time range.

Returns

array
The event ids happening in this time period.

Throws

Kronolith_Exception
public array
# listBy( string $action, integer $timestamp, string $calendar = null, integer $end = null )

Returns an array of UIDs for events that have had $action happen since $timestamp.

Returns an array of UIDs for events that have had $action happen since $timestamp.

Parameters

$action
The action to check for - add, modify, or delete.
$timestamp
The time to start the search.
$calendar
The calendar to search in.
$end
The optional ending timestamp

Returns

array
An array of UIDs matching the action and time criteria.

Throws

Kronolith_Exception
Horde_History_Exception
InvalidArgumentException
public array
# getChanges( integer $start, integer $end, boolean $ignoreExceptions = true )

Method for obtaining all server changes between two timestamps. Basically a wrapper around listBy(), but returns an array containing all adds, edits and deletions. If $ignoreExceptions is true, events representing recurring event exceptions will not be included in the results.

Method for obtaining all server changes between two timestamps. Basically a wrapper around listBy(), but returns an array containing all adds, edits and deletions. If $ignoreExceptions is true, events representing recurring event exceptions will not be included in the results.

Parameters

$start
The starting timestamp
$end
The ending timestamp.
$ignoreExceptions
Do not include exceptions in results.

Returns

array
An hash with 'add', 'modify' and 'delete' arrays.

Throws

Horde_Exception_PermissionDenied
Kronolith_Exception
public integer
# getActionTimestamp( string $uid, string $action, string $calendar = null )

Returns the timestamp of an operation for a given uid an action

Returns the timestamp of an operation for a given uid an action

Parameters

$uid
The uid to look for.
$action
The action to check for - add, modify, or delete.
$calendar
The calendar to search in.

Returns

integer
The timestamp for this action.

Throws

Kronolith_Exception
InvalidArgumentException
public array
# import( string $content, string $contentType, string $calendar = null )

Imports an event represented in the specified content type.

Imports an event represented in the specified content type.

Parameters

$content
The content of the event.
$contentType
What format is the data in? Currently supports: <pre>text/calendar text/x-vcalendar</pre>
$calendar
What calendar should the event be added to?

Returns

array
The event's UID.

Throws

Kronolith_Exception
public array
# quickAdd( string $text, string $calendar = null )

Imports an event parsed from a string.

Imports an event parsed from a string.

Parameters

$text
The text to parse into an event
$calendar
<p>The calendar into which the event will be imported. If 'null', the user's default calendar will be used.</p>

Returns

array
The UID of all events that were added.

Throws

Kronolith_Exception
public string
# export( string $uid, string $contentType )

Exports an event, identified by UID, in the requested content type.

Exports an event, identified by UID, in the requested content type.

Parameters

$uid
Identify the event to export.
$contentType
<p>What format should the data be in? A string with one of:</p> <pre>text/calendar (VCALENDAR <span class="php-num">2.0</span>. Recommended <span class="php-keyword1">as</span> this is specified in rfc2445) text/x-vcalendar (old VCALENDAR <span class="php-num">1.0</span> format. Still in wide <span class="php-keyword1">use</span>)</pre>

Returns

string
The requested data.

Throws

Kronolith_Exception
Horde_Exception_NotFound
public string
# exportCalendar( string $calendar, string $contentType )

Exports a calendar in the requested content type.

Exports a calendar in the requested content type.

Parameters

$calendar
The calendar to export.
$contentType
<p>What format should the data be in? A string with one of:</p> <pre>text/calendar (VCALENDAR <span class="php-num">2.0</span>. Recommended <span class="php-keyword1">as</span> this is specified in rfc2445) text/x-vcalendar (old VCALENDAR <span class="php-num">1.0</span> format. Still in wide <span class="php-keyword1">use</span>)</pre>

Returns

string
The iCalendar representation of the calendar.

Throws

Kronolith_Exception
public
# delete( string|array $uid, string $recurrenceId = null )

Deletes an event identified by UID.

Deletes an event identified by UID.

Parameters

$uid
<p>A single UID or an array identifying the event(s) to delete.</p>
$recurrenceId
<p>The reccurenceId for the event instance, if this is a deletion of a recurring event instance ($uid must not be an array).</p>

Throws

Kronolith_Exception
public
# replace( string $uid, mixed $content, string $contentType )

Replaces the event identified by UID with the content represented in the specified contentType.

Replaces the event identified by UID with the content represented in the specified contentType.

Parameters

$uid
Idenfity the event to replace.
$content
<p>The content of the event. String or Horde_Icalendar_Vevent</p>
$contentType
<p>What format is the data in? Currently supports: text/calendar text/x-vcalendar (Ignored if content is Horde_Icalendar_Vevent)</p>

Throws

Kronolith_Exception
public Horde_Icalendar_Vfreebusy
# getFreeBusy( integer $startstamp = null, integer $endstamp = null, string $calendar = null )

Generates free/busy information for a given time period.

Generates free/busy information for a given time period.

Parameters

$startstamp
The start of the time period to retrieve.
$endstamp
The end of the time period to retrieve.
$calendar
<p>The calendar to view free/busy slots for. Defaults to the user's default calendar.</p>

Returns

Horde_Icalendar_Vfreebusy

A freebusy object that covers the specified time period.

Throws

Kronolith_Exception
public Kronolith_Event
# eventFromUID( string $uid )

Retrieves a Kronolith_Event object, given an event UID.

Retrieves a Kronolith_Event object, given an event UID.

Parameters

$uid
The event's UID.

Returns

Kronolith_Event
A valid Kronolith_Event.

Throws

Kronolith_Exception
public
# updateAttendee( Horde_Icalender_Vevent $response, string $sender = null )

Updates an attendee's response status for a specified event.

Updates an attendee's response status for a specified event.

Parameters

$response
<p>A Horde_Icalender_Vevent object, with a valid UID attribute that points to an existing event. This is typically the vEvent portion of an iTip meeting-request response, with the attendee's response in an ATTENDEE parameter.</p>
$sender
<p>The email address of the person initiating the update. Attendees are only updated if this address matches.</p>

Throws

Kronolith_Exception
public array
# listEvents( integer $startstamp = null, integer $endstamp = null, array $calendars = null, boolean $showRecurrence = true, boolean $alarmsOnly = false, boolean $showRemote = true, boolean $hideExceptions = false, boolean $coverDates = true, mixed $fetchTags = false )

Lists events for a given time period.

Lists events for a given time period.

Parameters

$startstamp
<p>The start of the time period to retrieve.</p>
$endstamp
The end of the time period to retrieve.
$calendars
<p>The calendars to view events from. Defaults to the user's default calendar.</p>
$showRecurrence
<p>Return every instance of a recurring event? If false, will only return recurring events once inside the $startDate - $endDate range.</p>
$alarmsOnly
<p>Filter results for events with alarms. Defaults to false.</p>
$showRemote
<p>Return events from remote calendars and listTimeObject API as well?</p>
$hideExceptions
<p>Hide events that represent exceptions to a recurring event (events with baseid set)?</p>
$coverDates
Add multi-day events to all dates?
$fetchTags

Returns

array
A list of event hashes.

Throws

Kronolith_Exception
public
# subscribe( array $calendar )

Subscribe to a calendar.

Subscribe to a calendar.

Parameters

$calendar
<p>Calendar description hash, with required 'type' parameter. Currently supports 'http' and 'webcal' for remote calendars.</p>

Throws

Kronolith_Exception
public
# unsubscribe( array $calendar )

Unsubscribe from a calendar.

Unsubscribe from a calendar.

Parameters

$calendar
<p>Calendar description array, with required 'type' parameter. Currently supports 'http' and 'webcal' for remote calendars.</p>

Throws

Kronolith_Exception
public mixed
# lock( string $calendar, string $event = null )

Places an exclusive lock for a calendar or an event.

Places an exclusive lock for a calendar or an event.

Parameters

$calendar
The id of the calendar to lock
$event
The uid for the event to lock

Returns

mixed

A lock ID on success, false if: - The calendar is already locked - The event is already locked - A calendar lock was requested and an event is already locked in the calendar

Throws

Kronolith_Exception
public
# unlock( array $calendar, array $lockid )

Releases a lock.

Releases a lock.

Parameters

$calendar
The event to lock.
$lockid
The lock id to unlock.

Throws

Kronolith_Exception
public
# checkLocks( array $calendar, array $event = null )

Check for existing calendar or event locks.

Check for existing calendar or event locks.

Parameters

$calendar
The calendar to check locks for.
$event
The event to check locks for.

Throws

Kronolith_Exception
public array
# getFbCalendars( )

Returns

array
A list of calendars used to display free/busy information
public array
# listTagInfo( array $tags = null, string $user = null )

Retrieve the list of used tag_names, tag_ids and the total number of resources that are linked to that tag.

Retrieve the list of used tag_names, tag_ids and the total number of resources that are linked to that tag.

Parameters

$tags
<p>An optional array of tag_ids. If omitted, all tags will be included.</p>
$user
Restrict result to those tagged by $user.

Returns

array
An array containing tag_name, and total
public array
# searchTags( array $names, integer $max = 10, integer $from = 0, string $resource_type = '', string $user = null, boolean $raw = false )

SearchTags API: Returns an application-agnostic array (useful for when doing a tag search across multiple applications)

SearchTags API: Returns an application-agnostic array (useful for when doing a tag search across multiple applications)

The 'raw' results array can be returned instead by setting $raw = true.

Parameters

$names
An array of tag_names to search for.
$max
The maximum number of resources to return.
$from
The number of the resource to start with.
$resource_type
The resource type [event, calendar, '']
$user
Restrict results to resources owned by $user.
$raw
Return the raw data?

Returns

array
An array of results:
'title'    - The title for this resource.
 'desc'     - A terse description of this resource.
 'view_url' - The URL to view this resource.
 'app'      - The Horde application this resource belongs to.
Properties summary
public array $links

Links.

Links.

# array( 'show' => '%application%/event.php?calendar=|calendar|&eventID=|event|&uid=|uid|' )
API documentation generated by ApiGen