Kronolith_Resource
in package
Utility class for dealing with Kronolith_Resource objects
Copyright 2009-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.
Tags
Table of Contents
- RESPONSETYPE_ALWAYS_ACCEPT = 2
- RESPONSETYPE_ALWAYS_DECLINE = 3
- RESPONSETYPE_AUTO = 1
- RESPONSETYPE_MANUAL = 4
- RESPONSETYPE_NONE = 0
- addResource() : Kronolith_Resource_Single
- Adds a new resource to storage
- checkResources() : array<string|int, mixed>
- Handles checking for resource availability or cancellation.
- getResource() : mixed
Constants
RESPONSETYPE_ALWAYS_ACCEPT
public
mixed
RESPONSETYPE_ALWAYS_ACCEPT
= 2
RESPONSETYPE_ALWAYS_DECLINE
public
mixed
RESPONSETYPE_ALWAYS_DECLINE
= 3
RESPONSETYPE_AUTO
public
mixed
RESPONSETYPE_AUTO
= 1
RESPONSETYPE_MANUAL
public
mixed
RESPONSETYPE_MANUAL
= 4
RESPONSETYPE_NONE
public
mixed
RESPONSETYPE_NONE
= ""
Methods
addResource()
Adds a new resource to storage
public
static addResource(array<string|int, mixed> $info) : Kronolith_Resource_Single
Parameters
- $info : array<string|int, mixed>
-
The resource array.
- name: (string) The resource name.
- desc: (string) The resource description.
- email: (string) An email address for the resource, if needed.
- response_type: (integer) The RESPONSETYPE_* constant.
- group: (boolean) Flag resource as a group.
- members: (array) An array of resource ids if this is a group.
Return values
Kronolith_Resource_Single —checkResources()
Handles checking for resource availability or cancellation.
public
static checkResources(Kronolith_Event $event) : array<string|int, mixed>
Parameters
- $event : Kronolith_Event
-
The event whose resources we are saving.
Return values
array<string|int, mixed> —An array of accepted resource objects.
getResource()
public
static getResource(mixed $id) : mixed
Parameters
- $id : mixed