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