[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] phpgwapi/inc class.ipc_manager.inc.php, 1.6 class.ofp
From: |
fipsfuchs |
Subject: |
[Phpgroupware-cvs] phpgwapi/inc class.ipc_manager.inc.php, 1.6 class.ofphpgwapi.inc.php, 1.1 |
Date: |
Fri, 8 Apr 2005 10:55:00 +0200 |
Update of phpgwapi/inc
Modified Files:
Branch: MAIN
class.ipc_manager.inc.php lines: +2 -2
Added Files:
Branch: MAIN
class.ofphpgwapi.inc.php
Log Message:
include_class changed to include_once
====================================================
Index: phpgwapi/inc/class.ipc_manager.inc.php
diff -u phpgwapi/inc/class.ipc_manager.inc.php:1.5
phpgwapi/inc/class.ipc_manager.inc.php:1.6
--- phpgwapi/inc/class.ipc_manager.inc.php:1.5 Thu Dec 30 06:47:30 2004
+++ phpgwapi/inc/class.ipc_manager.inc.php Fri Apr 8 08:55:34 2005
@@ -12,7 +12,7 @@
/**
* Abstract IPC Application class for the IPC Layer
*/
-include_class('ipc_');
+include_once('class.ipc_.inc.php');
/**
* Manager of the IPC Layer
====================================================
Index: class.ofphpgwapi.inc.php
<?php
/**
* Object Factory
*
* @author Dirk Schaller <address@hidden>
* @copyright Copyright (C) 2003 Free Software Foundation, Inc.
http://www.fsf.org/
* @license http://www.fsf.org/licenses/gpl.html GNU General Public
License
* @package phpgwapi
* @subpackage application
* @version $Id: class.ofphpgwapi.inc.php,v 1.1 2005/04/08 08:55:15
fipsfuchs Exp $
*/
/**
* Object factory for phpgwapi
*
* @package phpgwapi
* @subpackage application
*/
class ofphpgwapi extends object_factory
{
/*!
@function CreateObject
@abstract Load a class and include the class file if not done
so already.
@author mdean
@author milosch
@author (thanks to jengo and ralf)
@discussion This function is used to create an instance of a
class, and if the class file has not been included it will do so.
@syntax CreateObject('app.class', 'constructor_params');
@example $phpgw->acl = CreateObject('phpgwapi.acl');
@param $classname name of class
@param $p1-$p16 class parameters (all optional)
*/
function CreateObject($class,
$p1='_UNDEF_',$p2='_UNDEF_',$p3='_UNDEF_',$p4='_UNDEF_',
$p5='_UNDEF_',$p6='_UNDEF_',$p7='_UNDEF_',$p8='_UNDEF_',
$p9='_UNDEF_',$p10='_UNDEF_',$p11='_UNDEF_',$p12='_UNDEF_',
$p13='_UNDEF_',$p14='_UNDEF_',$p15='_UNDEF_',$p16='_UNDEF_')
{
list($appname,$classname) = explode('.', $class, 2);
switch($classname)
{
case 'auth':
return ofphpgwapi::CreateAuthObject();
break;
case 'accounts':
return
ofphpgwapi::CreateAccountObject();
break;
default:
return
parent::CreateObject($class,$p1,$p2,$p3,$p4,$p5,$p6,$p7,$p8,$p9,$p10,$p11,$p12,$p13,$p14,$p15,$p16);
}
}
function CreateAuthObject()
{
include_once(PHPGW_API_INC .
'/auth/class.auth_.inc.php');
switch($GLOBALS['phpgw_info']['server']['auth_type'])
{
case 'http':
include_once(PHPGW_API_INC .
'/auth/class.auth_http.inc.php');
return new Auth_http();
break;
case 'ldap':
include_once(PHPGW_API_INC .
'/auth/class.auth_ldap.inc.php');
return new Auth_ldap();
break;
case 'mail':
include_once(PHPGW_API_INC .
'/auth/class.auth_mail.inc.php');
return new Auth_mail();
break;
case 'nis':
include_once(PHPGW_API_INC .
'/auth/class.auth_nis.inc.php');
return new Auth_nis();
break;
case 'ntlm':
include_once(PHPGW_API_INC .
'/auth/class.auth_ntlm.inc.php');
return new Auth_ntlm();
break;
case 'sqlssl':
include_once(PHPGW_API_INC .
'/auth/class.auth_sqlssl.inc.php');
return new Auth_sqlssl();
break;
case 'exchange':
include_once(PHPGW_API_INC .
'/auth/class.auth_exchange.inc.php');
return new Auth_exchange();
break;
case 'ads':
include_once(PHPGW_API_INC .
'/auth/class.auth_ads.inc.php');
return new Auth_ads();
break;
default:
include_once(PHPGW_API_INC .
'/auth/class.auth_sql.inc.php');
return new Auth_sql();
}
}
function CreateAccountObject()
{
include_once(PHPGW_API_INC.'/accounts/class.accounts_.inc.php');
switch($GLOBALS['phpgw_info']['server']['account_repository'])
{
case 'ldap':
include_once(PHPGW_API_INC .
'/accounts/class.accounts_ldap.inc.php');
return new Accounts_LDAP ($account_id,
$account_type);
break;
case 'sqlldap':
include_once(PHPGW_API_INC .
'/accounts/class.accounts_SQLLDAP.inc.php');
return new Accounts_SQLLDAP ($account_id,
$account_type);
break;
default:
include_once(PHPGW_API_INC .
'/accounts/class.accounts_sql.inc.php');
return new Accounts_sql ($account_id,
$account_type);
}
}
}
?>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] phpgwapi/inc class.ipc_manager.inc.php, 1.6 class.ofphpgwapi.inc.php, 1.1,
fipsfuchs <=