PHP 클래스 Kronolith_Api, horde

This file defines Kronolith's external API interface. Other applications can interact with Kronolith through this API.
상속: extends Horde_Registry_Api
파일 보기 프로젝트 열기: horde/horde

보호된 프로퍼티들

프로퍼티 타입 설명
$_links array Links.

공개 메소드들

메소드 설명
addCalendar ( string $name, array $params = [] ) : string Create a new calendar for the existing user.
browse ( string $path = '', array $properties = [] ) : array Browse through Kronolith's object tree.
checkLocks ( array $calendar, array $event = null ) Check for existing calendar or event locks.
delete ( string | array $uid, mixed $recurrenceId = null, string $range = null ) Deletes an event identified by UID.
deleteCalendar ( string $id ) Delete the specified calendar.
eventFromUID ( string $uid, $calendar = null ) : Kronolith_Event Retrieves a Kronolith_Event object, given an event UID.
export ( string $uid, string $contentType, array $options = [], array $calendars = null ) : string Exports an event, identified by UID, in the requested content type.
exportCalendar ( string $calendar, string $contentType ) : string Exports a calendar in the requested content type.
getActionTimestamp ( string $uid, string $action, string $calendar = null, boolean $modSeq = false ) : integer Returns the timestamp of an operation for a given uid an action
getAttachment ( string $calendar, string $uid, string $filename ) : array Return an event attachment.
getCalendar ( string $id = null ) : Kronolith_Calendar Return an internal calendar.
getChanges ( integer $start, integer $end, boolean $ignoreExceptions = true, boolean $isModSeq = false, string | array $calendars = null ) : array 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.
getChangesByModSeq ( integer $start, integer $end, string | array $calendars = null ) : array Return all changes occuring between the specified modification sequences.
getDefaultShare ( ) : string Retrieve the UID for the current user's default calendar.
getFbCalendars ( ) : array
getFreeBusy ( integer $startstamp = null, integer $endstamp = null, string $calendar = null ) : Horde_Icalendar_Vfreebusy Generates free/busy information for a given time period.
getHighestModSeq ( string $id = null ) : integer Return the largest modification sequence from the history backend.
import ( string $content, string $contentType, string $calendar = null, boolean $hash = false ) : array Imports an event represented in the specified content type.
listBy ( string $action, integer $timestamp, string $calendar = null, integer $end = null, boolean $isModSeq = false ) : array Returns an array of UIDs for events that have had $action happen since $timestamp.
listCalendars ( boolean $owneronly = false, integer $permission = null ) : array Returns all calendars a user has access to, according to several parameters/permission levels.
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, $fetchTags = false ) : array Lists events for a given time period.
listTagInfo ( array $tags = null, string $user = null ) : array Retrieve the list of used tag_names, tag_ids and the total number of resources that are linked to that tag.
listUids ( string | array $calendars = null, object $startstamp, object $endstamp ) : array Returns the ids of all the events that happen within a time period.
lock ( string $calendar, string $event = null ) : mixed Places an exclusive lock for a calendar or an event.
lookupFreeBusy ( string $email, boolean $json = false ) Attempt to lookup the free/busy information for the given email address.
modified ( string $uid, string $calendar = null ) : integer Returns the last modification timestamp for the given uid.
move ( string $uid, string $source, string $target ) Move an event.
path_delete ( string $path ) Deletes a file from the Kronolith tree.
put ( string $path, string $content, string $content_type ) : array Saves a file into the Kronolith tree.
quickAdd ( string $text, string $calendar = null ) : array Imports an event parsed from a string.
replace ( string $uid, mixed $content, string $contentType, string $calendar = null ) : mixed Replaces the event identified by UID with the content represented in the specified contentType.
searchTags ( array $names, integer $max = 10, integer $from, string $resource_type = '', string $user = null, boolean $raw = false ) : array SearchTags API: Returns an application-agnostic array (useful for when doing a tag search across multiple applications)
shareHelp ( ) : string Returns the share helper prefix
sources ( boolean $writeable = false, boolean $sync_only = false ) : array Returns a list of available sources.
subscribe ( array $calendar ) Subscribe to a calendar.
unlock ( array $calendar, array $lockid ) Releases a lock.
unsubscribe ( array $calendar ) Unsubscribe from a calendar.
updateAttendee ( Horde_Icalendar_Vevent $response, string $sender = null ) Updates an attendee's response status for a specified event.
updateCalendar ( string $id, array $info ) Update an internal calendar's information.

보호된 메소드들

메소드 설명
_addiCalEvent ( Horde_Icalendar_Vevent $content, Kronolith_Driver $driver, boolean $exception = false ) : string Imports a single vEvent part to storage.

메소드 상세

_addiCalEvent() 보호된 메소드

Imports a single vEvent part to storage.
protected _addiCalEvent ( Horde_Icalendar_Vevent $content, Kronolith_Driver $driver, boolean $exception = false ) : string
$content Horde_Icalendar_Vevent The vEvent part
$driver Kronolith_Driver The kronolith driver
$exception boolean Content represents an exception in a recurrence series.
리턴 string The new event's uid

addCalendar() 공개 메소드

Create a new calendar for the existing user.
부터: 4.2.0
public addCalendar ( string $name, array $params = [] ) : string
$name string The calendar's display name.
$params array
리턴 string The new calendar's UID.

browse() 공개 메소드

Browse through Kronolith's object tree.
public browse ( string $path = '', array $properties = [] ) : array
$path string The level of the tree to browse.
$properties array The item properties to return. Defaults to 'name', 'icon', and 'browseable'.
리턴 array The contents of $path

checkLocks() 공개 메소드

Check for existing calendar or event locks.
public checkLocks ( array $calendar, array $event = null )
$calendar array The calendar to check locks for.
$event array The event to check locks for.

delete() 공개 메소드

Deletes an event identified by UID.
public delete ( string | array $uid, mixed $recurrenceId = null, string $range = null )
$uid string | array A single UID or an array identifying the event(s) to delete.
$recurrenceId mixed The reccurenceId for the event instance, if this is a deletion of a recurring event instance ($uid must not be an array). Either a string or Horde_Date object.
$range string The range value if deleting a recurring event instance. Only supported values are null or Kronolith::RANGE_THISANDFUTURE. @since 4.1.5

deleteCalendar() 공개 메소드

Delete the specified calendar.
public deleteCalendar ( string $id )
$id string The calendar id.

eventFromUID() 공개 메소드

Retrieves a Kronolith_Event object, given an event UID.
public eventFromUID ( string $uid, $calendar = null ) : Kronolith_Event
$uid string The event's UID.
리턴 Kronolith_Event A valid Kronolith_Event.

export() 공개 메소드

Exports an event, identified by UID, in the requested content type.
public export ( string $uid, string $contentType, array $options = [], array $calendars = null ) : string
$uid string Identify the event to export.
$contentType string What format should the data be in? A string with one of:
 text/calendar (VCALENDAR 2.0. Recommended as
                this is specified in rfc2445)
 text/x-vcalendar (old VCALENDAR 1.0 format.
                  Still in wide use)
 activesync (Horde_ActiveSync_Message_Appointment)
$options array Any additional options to be passed to the exporter.
$calendars array Require event to be in these calendars. @since 4.2.0
리턴 string The requested data.

exportCalendar() 공개 메소드

Exports a calendar in the requested content type.
public exportCalendar ( string $calendar, string $contentType ) : string
$calendar string The calendar to export.
$contentType string What format should the data be in? A string with one of:
text/calendar (VCALENDAR 2.0. Recommended as
               this is specified in rfc2445)
text/x-vcalendar (old VCALENDAR 1.0 format.
                 Still in wide use)
리턴 string The iCalendar representation of the calendar.

getActionTimestamp() 공개 메소드

Returns the timestamp of an operation for a given uid an action
public getActionTimestamp ( string $uid, string $action, string $calendar = null, boolean $modSeq = false ) : integer
$uid string The uid to look for.
$action string The action to check for - add, modify, or delete.
$calendar string The calendar to search in.
$modSeq boolean Request a modification sequence instead of a timestamp. @since 4.1.1
리턴 integer The timestamp or modseq for this action.

getAttachment() 공개 메소드

Return an event attachment.
부터: 4.3.0
public getAttachment ( string $calendar, string $uid, string $filename ) : array
$calendar string The calendar ID.
$uid string The UID of the event the file is attached to.
$filename string The name of the file.
리턴 array An array containing the following keys: data (stream): A file pointer to the attachment data. content-type (string): The mime-type of the contents.

getCalendar() 공개 메소드

Return an internal calendar.
부터: 4.2.0
public getCalendar ( string $id = null ) : Kronolith_Calendar
$id string The calendar uid (share name).
리턴 Kronolith_Calendar The calendar object.

getChanges() 공개 메소드

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.
public getChanges ( integer $start, integer $end, boolean $ignoreExceptions = true, boolean $isModSeq = false, string | array $calendars = null ) : array
$start integer The starting timestamp
$end integer The ending timestamp.
$ignoreExceptions boolean Do not include exceptions in results.
$isModSeq boolean If true, $timestamp and $end are modification sequences and not timestamps. @since 4.1.1
$calendars string | array The sources to check. @since 4.2.0
리턴 array An hash with 'add', 'modify' and 'delete' arrays.

getChangesByModSeq() 공개 메소드

Return all changes occuring between the specified modification sequences.
부터: 4.1.1
public getChangesByModSeq ( integer $start, integer $end, string | array $calendars = null ) : array
$start integer The starting modseq.
$end integer The ending modseq.
$calendars string | array The sources to check. @since 4.2.0
리턴 array The changes @see getChanges()

getDefaultShare() 공개 메소드

Retrieve the UID for the current user's default calendar.
부터: 4.2.0
public getDefaultShare ( ) : string
리턴 string UID.

getFbCalendars() 공개 메소드

public getFbCalendars ( ) : array
리턴 array A list of calendars used to display free/busy information

getFreeBusy() 공개 메소드

Generates free/busy information for a given time period.
public getFreeBusy ( integer $startstamp = null, integer $endstamp = null, string $calendar = null ) : Horde_Icalendar_Vfreebusy
$startstamp integer The start of the time period to retrieve.
$endstamp integer The end of the time period to retrieve.
$calendar string The calendar to view free/busy slots for. Defaults to the user's default calendar.
리턴 Horde_Icalendar_Vfreebusy A freebusy object that covers the specified time period.

getHighestModSeq() 공개 메소드

Return the largest modification sequence from the history backend.
부터: 4.1.1
public getHighestModSeq ( string $id = null ) : integer
$id string The calendar id to return the hightest MDOSEQ for. If null, the highest MODSEQ across all calendars is returned. @since 4.2.0
리턴 integer The MODSEQ value.

import() 공개 메소드

Imports an event represented in the specified content type.
public import ( string $content, string $contentType, string $calendar = null, boolean $hash = false ) : array
$content string The content of the event.
$contentType string What format is the data in? Currently supports:
text/calendar
text/x-vcalendar
activesync
$calendar string What calendar should the event be added to?
$hash boolean If true, return a hash for EAS additions. @since 4.3.0 @todo Remove for 5.0 and make this the normal return.
리턴 array The event's UID.

listBy() 공개 메소드

Returns an array of UIDs for events that have had $action happen since $timestamp.
public listBy ( string $action, integer $timestamp, string $calendar = null, integer $end = null, boolean $isModSeq = false ) : array
$action string The action to check for - add, modify, or delete.
$timestamp integer The time to start the search.
$calendar string The calendar to search in.
$end integer The optional ending timestamp
$isModSeq boolean If true, $timestamp and $end are modification sequences and not timestamps. @since 4.1.1
리턴 array An array of UIDs matching the action and time criteria.

listCalendars() 공개 메소드

Returns all calendars a user has access to, according to several parameters/permission levels.
public listCalendars ( boolean $owneronly = false, integer $permission = null ) : array
$owneronly boolean Only return calendars that this user owns? Defaults to false.
$permission integer The permission to filter calendars by.
리턴 array The calendar list.

listEvents() 공개 메소드

Lists events for a given time period.
public 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, $fetchTags = false ) : array
$startstamp integer The start of the time period to retrieve.
$endstamp integer The end of the time period to retrieve.
$calendars array The calendars to view events from. Defaults to the user's default calendar.
$showRecurrence boolean Return every instance of a recurring event? If false, will only return recurring events once inside the $startDate - $endDate range.
$alarmsOnly boolean Filter results for events with alarms. Defaults to false.
$showRemote boolean Return events from remote calendars and listTimeObject API as well?
$hideExceptions boolean Hide events that represent exceptions to a recurring event (events with baseid set)?
$coverDates boolean Add multi-day events to all dates?
리턴 array A list of event hashes.

listTagInfo() 공개 메소드

Retrieve the list of used tag_names, tag_ids and the total number of resources that are linked to that tag.
public listTagInfo ( array $tags = null, string $user = null ) : array
$tags array An optional array of tag_ids. If omitted, all tags will be included.
$user string Restrict result to those tagged by $user.
리턴 array An array containing tag_name, and total

listUids() 공개 메소드

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.
public listUids ( string | array $calendars = null, object $startstamp, object $endstamp ) : array
$calendars string | array The calendar to check for events.
$startstamp object The start of the time range.
$endstamp object The end of the time range.
리턴 array The event ids happening in this time period.

lock() 공개 메소드

Places an exclusive lock for a calendar or an event.
public lock ( string $calendar, string $event = null ) : mixed
$calendar string The id of the calendar to lock
$event string The uid for the event to lock
리턴 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

lookupFreeBusy() 공개 메소드

Attempt to lookup the free/busy information for the given email address.
부터: 4.1.0
public lookupFreeBusy ( string $email, boolean $json = false )
$email string The email to lookup free/busy information for.
$json boolean Return the data in a simple json format. If false, returns the vCalander object.

modified() 공개 메소드

Returns the last modification timestamp for the given uid.
public modified ( string $uid, string $calendar = null ) : integer
$uid string The uid to look for.
$calendar string The calendar to search in.
리턴 integer The timestamp for the last modification of $uid.

move() 공개 메소드

Move an event.
부터: 4.3.0
public move ( string $uid, string $source, string $target )
$uid string The event UID.
$source string The source calendar's id.
$target string The target calendar's id.

path_delete() 공개 메소드

Deletes a file from the Kronolith tree.
public path_delete ( string $path )
$path string The path to the file.

put() 공개 메소드

Saves a file into the Kronolith tree.
public put ( string $path, string $content, string $content_type ) : array
$path string The path where to PUT the file.
$content string The file content.
$content_type string The file's content type.
리턴 array The event UIDs.

quickAdd() 공개 메소드

Imports an event parsed from a string.
public quickAdd ( string $text, string $calendar = null ) : array
$text string The text to parse into an event
$calendar string The calendar into which the event will be imported. If 'null', the user's default calendar will be used.
리턴 array The UID of all events that were added.

replace() 공개 메소드

Replaces the event identified by UID with the content represented in the specified contentType.
public replace ( string $uid, mixed $content, string $contentType, string $calendar = null ) : mixed
$uid string Idenfity the event to replace.
$content mixed The content of the event. String or Horde_Icalendar_Vevent
$contentType string What format is the data in? Currently supports: text/calendar text/x-vcalendar (Ignored if content is Horde_Icalendar_Vevent) activesync (Horde_ActiveSync_Message_Appointment)
$calendar string Ensure the event is replaced in the specified calendar. @since 4.2.0
리턴 mixed For EAS operations, an array of 'uid' and 'atchash' are returned. @since 4.3.0

searchTags() 공개 메소드

The 'raw' results array can be returned instead by setting $raw = true.
public searchTags ( array $names, integer $max = 10, integer $from, string $resource_type = '', string $user = null, boolean $raw = false ) : array
$names array An array of tag_names to search for.
$max integer The maximum number of resources to return.
$from integer The number of the resource to start with.
$resource_type string The resource type [event, calendar, '']
$user string Restrict results to resources owned by $user.
$raw boolean Return the raw data?
리턴 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.

shareHelp() 공개 메소드

Returns the share helper prefix
public shareHelp ( ) : string
리턴 string

sources() 공개 메소드

Returns a list of available sources.
부터: 4.2.0
public sources ( boolean $writeable = false, boolean $sync_only = false ) : array
$writeable boolean If true, limits to writeable sources.
$sync_only boolean Only include syncable sources.
리턴 array An array of the available sources. Keys are source IDs, values are source titles.

subscribe() 공개 메소드

Subscribe to a calendar.
public subscribe ( array $calendar )
$calendar array Calendar description hash, with required 'type' parameter. Currently supports 'http' and 'webcal' for remote calendars.

unlock() 공개 메소드

Releases a lock.
public unlock ( array $calendar, array $lockid )
$calendar array The event to lock.
$lockid array The lock id to unlock.

unsubscribe() 공개 메소드

Unsubscribe from a calendar.
public unsubscribe ( array $calendar )
$calendar array Calendar description array, with required 'type' parameter. Currently supports 'http' and 'webcal' for remote calendars.

updateAttendee() 공개 메소드

Updates an attendee's response status for a specified event.
public updateAttendee ( Horde_Icalendar_Vevent $response, string $sender = null )
$response Horde_Icalendar_Vevent A Horde_Icalendar_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.
$sender string The email address of the person initiating the update. Attendees are only updated if this address matches.

updateCalendar() 공개 메소드

Update an internal calendar's information.
부터: 4.2.0
public updateCalendar ( string $id, array $info )
$id string The calendar id.
$info array An array of calendar information. @see self::addCalendar()

프로퍼티 상세