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