forked from OpenXE-org/OpenXE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
xentral_autoloader.php
194 lines (190 loc) · 9.29 KB
/
xentral_autoloader.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
<?php
function xentral_autoloader($class) {
$classes = array(
'Config'=>__DIR__.'/conf/main.conf.php',
'EasyTable'=>__DIR__.'/phpwf/widgets/easytable.php',
'FileTable'=>__DIR__.'/phpwf/widgets/filetable.php',
'DownloadSpoolerTable'=>__DIR__.'/phpwf/widgets/downloadspoolertable.php',
'HTMLTable'=>__DIR__.'/phpwf/htmltags/class.table.php',
'image'=>__DIR__.'/www/lib/class.image.php',
'Location'=>__DIR__.'/www/lib/class.location.php',
'TemplateParser'=>__DIR__.'/phpwf/plugins/class.templateparser.php',
'ModuleScriptCache'=>__DIR__.'/phpwf/plugins/class.modulescriptcache.php',
'Table'=>__DIR__.'/phpwf/widgets/table.php',
'Remote'=>__DIR__.'/www/lib/class.remote.php',
'erpAPI'=>__DIR__.'/www/lib/class.erpapi.php',
'erpooSystem'=>__DIR__.'/www/eproosystem.php',
'erpAPICustom'=>__DIR__.'/www/lib/class.erpapi_custom.php',
'RemoteCustom'=>__DIR__.'/www/lib/class.remote_custom.php',
'YUI'=>__DIR__.'/phpwf/plugins/class.yui.php',
'User'=>__DIR__.'/phpwf/plugins/class.user.php',
'Secure'=>__DIR__.'/phpwf/plugins/class.secure.php',
'Secure2'=>__DIR__.'/phpwf/plugins/class.secure2.php',
'Acl'=>__DIR__.'/phpwf/plugins/class.acl.php',
'WawiString'=>__DIR__.'/phpwf/plugins/class.string.php',
'phpWFAPI'=>__DIR__.'/phpwf/plugins/class.phpwfapi.php',
'ApplicationCore'=>__DIR__.'/phpwf/class.application_core.php',
'Application'=>__DIR__.'/phpwf/class.application.php',
'HttpClient'=>__DIR__.'/www/lib/class.httpclient.php',
'SMTP'=>__DIR__.'/www/plugins/phpmailer/class.smtp.php',
'IMAP'=>__DIR__.'/www/lib/imap.inc.php',
'PHPMailer'=>__DIR__.'/www/plugins/phpmailer/class.phpmailer.php',
'Help'=>__DIR__.'/www/lib/class.help.php',
'StringCleaner'=>__DIR__.'/phpwf/plugins/class.stringcleaner.php',
'Page'=>__DIR__.'/phpwf/plugins/class.page.php',
'ObjectAPI'=>__DIR__.'/phpwf/plugins/class.objectapi.php',
'WFMonitor'=>__DIR__.'/phpwf/plugins/class.wfmonitor.php',
'FormHandler'=>__DIR__.'/phpwf/plugins/class.formhandler.php',
'DatabaseUpgrade'=>__DIR__.'/phpwf/plugins/class.databaseupgrade.php',
'WidgetAPI'=>__DIR__.'/phpwf/plugins/class.widgetapi.php',
'PageBuilder'=>__DIR__.'/phpwf/plugins/class.pagebuilder.php',
'DB'=>__DIR__.'/phpwf/plugins/class.mysql.php',
'Printer'=>__DIR__.'/www/lib/class.printer.php',
'PrinterCustom'=>__DIR__.'/www/lib/class.printer_custom.php',
'HTMLForm'=>__DIR__.'/phpwf/htmltags/class.form.php',
'HTMLTextarea'=>__DIR__.'/phpwf/htmltags/class.form.php',
'BlindField'=>__DIR__.'/phpwf/htmltags/class.form.php',
'HTMLInput'=>__DIR__.'/phpwf/htmltags/class.form.php',
'HTMLCheckbox'=>__DIR__.'/phpwf/htmltags/class.form.php',
'HTMLSelect'=>__DIR__.'/phpwf/htmltags/class.form.php',
'SimpleList'=>__DIR__.'/phpwf/types/class.simplelist.php',
'PicosafeLogin'=>__DIR__.'/phpwf/plugins/class.picosafelogin.php',
'WaWisionOTP'=>__DIR__.'/phpwf/plugins/class.wawision_otp.php',
'PDF_EPS'=>__DIR__.'/www/lib/pdf/fpdf_final.php',
'SuperFPDF'=>__DIR__.'/www/lib/dokumente/class.superfpdf.php',
'Briefpapier'=>__DIR__.'/www/lib/dokumente/class.briefpapier.php',
'PDF'=>__DIR__.'/www/lib/pdf/fpdf.php',
'SpeditionPDF'=>__DIR__.'/www/lib/dokumente/class.spedition.php',
'EtikettenPDF'=>__DIR__.'/www/lib/dokumente/class.etiketten.php',
'Dokumentenvorlage'=>__DIR__.'/www/lib/dokumente/class.dokumentenvorlage.php',
'SepaMandat'=>__DIR__.'/www/lib/dokumente/class.sepamandat.php',
'TransferBase'=>__DIR__.'/www/lib/TransferBase.php',
'PrinterBase'=>__DIR__.'/www/lib/PrinterBase.php',
'WikiParser'=>__DIR__.'/www/plugins/class.wikiparser.php',
'IndexPoint'=>__DIR__.'/www/plugins/class.wikiparser.php',
'ICS'=>__DIR__.'/www/plugins/class.ics.php',
'USTID'=>__DIR__.'/www/lib/class.ustid.php',
'phpprint'=>__DIR__.'/www/plugins/php-print.php',
'Navigation'=>__DIR__.'/www/lib/class.navigation_edit.php',
'GoShipment'=>__DIR__.'/www/lib/class.go.php',
'UPSShipment'=>__DIR__.'/www/lib/class.ups.php',
'XTEA'=>__DIR__.'/www/lib/class.xtea.php',
'ShopimporterBase'=>__DIR__.'/www/lib/ShopimporterBase.php',
'LiveimportBase'=>__DIR__.'/www/plugins/liveimport/LiveimportBase.php',
'paypal'=>__DIR__.'/www/plugins/liveimport/paypal/paypal.php',
'DocscanRoot' => __DIR__ . '/www/docscan/classes/DocscanRoot.php',
'DocscanFile' => __DIR__ . '/www/docscan/classes/DocscanFile.php',
'DocscanDir' => __DIR__ . '/www/docscan/classes/DocscanDir.php',
'DocscanAuth' => __DIR__ . '/www/docscan/classes/DocscanAuth.php',
'ArtikelTabelle' => __DIR__ . '/www/widgets/artikeltable.php',
'Xentral\Core\LegacyConfig\ConfigLoader'=>__DIR__.'/classes/Core/LegacyConfig/ConfigLoader.php',
'Xentral\Core\LegacyConfig\Exception\LegacyConfigExceptionInterface'=>__DIR__.'/classes/Core/LegacyConfig/Exception/LegacyConfigExceptionInterface.php',
'Xentral\Core\LegacyConfig\Exception\InvalidArgumentException'=>__DIR__.'/classes/Core/LegacyConfig/Exception/InvalidArgumentException.php',
'Xentral\Core\LegacyConfig\Exception\MultiDbConfigNotFoundException'=>__DIR__.'/classes/Core/LegacyConfig/Exception/MultiDbConfigNotFoundException.php',
'Xentral\Core\LegacyConfig\MultiDbArrayHydrator'=>__DIR__.'/classes/Core/LegacyConfig/MultiDbArrayHydrator.php',
'Xentral\Core\ErrorHandler\ErrorHandler'=>__DIR__.'/classes/Core/ErrorHandler/ErrorHandler.php',
'Xentral\Core\ErrorHandler\ErrorPageData'=>__DIR__.'/classes/Core/ErrorHandler/ErrorPageData.php',
'Xentral\Core\ErrorHandler\ErrorPageRenderer'=>__DIR__.'/classes/Core/ErrorHandler/ErrorPageRenderer.php',
'Xentral\Core\ErrorHandler\PhpErrorException'=>__DIR__.'/classes/Core/ErrorHandler/PhpErrorException.php',
'Xentral\Core\Exception\ComponentExceptionInterface'=>__DIR__. '/classes/Core/Exception/ComponentExceptionInterface.php',
'Xentral\Core\Exception\CoreExceptionInterface'=>__DIR__. '/classes/Core/Exception/CoreExceptionInterface.php',
'Xentral\Core\Exception\ModuleExceptionInterface'=>__DIR__. '/classes/Core/Exception/ModuleExceptionInterface.php',
'Xentral\Core\Exception\WidgetExceptionInterface'=>__DIR__. '/classes/Core/Exception/WidgetExceptionInterface.php',
'Xentral\Core\Exception\XentralExceptionInterface'=>__DIR__. '/classes/Core/Exception/XentralExceptionInterface.php',
'Xentral\Core\Installer\ClassMapGenerator'=>__DIR__.'/classes/Core/Installer/ClassMapGenerator.php',
'Xentral\Core\Installer\Installer'=>__DIR__.'/classes/Core/Installer/Installer.php',
'Xentral\Core\Installer\InstallerCacheConfig'=>__DIR__.'/classes/Core/Installer/InstallerCacheConfig.php',
'Xentral\Core\Installer\InstallerCacheWriter'=>__DIR__.'/classes/Core/Installer/InstallerCacheWriter.php',
'Xentral\Core\Installer\Psr4ClassNameResolver'=>__DIR__.'/classes/Core/Installer/Psr4ClassNameResolver.php',
);
if(isset($classes[$class]) && is_file($classes[$class]))
{
include_once $classes[$class];
return;
}
if(strpos($class,'Widget') === 0)
{
if(strpos($class,'WidgetGen') === 0)
{
$file = strtolower(substr($class,9));
if(is_file(__DIR__.'/www/widgets/_gen/widget.gen.'.$file.'.php'))
{
include __DIR__.'/www/widgets/_gen/widget.gen.'.$file.'.php';
return;
}
}
$file = strtolower(substr($class,6));
if(is_file(__DIR__.'/www/widgets/widget.'.$file.'.php'))
{
include __DIR__.'/www/widgets/widget.'.$file.'.php';
return;
}
}
if($class === 'AES')
{
if(version_compare(phpversion(),'7.1', '>=') && is_file(__DIR__.'/www/lib/class.aes2.php')){
include __DIR__.'/www/lib/class.aes2.php';
} else{
include __DIR__ . '/www/lib/class.aes.php';
}
return;
}
if($class === 'FPDFWAWISION')
{
if(is_file(__DIR__.'/conf/user_defined.php'))
{
include_once __DIR__.'/conf/user_defined.php';
}
if(!defined('USEFPDF3')){
define('USEFPDF3', true);
}
if(defined('USEFPDF3') && USEFPDF3)
{
if(is_file(__DIR__ .'/www/lib/pdf/fpdf_3.php'))
{
require_once __DIR__ .'/www/lib/pdf/fpdf_3.php';
}else {
require_once __DIR__ .'/www/lib/pdf/fpdf.php';
}
}
else if(defined('USEFPDF2') && USEFPDF2)
{
if(is_file(__DIR__ .'/www/lib/pdf/fpdf_2.php'))
{
require_once __DIR__ .'/www/lib/pdf/fpdf_2.php';
}else {
require_once __DIR__ .'/www/lib/pdf/fpdf.php';
}
} else {
require_once __DIR__ .'/www/lib/pdf/fpdf.php';
}
return;
}
if($class === 'BriefpapierCustom')
{
if(is_file(__DIR__.'/www/lib/dokumente/class.briefpapier_custom.php'))
{
include __DIR__.'/www/lib/dokumente/class.briefpapier_custom.php';
}else{
class BriefpapierCustom extends Briefpapier
{
}
}
}
if(substr($class, -3) === 'PDF') {
$file = __DIR__.'/www/lib/dokumente/class.'.strtolower(substr($class,0,-3)).'.php';
if(file_exists($file)) {
include $file;
}
elseif(file_exists(__DIR__.'/www/lib/dokumente/class.'.strtolower($class).'.php')) {
include __DIR__.'/www/lib/dokumente/class.'.strtolower($class).'.php';
}
}
elseif(substr($class, -9) === 'PDFCustom') {
$file = __DIR__.'/www/lib/dokumente/class.'.strtolower(substr($class,0,-9)).'_custom.php';
if(file_exists($file)) {
include $file;
}
}
}
spl_autoload_register('xentral_autoloader');