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