$calendar
$calendar : string
The current calendar.
The Kronolith_Driver_Resource class implements the Kronolith_Driver API for storing resource calendars.
Copyright 1999-2017 Horde LLC (http://www.horde.org/)
See the enclosed file LICENSE for license information (GPL). If you did not receive this file, see http://www.horde.org/licenses/gpl.
$_driver : \Kronolith_Driver
The main event storage driver.
search(object $query, boolean $json = false) : array
Searches a calendar.
object | $query | An object with the criteria to search for. |
boolean | $json | Store the results of the events' toJson() method? |
An array of search results keyed by date, with each date containing an array of Kronolith_Events occuring on that date.
nextRecurrence(string $eventId, \Horde_Date $afterDate) : \Horde_Date|boolean
Finds the next recurrence of $eventId that's after $afterDate.
string | $eventId | The ID of the event to fetch. |
\Horde_Date | $afterDate | Return events after this date. |
The date of the next recurrence or false if the event does not recur after $afterDate.
getByUID(string $uid, array $calendars = null, boolean $getAll = false) : \Kronolith_Event
Get an event or events with the given UID value.
string | $uid | The UID to match |
array | $calendars | A restricted array of calendar ids to search |
boolean | $getAll | Return all matching events? |
listEvents(\Horde_Date $startDate = null, \Horde_Date $endDate = null, array $options = array())
Lists all events in the time range, optionally restricting results to only events with alarms.
\Horde_Date | $startDate | The start of range date. |
\Horde_Date | $endDate | The end of date range. |
array | $options | Additional options:
|
saveEvent(\Kronolith_Event $event) : string
Saves an event in the backend.
If it is a new event, it is added, otherwise the event is updated.
\Kronolith_Event | $event | The event to save. |
The event id.
delete(\Kronolith_Resource_Base $resource)
Removes a resource from storage, along with any events in the resource's calendar.
Note: This method only "Purges" the calendar - removing the events, it doesn't remove the calendar itself.
\Kronolith_Resource_Base | $resource | The kronolith resource to remove |
Horde_Exception_PermissionDenied
deleteEvent(string|\Kronolith_Event_Resource $eventId, boolean $silent = false, boolean $keep_bound = false)
Delete an event.
Since this is the Kronolith_Resource's version of the event, if we delete it, we must also make sure to remove it from the event that it is attached to. Not sure if there is a better way to do this...
string|\Kronolith_Event_Resource | $eventId | The ID of the event to delete. |
boolean | $silent | Don't send notifications, used when deleting events in bulk from maintenance tasks. |
boolean | $keep_bound | If true, does not remove the resource from the bound event. @since 4.2.2 |
synchronize(boolean $force = false, string $token = false)
Synchronize if driver needs to.
boolean | $force | If true, forces synchronization, even if we have already done so. |
string | $token | A synchroniziation token, if available. |
None found |
save(\Kronolith_Resource_Base $resource) : \Kronolith_Resource
Save or update a Kronolith_Resource
\Kronolith_Resource_Base | $resource |
Horde_Exception_PermissionDenied
object
None found |
getResource(integer $id) : \Kronolith_Resource_Base
Obtain a Kronolith_Resource by the resource's id
integer | $id | The key for the Kronolith_Resource |
None found |
getResourceIdByCalendar(string $calendar) : integer
Obtain the resource id associated with the given calendar uid.
string | $calendar | The calendar's uid. |
The Kronolith_Resource id.
None found |
isResourceCalendar(string $calendar) : boolean
Determine if the provided calendar id represents a resource's calendar.
string | $calendar | The calendar identifier to check. |
None found |
listResources(integer $perms = \Horde_Perms::READ, array $filter = array(), string $orderby = null) : \an
Return a list of Kronolith_Resources
Right now, all users have Horde_Perms::READ, but only system admins have Horde_Perms::EDIT | Horde_Perms::DELETE
integer | $perms | A Horde_Perms::* constant. |
array | $filter | A hash of field/values to filter on. |
string | $orderby | Field to order results by. Null for no ordering. |
array of Kronolith_Resource objects.
None found |
getGroupMemberships(integer $resource_id) : array
Obtain the group id for each group the specified resource is a member of.
integer | $resource_id | The resource id to check for. |
An array of group ids.
None found |
convertFromDriver(mixed $value) : mixed
Converts a value from the driver's charset to the default charset.
mixed | $value | A value to convert. |
The converted value.
None found |
convertToDriver(mixed $value) : mixed
Converts a value from the default charset to the driver's charset.
mixed | $value | A value to convert. |
The converted value.
None found |
_deleteResourceCalendar(string $calendar)
Delete the resource calendar
string | $calendar | The calendar id. |
None found |
_listEvents(\Horde_Date $startDate = null, \Horde_Date $endDate = null, array $options = array())
Stub to be overridden in concrete class.
\Horde_Date | $startDate | The start of range date. |
\Horde_Date | $endDate | The end of date range. |
array | $options | Additional options:
|
None found |
_addEvent(\Kronolith_Event $event)
Stub to be overridden in the child class.
\Kronolith_Event | $event |
None found |
_updateEvent(\Kronolith_Event $event)
Stub to be overridden in the child class.
\Kronolith_Event | $event |
None found |
_move( $eventId, $newCalendar)
Stub to be overridden in the child class.
$eventId | ||
$newCalendar |
None found |
_deleteEvent(mixed $eventId) : \Kronolith_Event
Stub to be overridden in the child class.
mixed | $eventId | Either the event id to delete, or the event object. |
Returns the deleted event.
None found |
_handleNotifications(\Kronolith_Event $event, string $action)
Wrapper for sending notifications, so that we can overwrite this action in Kronolith_Driver_Resource.
\Kronolith_Event | $event | |
string | $action |
None found |
_updateTags(\Kronolith_Event $event)
Helper function to update an existing event's tags to tagger storage.
\Kronolith_Event | $event | The event to update |
None found |
_addTags(\Kronolith_Event $event)
Helper function to add tags from a newly creted event to the tagger.
\Kronolith_Event | $event | The event to save tags to storage for. |
None found |