21 require_once
'PEAR.php';
23 define(
'DATAFACE_ERROR_PERMISSION_DENIED', 10101010);
24 define(
'DATAFACE_ERROR_NO_IMPORT_FILTERS_FOUND', 10101011);
25 define(
'DATAFACE_ERROR_DUPLICATE_ENTRY', 10101100);
27 define(
'DATAFACE_E_NOTICE', 200);
28 define(
'DATAFACE_E_PERMMISSIONS', 210);
29 define(
'DATAFACE_E_PERMISSION_DENIED', 211);
30 define(
'DATAFACE_E_LOGIN_FAILURE', 212);
31 define(
'DATAFACE_E_NO_RESULTS', 250);
34 define(
'DATAFACE_E_WARNING', 100);
35 define(
'DATAFACE_E_NO_IMPORT_FILTERS_FOUND', 111);
36 define(
'DATAFACE_E_DUPLICATE_ENTRY', 112);
37 define(
'DATAFACE_E_VERSION_MISMATCH', 113);
39 define(
'DATAFACE_E_ERROR', 300);
40 define(
'DATAFACE_E_IO_ERROR', 320);
41 define(
'DATAFACE_E_DELETE_FAILED', 321);
42 define(
'DATAFACE_E_WRITE_FAILED', 322);
43 define(
'DATAFACE_E_READ_FAILED', 323);
44 define(
'DATAFACE_E_NO_TABLE_SPECIFIED', 350);
45 define(
'DATAFACE_E_MISSING_KEY', 351);
46 define(
'DATAFACE_E_REQUEST_NOT_HANDLED', 201);
56 if ( is_object($arg) )
return get_class($arg).
' Object';
57 if ( is_array($arg) )
return 'array('.implode(
',', array_map(array(
'Dataface_Error',
'stringRepresentation'), $arg)).
')';
62 $debug = debug_backtrace();
64 foreach ($debug as $line){
66 if ( isset($line[
'args']) ){
67 foreach ($line[
'args'] as $arg){
71 $args = substr($args,0,strlen($args)-1);
72 $out .=
"On line ".@$line[
'line'].
" of file ".@$line[
'file'].
" in function ".@$line[
'function'].
"($args)\n<br>";
101 public static function duplicateEntry($msg=
"This record already exists", $userInfo=
''){