1 |
<? |
2 |
// --------------------------------------------------------------------------- |
3 |
// $Id: includes.php,v 1.4 2003/02/09 16:52:08 joko Exp $ |
4 |
// --------------------------------------------------------------------------- |
5 |
// $Log: includes.php,v $ |
6 |
// Revision 1.4 2003/02/09 16:52:08 joko |
7 |
// + updated, new modules in this library |
8 |
// |
9 |
// Revision 1.3 2003/02/04 08:26:18 joko |
10 |
// + fixed comment |
11 |
// |
12 |
// Revision 1.2 2003/02/04 08:25:43 joko |
13 |
// + minor modification regarding configuration/resource variable hierarchy |
14 |
// |
15 |
// Revision 1.1 2003/02/03 14:39:58 joko |
16 |
// + initial commit |
17 |
// |
18 |
// --------------------------------------------------------------------------- |
19 |
|
20 |
|
21 |
$smarty = $config['_startup'][path][lib][smarty]; |
22 |
$pear = $config['_startup'][path][lib][pear]; |
23 |
$flib = $config['_startup'][path][lib][flib]; |
24 |
$glib = $config['_startup'][path][lib][glib]; |
25 |
$lib_app = $config['_startup'][path][lib][app]; |
26 |
|
27 |
|
28 |
// ------ override/expand php's 'include_path' setting ------ |
29 |
// determine OS |
30 |
$os = 'linux'; |
31 |
if (stristr($_SERVER["SERVER_SOFTWARE"], 'win32')) { |
32 |
$os = 'windows'; |
33 |
} |
34 |
|
35 |
$path_delimiter = ':'; |
36 |
// change path-delimiter for win32 |
37 |
if ($os == 'windows') { $path_delimiter = ';'; } |
38 |
// build new 'include_path'-string |
39 |
$path_new = join($path_delimiter, array($pear, $flib, $glib, $lib_app, ini_get("include_path"))); |
40 |
ini_set("include_path", $path_new); |
41 |
|
42 |
|
43 |
// ======================================= |
44 |
// ------ pear libs ------ |
45 |
// benchmarking |
46 |
require_once("Benchmark/Timer.php"); |
47 |
$timer = new Benchmark_Timer; |
48 |
$timer->start(); |
49 |
$timer->setMarker("pear libraries: including"); |
50 |
|
51 |
// logging |
52 |
require_once 'Log.php'; |
53 |
require_once 'Log/file.php'; |
54 |
// date-handling and -manipulation ... 0.02 execution time for inclusion |
55 |
require_once 'Date.php'; |
56 |
// database... 0.03 execution time for inclusion |
57 |
require_once 'DB.php'; |
58 |
// rpc - standard |
59 |
require_once 'XML/RPC/RPC.php'; |
60 |
|
61 |
$timer->setMarker("pear libraries: ready"); |
62 |
|
63 |
|
64 |
|
65 |
// ======================================= |
66 |
// ------ glib libraries/classes/components ------ |
67 |
|
68 |
// abstract base classes - lowlevel |
69 |
require_once("DesignPattern/Object.php"); |
70 |
loadModule('DesignPattern::Logger'); |
71 |
loadModule('DesignPattern::Bridge'); |
72 |
loadModule('DesignPattern::Loader'); |
73 |
|
74 |
// abstract base classes - application level |
75 |
loadModule('Application::AbstractBase'); |
76 |
loadModule('Application::AbstractRequest'); |
77 |
loadModule('Application::AbstractHandler'); |
78 |
loadModule('Application::AbstractBackend'); |
79 |
|
80 |
// concrete classes |
81 |
|
82 |
// helper: data-manipulation and -encoding |
83 |
loadModule('Data::Encode'); |
84 |
loadModule('Data::Deep'); |
85 |
|
86 |
// helper: CreditCard Validator |
87 |
loadModule('Data::Validator::CreditCard'); |
88 |
|
89 |
// core/transport: rpc-xml communication |
90 |
loadModule('Data::Driver::Proxy'); |
91 |
loadModule('Data::Driver::RPC::Remote'); |
92 |
|
93 |
|
94 |
|
95 |
// ======================================= |
96 |
// ------ flib libraries/classes ------ |
97 |
// error handling |
98 |
require_once("Application/ErrorHandler.php"); |
99 |
// misc |
100 |
require_once("utils/helper.php"); |
101 |
require_once("utils/shortcuts.php"); |
102 |
// array manipulation |
103 |
require_once("utils/Array_Manip.php"); |
104 |
|
105 |
// utf8-encodings (Internationalization) |
106 |
// iso <-> utf8 |
107 |
//require_once("Application/i18n/TextEncode.php"); |
108 |
// language (Localization) |
109 |
require_once("Application/l10n/LocaleText.php"); |
110 |
// site |
111 |
require_once("Site.php"); |
112 |
// user |
113 |
require_once("Tracker/Session.php"); |
114 |
require_once("Tracker/User.php"); |
115 |
// tablebrowser |
116 |
require_once("$flib/Site/Widget/TableBrowser.php"); |
117 |
|
118 |
// ------ local libs - abstract ------ |
119 |
// site |
120 |
//require_once ("$lib"."content/Site.class.php"); |
121 |
// page |
122 |
// smarty |
123 |
//define(SMARTY_DIR, $lib . 'external/smarty/'); |
124 |
define(SMARTY_DIR, $smarty); |
125 |
require_once(SMARTY_DIR . 'Smarty.class.php'); |
126 |
|
127 |
|
128 |
?> |