From: Michael J. Rubinsky Date: Fri, 14 Aug 2009 18:55:08 +0000 (-0400) Subject: Add stub for Kronolith_Resource X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=ae03e2682f2804db78487c01168b5a9058e07fb7;p=horde.git Add stub for Kronolith_Resource --- diff --git a/kronolith/lib/Resource/Resource.php b/kronolith/lib/Resource/Resource.php new file mode 100644 index 000000000..9370a9761 --- /dev/null +++ b/kronolith/lib/Resource/Resource.php @@ -0,0 +1,89 @@ +_params = $params; + } + + /** + * + * Properties: + * name - Display name of resource. + * calendar_id - The calendar associated with this resource. + * category - The category of this resource...an arbitrary label used + * to group multiple resources for the resource_group implementation + * properties - any other properties this resource may have? + * (max capacity of room, size of TV, whatever...) + * probably just for display, not sure how this would work + * if we wanted to be able to search since we are implementing these generically. + * Don't think we want a datatree-style attirbutes table for this. + */ + public function __get($property) + { + return $this->_params[$property]; + } + + + /** + * + * @param $startTime + * @param $endTime + * @return unknown_type + */ + public function isFree($startTime, $endTime) + { + //Should this take an event also, instead? + } + + /** + * Adds $event to this resource's calendar - thus blocking the time + * for any other event. + * + * @param $event + * @return unknown_type + */ + public function attachToEvent($event) + { + + } + + /** + * Remove this event from resource's calendar + * + * @param $event + * @return unknown_type + */ + public function detachFromEvent($event) + { + + } + + /** + * + * @return unknown_type + */ + static public function listResources($params) + { + // Query kronolith_resource table for all(?) available resources? + // maybe by 'type' or 'name'? type would be arbitrary? + } + + /** + * Adds a new resource to storage + * + * @param $params + * @return unknown_type + */ + static public function addResource($params) + { + + } + +} \ No newline at end of file