Class Kronolith

Description

The Kronolith:: class provides functionality common to all of Kronolith.

Located in /lib/Kronolith.php (line 44)


	
			
Method Summary
 string addInlineScript (mixed $script)
 string attendeeList ()
 string buildStatusWidget (string $name, [string $current = KRONOLITH_STATUS_CONFIRMED], [string $any = false])
 integer countEvents ()
 string embedCode (string $calendar)
 void eventTabs (string $tabname, Kronolith_Event $event)
 string feedUrl (string $calendar)
 void getDefaultCalendar ([ $permission = PERMS_SHOW])
 void getMenu ([ $returnType = 'object'])
 mixed getRemoteCalendar (string $url)
 Kronolith_Event &getRemoteEventObject ($url $url, $eventId $eventId)
 void getUserEmail ( $uid)
 void getUserName ( $uid)
 void getView (string $view)
 mixed hasPermission (string $permission)
 void initialize ()
 void isUserEmail ( $uid,  $email)
 array listAlarms (Horde_Date $date, array $calendars, [boolean $fullevent = false])
 array listCalendars ([boolean $owneronly = false], [integer $permission = PERMS_SHOW])
 array listEventIds ([object $startDate = null], [object $endDate = null], [array $calendars = null], [boolean $alarmsOnly = false])
 array listEvents ([int|Horde_Date $startDate = null], [int|Horde_Date $endDate = null], [array $calendars = null], [boolean $showRecurrence = true], [boolean $alarmsOnly = false], [boolean $showRemote = true])
 array listHolidayEvents ([int|Horde_Date $startDate = null], [int|Horde_Date $endDate = null])
 void listRemoteEvents (string $url)
 integer loginTasksFlag ([integer $set = null])
 string outputInlineScript ()
 string partToString (integer $part)
 string recurToString (integer $type)
 string responseFromICal (string $response)
 string responseToString (integer $response)
 array search (object $query)
 void sendITipNotifications ( &$event,  &$notification, integer $action, [Horde_Date $instance = null], Kronolith_Event $event, Notification $notification)
 void sendNotification ( &$event, string $action, Kronolith_Event $event)
 string statusToString (integer $status)
 void tabs ([string $tabname = null])
 void viewShowTime ()
 void _addCoverDates ( &$results, Kronolith_Event $event, Horde_Date $eventStart, Horde_Date $eventEnd, array $result)
 void _sortEventStartTime ( $a,  $b)
Methods
addInlineScript (line 57)

Add inline javascript to the output buffer.

  • return: The javascript text to output, or empty if the page headers have not yet been sent.
  • since: Kronolith 2.2
string addInlineScript (mixed $script)
  • mixed $script: The script text to add (can be stored in an array also).
attendeeList (line 1422)

Returns a comma separated list of attendees.

  • return: Attendee list.
string attendeeList ()
buildStatusWidget (line 1296)

Builds the HTML for an event status widget.

  • return: The HTML <select> widget.
string buildStatusWidget (string $name, [string $current = KRONOLITH_STATUS_CONFIRMED], [string $any = false])
  • string $name: The name of the widget.
  • string $current: The selected status value.
  • string $any: Whether an 'any' item should be added
countEvents (line 1061)

Returns the number of events in calendars that the current user owns.

  • return: The number of events.
integer countEvents ()
currentTimestamp (line 1791)
void currentTimestamp ()
embedCode (line 1405)

Returs the HTML/javascript snippit needed to embed a calendar in an external website.

  • return: The calendar's embed snippit.
string embedCode (string $calendar)
  • string $calendar: A calendar name.
eventTabs (line 1873)
void eventTabs (string $tabname, Kronolith_Event $event)
feedUrl (line 1386)

Returns the feed URL for a calendar.

  • return: The calendar's feed URL.
string feedUrl (string $calendar)
  • string $calendar: A calendar name.
getDefaultCalendar (line 1359)

Returns the default calendar for the current user at the specified permissions level.

void getDefaultCalendar ([ $permission = PERMS_SHOW])
  • $permission
getMenu (line 2094)

Builds Kronolith's list of menu items.

void getMenu ([ $returnType = 'object'])
  • $returnType
getRemoteCalendar (line 443)

Fetches a remote calendar into the session and return the data.

  • return: Either the calendar data, or an error on failure.
mixed getRemoteCalendar (string $url)
  • string $url: The location of the remote calendar.
getRemoteEventObject (line 571)

Returns an event object for an event on a remote calendar.

This is kind of a temorary solution until we can have multiple drivers in use at the same time.

  • return: The event object.
Kronolith_Event &getRemoteEventObject ($url $url, $eventId $eventId)
  • $url $url: The url of the remote calendar.
  • $eventId $eventId: The index of the event on the remote calendar.
getUserEmail (line 1114)

Returns the email address, if available, of a user.

void getUserEmail ( $uid)
  • $uid
getUserName (line 1094)

Returns the real name, if available, of a user.

void getUserName ( $uid)
  • $uid
getView (line 1923)

Get a named Kronolith_View_* object and load it with the appropriate date parameters.

void getView (string $view)
  • string $view: The name of the view.
hasPermission (line 1820)

Returns the specified permission for the current user.

  • return: The value of the specified permission.
  • since: Kronolith 2.1
mixed hasPermission (string $permission)
  • string $permission: A permission, currently only 'max_events'.
initialize (line 202)

Initial app setup code.

void initialize ()
isUserEmail (line 1133)

Checks if an email address belongs to a user.

void isUserEmail ( $uid,  $email)
  • $uid
  • $email
listAlarms (line 150)

Returns all the alarms active right on $date.

  • return: The alarms active on $date.
array listAlarms (Horde_Date $date, array $calendars, [boolean $fullevent = false])
  • Horde_Date $date: The start of the time range.
  • array $calendars: The calendars to check for events.
  • boolean $fullevent: Whether to return complete alarm objects or only alarm IDs.
listCalendars (line 1338)

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

  • return: The calendar list.
array listCalendars ([boolean $owneronly = false], [integer $permission = PERMS_SHOW])
  • boolean $owneronly: Only return calenders that this user owns? Defaults to false.
  • integer $permission: The permission to filter calendars by.
listEventIds (line 110)

Returns all the events that happen each day within a time period.

  • return: The events happening in this time period.
array listEventIds ([object $startDate = null], [object $endDate = null], [array $calendars = null], [boolean $alarmsOnly = false])
  • object $startDate: The start of the time range.
  • object $endDate: The end of the time range.
  • array $calendars: The calendars to check for events.
  • boolean $alarmsOnly: Return only events with an alarm set
listEvents (line 645)

Returns all the events that happen each day within a time period

  • return: The events happening in this time period.
array listEvents ([int|Horde_Date $startDate = null], [int|Horde_Date $endDate = null], [array $calendars = null], [boolean $showRecurrence = true], [boolean $alarmsOnly = false], [boolean $showRemote = true])
  • int|Horde_Date $startDate: The start of the time range.
  • int|Horde_Date $endDate: The end of the time range.
  • array $calendars: The calendars to check for events.
  • boolean $showRecurrence: Return every instance of a recurring event? If false, will only return recurring events once inside the $startDate - $endDate range. Defaults to true
  • boolean $alarmsOnly: Filter results for events with alarms Defaults to false
  • boolean $showRemote: Return events from remote and listTimeObjects as well?
listHolidayEvents (line 615)

Returns a list of events containing holidays occuring between

  1. $startDate
and
  1. $endDate
. The outcome depends on the user's selection of holiday drivers

  • return: The matching holidays as an array.
array listHolidayEvents ([int|Horde_Date $startDate = null], [int|Horde_Date $endDate = null])
  • int|Horde_Date $startDate: The start of the datespan to be checked.
  • int|Horde_Date $endDate: The end of the datespan.
listRemoteEvents (line 504)

Returns all the events from a remote calendar.

void listRemoteEvents (string $url)
  • string $url: The url of the remote calendar.
loginTasksFlag (line 426)

Either sets or checks the value of the logintasks flag.

  • return: The value of the flag.
    1. = No login tasks pending
    2. = Login tasks pending
    3. = Login tasks pending, previous tasks interrupted
integer loginTasksFlag ([integer $set = null])
  • integer $set: The value of the flag.
outputInlineScript (line 87)

Print inline javascript to the output buffer.

  • return: The javascript text to output.
  • since: Kronolith 2.2
string outputInlineScript ()
partToString (line 1246)

Maps a Kronolith attendee participation string to a translated string suitable for display.

  • return: The translated displayable attendee participation string.
string partToString (integer $part)
  • integer $part: The attendee participation; one of the KRONOLITH_PART_XXX constants.
recurToString (line 1159)

Maps a Kronolith recurrence value to a translated string suitable for display.

  • return: The translated displayable recurrence value string.
string recurToString (integer $type)
  • integer $type: The recurrence value; one of the HORDE_DATE_RECUR_XXX constants.
responseFromICal (line 1269)

Maps an iCalendar attendee response string to the corresponding Kronolith value.

  • return: The Kronolith response value.
string responseFromICal (string $response)
  • string $response: The attendee response.
responseToString (line 1218)

Maps a Kronolith attendee response string to a translated string suitable for display.

  • return: The translated displayable attendee response string.
string responseToString (integer $response)
  • integer $response: The attendee response; one of the KRONOLITH_RESPONSE_XXX constants.
search (line 175)

Search for events with the given properties

  • return: The events
array search (object $query)
  • object $query: The search query
sendITipNotifications (line 1452)

Sends out iTip event notifications to all attendees of a specific event. Can be used to send event invitations, event updates as well as event cancellations.

void sendITipNotifications ( &$event,  &$notification, integer $action, [Horde_Date $instance = null], Kronolith_Event $event, Notification $notification)
  • Kronolith_Event $event: The event in question.
  • Notification $notification: A notification object used to show result status.
  • integer $action: The type of notification to send. One of the KRONOLITH_ITIP_* values.
  • Horde_Date $instance: If cancelling a single instance of a recurring event, the date of this intance.
  • &$event
  • &$notification
sendNotification (line 1610)

Sends email notifications that a event has been added, edited, or deleted to users that want such notifications.

void sendNotification ( &$event, string $action, Kronolith_Event $event)
  • Kronolith_Event $event: An event.
  • string $action: The event action. One of "add", "edit", or "delete".
  • &$event
statusToString (line 1191)

Maps a Kronolith meeting status string to a translated string suitable for display.

  • return: The translated displayable meeting status string.
string statusToString (integer $status)
  • integer $status: The meeting status; one of the KRONOLITH_STATUS_XXX constants.
tabs (line 1843)
void tabs ([string $tabname = null])
  • string $tabname
viewShowLocation (line 2067)

Should we show event location, based on the show_location

preference and $print_view?

void viewShowLocation ()
viewShowTime (line 2081)

Should we show event time, based on the show_time preference

and $print_view?

void viewShowTime ()
_addCoverDates (line 1034)

Adds an event to all the days it covers.

void _addCoverDates ( &$results, Kronolith_Event $event, Horde_Date $eventStart, Horde_Date $eventEnd, array $result)
  • array $result: The current result list.
  • Kronolith_Event $event: An event object.
  • Horde_Date $eventStart: The event's start at the actual recurrence.
  • Horde_Date $eventEnd: The event's end at the actual recurrence.
  • &$results
_sortEventStartTime (line 2140)

Used with usort() to sort events based on their start times.

void _sortEventStartTime ( $a,  $b)
  • $a
  • $b

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