PHP 클래스 Kronolith_Driver_Resource, horde

Copyright 1999-2016 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.
저자: Michael J Rubinsky ([email protected])
상속: extends Kronolith_Driver
파일 보기 프로젝트 열기: horde/horde 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_driver Kronolith_Driver The main event storage driver.
$_eventClass string The class name of the event object to instantiate.

공개 메소드들

메소드 설명
_deleteResourceCalendar ( string $calendar ) Delete the resource calendar
convertFromDriver ( mixed $value ) : mixed Converts a value from the driver's charset to the default charset.
convertToDriver ( mixed $value ) : mixed Converts a value from the default charset to the driver's charset.
delete ( Kronolith_Resource_Base $resource ) Removes a resource from storage, along with any events in the resource's calendar.
deleteEvent ( string | Kronolith_Event_Resource $eventId, boolean $silent = false, boolean $keep_bound = false ) Delete an event.
getByUID ( string $uid, array $calendars = null, boolean $getAll = false ) : Kronolith_Event Get an event or events with the given UID value.
getEvent ( $eventId = null )
getGroupMemberships ( integer $resource_id ) : array Obtain the group id for each group the specified resource is a member of.
getResource ( integer $id ) : Kronolith_Resource_Base Obtain a Kronolith_Resource by the resource's id
getResourceIdByCalendar ( string $calendar ) : integer Obtain the resource id associated with the given calendar uid.
initialize ( )
isResourceCalendar ( string $calendar ) : boolean Determine if the provided calendar id represents a resource's calendar.
listEvents ( Horde_Date $startDate = null, Horde_Date $endDate = null, array $options = [] ) Lists all events in the time range, optionally restricting results to only events with alarms.
listResources ( integer $perms = Horde_Perms::READ, array $filter = [], string $orderby = null ) : an Return a list of Kronolith_Resources
open ( string $calendar ) Selects a calendar as the currently opened calendar.
save ( Kronolith_Resource_Base $resource ) : Kronolith_Resource Save or update a Kronolith_Resource
saveEvent ( Kronolith_Event $event ) : string Saves an event in the backend.

보호된 메소드들

메소드 설명
_addTags ( Kronolith_Event $event ) Helper function to add tags from a newly creted event to the tagger.
_buildResourceEvent ( $driver_event )
_handleNotifications ( Kronolith_Event $event, $action )
_updateTags ( Kronolith_Event $event ) Helper function to update an existing event's tags to tagger storage.

메소드 상세

_addTags() 보호된 메소드

Helper function to add tags from a newly creted event to the tagger.
protected _addTags ( Kronolith_Event $event )
$event Kronolith_Event The event to save tags to storage for.

_buildResourceEvent() 보호된 메소드

protected _buildResourceEvent ( $driver_event )

_deleteResourceCalendar() 공개 메소드

Delete the resource calendar
public _deleteResourceCalendar ( string $calendar )
$calendar string The calendar id.

_handleNotifications() 보호된 메소드

protected _handleNotifications ( Kronolith_Event $event, $action )
$event Kronolith_Event

_updateTags() 보호된 메소드

Helper function to update an existing event's tags to tagger storage.
protected _updateTags ( Kronolith_Event $event )
$event Kronolith_Event The event to update

convertFromDriver() 공개 메소드

Converts a value from the driver's charset to the default charset.
public convertFromDriver ( mixed $value ) : mixed
$value mixed A value to convert.
리턴 mixed The converted value.

convertToDriver() 공개 메소드

Converts a value from the default charset to the driver's charset.
public convertToDriver ( mixed $value ) : mixed
$value mixed A value to convert.
리턴 mixed The converted value.

delete() 공개 메소드

Removes a resource from storage, along with any events in the resource's calendar.
public delete ( Kronolith_Resource_Base $resource )
$resource Kronolith_Resource_Base The kronolith resource to remove

deleteEvent() 공개 메소드

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...
public deleteEvent ( string | Kronolith_Event_Resource $eventId, boolean $silent = false, boolean $keep_bound = false )
$eventId string | Kronolith_Event_Resource The ID of the event to delete.
$silent boolean Don't send notifications, used when deleting events in bulk from maintenance tasks.
$keep_bound boolean If true, does not remove the resource from the bound event. @since 4.2.2

getByUID() 공개 메소드

Get an event or events with the given UID value.
public getByUID ( string $uid, array $calendars = null, boolean $getAll = false ) : Kronolith_Event
$uid string The UID to match
$calendars array A restricted array of calendar ids to search
$getAll boolean Return all matching events?
리턴 Kronolith_Event

getEvent() 공개 메소드

public getEvent ( $eventId = null )

getGroupMemberships() 공개 메소드

Obtain the group id for each group the specified resource is a member of.
public getGroupMemberships ( integer $resource_id ) : array
$resource_id integer The resource id to check for.
리턴 array An array of group ids.

getResource() 공개 메소드

Obtain a Kronolith_Resource by the resource's id
public getResource ( integer $id ) : Kronolith_Resource_Base
$id integer The key for the Kronolith_Resource
리턴 Kronolith_Resource_Base

getResourceIdByCalendar() 공개 메소드

Obtain the resource id associated with the given calendar uid.
public getResourceIdByCalendar ( string $calendar ) : integer
$calendar string The calendar's uid.
리턴 integer The Kronolith_Resource id.

initialize() 공개 메소드

public initialize ( )

isResourceCalendar() 공개 메소드

Determine if the provided calendar id represents a resource's calendar.
public isResourceCalendar ( string $calendar ) : boolean
$calendar string The calendar identifier to check.
리턴 boolean

listEvents() 공개 메소드

Lists all events in the time range, optionally restricting results to only events with alarms.
public listEvents ( Horde_Date $startDate = null, Horde_Date $endDate = null, array $options = [] )
$startDate Horde_Date The start of range date.
$endDate Horde_Date The end of date range.
$options array Additional options: - show_recurrence: (boolean) Return every instance of a recurring event? DEFAULT: false (Only return recurring events once inside $startDate - $endDate range) - has_alarm: (boolean) Only return events with alarms. DEFAULT: false (Return all events) - json: (boolean) Store the results of the event's toJson() method? DEFAULT: false - cover_dates: (boolean) Add the events to all days that they cover? DEFAULT: true - hide_exceptions: (boolean) Hide events that represent exceptions to a recurring event. DEFAULT: false (Do not hide exception events) - fetch_tags: (boolean) Fetch tags for all events. DEFAULT: false (Do not fetch event tags)

listResources() 공개 메소드

Right now, all users have Horde_Perms::READ, but only system admins have Horde_Perms::EDIT | Horde_Perms::DELETE
public listResources ( integer $perms = Horde_Perms::READ, array $filter = [], string $orderby = null ) : an
$perms integer A Horde_Perms::* constant.
$filter array A hash of field/values to filter on.
$orderby string Field to order results by. Null for no ordering.
리턴 an array of Kronolith_Resource objects.

open() 공개 메소드

Selects a calendar as the currently opened calendar.
public open ( string $calendar )
$calendar string A calendar identifier.

save() 공개 메소드

Save or update a Kronolith_Resource
public save ( Kronolith_Resource_Base $resource ) : Kronolith_Resource
$resource Kronolith_Resource_Base
리턴 Kronolith_Resource object

saveEvent() 공개 메소드

If it is a new event, it is added, otherwise the event is updated.
public saveEvent ( Kronolith_Event $event ) : string
$event Kronolith_Event The event to save.
리턴 string The event id.

프로퍼티 상세

$_driver 보호되어 있는 프로퍼티

The main event storage driver.
protected Kronolith_Driver $_driver
리턴 Kronolith_Driver

$_eventClass 보호되어 있는 프로퍼티

The class name of the event object to instantiate.
protected string $_eventClass
리턴 string