[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] phpgwapi/inc/class.service.inc.php, 1.4
From: |
nomail |
Subject: |
[Phpgroupware-cvs] phpgwapi/inc/class.service.inc.php, 1.4 |
Date: |
Thu, 30 Dec 2004 07:47:31 +0100 |
Update of /phpgwapi/inc
Added Files:
Branch:
class.service.inc.php
date: 2004/12/30 06:47:31; author: skwashd; state: Exp; lines: +18 -29
Log Message:
new HEAD
=====================================================================
<?php
/**
* Services abstraction class
* @author Miles Lott <address@hidden>
* @copyright Copyright (C) 2001 Miles Lott
* @copyright Portions Copyright (C) 2004 Free Software Foundation, Inc.
http://www.fsf.org/
* @license http://www.fsf.org/licenses/lgpl.html GNU Lesser General
Public License
* @package phpgwapi
* @subpackage application
* @version $Id: class.service.inc.php,v 1.4 2004/12/30 06:47:31 skwashd
Exp $
*/
/**
* Services abstraction class
*
* @package phpgwapi
* @subpackage application
* @abstract
*/
class service
{
var $provider = '';
var $svc = '';
var $type = '';
var $function_map = array();
function exec($service)
{
if(is_array($service))
{
$data = $service[2];
$function = $service[1];
$service = $service[0];
}
switch ($service)
{
case 'schedule':
case 'contacts':
case 'notes':
case 'todo':
$this =
CreateObject('phpgwapi.service_' . $service);
break;
default:
$this = CreateObject($service);
break;
}
if($function)
{
return $this->$function($data);
}
}
function list_methods()
{
return $this->function_map;
}
}
?>