/** Logic: If config array is passed to this method then definitely the new handle is required. Else, If DBMgrHandle already exists then return the existing handle. Else, get the default DB config, and instantiate a new DBMgr Handle. */ function DBMgr_Handle($config = '') { global $perform_Database_Operation; $className = 'DBMgr'; if (is_array($config)) { $config = getDBConfig($config); if (strcasecmp($config['dbType'], 'mssql') == 0) { $className = 'SSRV'; } $perform_Database_Operation = new $className($config); return $perform_Database_Operation; } if (isset($perform_Database_Operation)) { return $perform_Database_Operation; } $config = getDBConfig($config); if (strcasecmp($config['dbType'], 'mssql') == 0) { $className = 'SSRV'; } if (function_exists('getclassObject')) { $perform_Database_Operation = getclassObject($className, $config); } else { $perform_Database_Operation = new $className($config); } return $perform_Database_Operation; }
function getInfoFrom($className, $operationName, $arguments = '', $arg2 = '', $arg3 = '', $arg4 = '') { $classObject = getclassObject($className); return call_user_func(array($classObject, $operationName), $arguments, $arg2, $arg3, $arg4); }