PHP 클래스 Kronolith_Resource_Base, horde

Copyright 2009-2015 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])
파일 보기 프로젝트 열기: horde/horde 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_id integer Resource's internal id
$_lock boolean | integer Cache the lock of this resource. If not locked, is false.
$_params array Contains: - name: Display name of resource. - calendar: The calendar associated with this resource. - description: Resource description. - email: An email address for the resource. (Currently not used) - members: Member resources, if this is a group. - response_type: A RESPONSETYPE_* constant
$_share Horde_Share_Object

공개 메소드들

메소드 설명
__construct ( array $params = [] ) : Kronolith_Resource_Base Const'r
addEvent ( Kronolith_Event $event ) Adds $event to this resource's calendar - thus blocking the time for any other event.
get ( string $property ) : mixed Implemented to stand in as a share object.
getDriver ( ) : Kronolith_Driver_Resource_ Get a storage driver instance for the resource.
getFreeBusy ( integer $startstamp = null, integer $endstamp = null, boolean $asObject = false, boolean $json = false ) : mixed Obtain the freebusy information for this resource. Takes into account if this is a group of resources or not. (Returns the cumulative FB info for all the resources in the group.
getId ( ) : string Obtain the resource's internal identifier.
getPermission ( )
getResponse ( Kronolith_Event $event ) : integer Check availability and return an appropriate Kronolith response code.
getResponseType ( ) : integer Get ResponseType for this resource.
hasPermission ( string $user, integer $permission = Horde_Perms::READ, $restrict = null ) : boolean Return permission for the specified user for this Resource.
isFree ( Kronolith_Event $event ) : boolean Determine if event is free for specified time
lock ( ) : boolean Locks the resource.
removeEvent ( Kronolith_Event $event ) Remove this event from resource's calendar
save ( ) : Kronolith_Resource_Base Save resource to storage.
set ( string $property, mixed $value ) : void Allow setting of properties
setPermission ( $perm )
share ( )
toJson ( ) : array Return this resource's parameters in a hash.
unlock ( ) Remove a previous lock.

메소드 상세

__construct() 공개 메소드

Const'r
public __construct ( array $params = [] ) : Kronolith_Resource_Base
$params array
리턴 Kronolith_Resource_Base

addEvent() 추상적인 공개 메소드

Adds $event to this resource's calendar - thus blocking the time for any other event.
abstract public addEvent ( Kronolith_Event $event )
$event Kronolith_Event The event to add to this resource's calendar, thus blocking it's availability.

get() 공개 메소드

Implemented to stand in as a share object.
public get ( string $property ) : mixed
$property string The property to get
리턴 mixed The value of $property

getDriver() 공개 메소드

Get a storage driver instance for the resource.
public getDriver ( ) : Kronolith_Driver_Resource_
리턴 Kronolith_Driver_Resource_

getFreeBusy() 추상적인 공개 메소드

Obtain the freebusy information for this resource. Takes into account if this is a group of resources or not. (Returns the cumulative FB info for all the resources in the group.
abstract public getFreeBusy ( integer $startstamp = null, integer $endstamp = null, boolean $asObject = false, boolean $json = false ) : mixed
$startstamp integer The starting timestamp of the fb interval.
$endstamp integer The ending timestamp of the fb interval.
$asObject boolean Return the fb info as an object?
$json boolean Return the fb info as JSON?
리턴 mixed string|Horde_Icalendar_Vfreebusy The Freebusy object or the iCalendar text.

getId() 공개 메소드

Obtain the resource's internal identifier.
public getId ( ) : string
리턴 string The id.

getPermission() 공개 메소드

public getPermission ( )

getResponse() 공개 메소드

Check availability and return an appropriate Kronolith response code.
public getResponse ( Kronolith_Event $event ) : integer
$event Kronolith_Event The event to check on
리턴 integer Kronolith::RESPONSE* constant

getResponseType() 추상적인 공개 메소드

Get ResponseType for this resource.
abstract public getResponseType ( ) : integer
리턴 integer The response type for this resource. A Kronolith_Resource::RESPONSE_TYPE_* constant.

hasPermission() 공개 메소드

Return permission for the specified user for this Resource.
public hasPermission ( string $user, integer $permission = Horde_Perms::READ, $restrict = null ) : boolean
$user string The user to check for.
$permission integer The permission to check.
$restrict
리턴 boolean

isFree() 추상적인 공개 메소드

Determine if event is free for specified time
abstract public isFree ( Kronolith_Event $event ) : boolean
$event Kronolith_Event The event we want to check the resource's availability for.
리턴 boolean True if the resource is free, false if not.

lock() 공개 메소드

Locks the resource.
public lock ( ) : boolean
리턴 boolean True if lock succeeded, otherwise false.

removeEvent() 추상적인 공개 메소드

Remove this event from resource's calendar
abstract public removeEvent ( Kronolith_Event $event )
$event Kronolith_Event The event to remove from the resource's calendar.

save() 공개 메소드

Save resource to storage.
public save ( ) : Kronolith_Resource_Base
리턴 Kronolith_Resource_Base

set() 공개 메소드

Allow setting of properties
public set ( string $property, mixed $value ) : void
$property string The property to set
$value mixed The value to set to
리턴 void

setPermission() 공개 메소드

public setPermission ( $perm )

share() 공개 메소드

public share ( )

toJson() 공개 메소드

Return this resource's parameters in a hash.
public toJson ( ) : array
리턴 array A hash suitable for JSON encoding.

unlock() 공개 메소드

Remove a previous lock.
public unlock ( )

프로퍼티 상세

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

Resource's internal id
protected int $_id
리턴 integer

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

Cache the lock of this resource. If not locked, is false.
protected bool|int $_lock
리턴 boolean | integer

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

Contains: - name: Display name of resource. - calendar: The calendar associated with this resource. - description: Resource description. - email: An email address for the resource. (Currently not used) - members: Member resources, if this is a group. - response_type: A RESPONSETYPE_* constant
protected array $_params
리턴 array

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

protected Horde_Share_Object $_share
리턴 Horde_Share_Object