1 |
<? |
<? |
2 |
// --------------------------------------------------------------------------- |
/** |
3 |
// $Id$ |
* --- boot org.netfrag.glib |
4 |
// --------------------------------------------------------------------------- |
* |
5 |
// $Log$ |
* @author Andreas Motl <andreas.motl@ilo.de> |
6 |
// Revision 1.3 2003/02/04 08:26:18 joko |
* @package org.netfrag.glib |
7 |
// + fixed comment |
* |
8 |
// |
*/ |
9 |
// Revision 1.2 2003/02/04 08:25:43 joko |
|
10 |
// + minor modification regarding configuration/resource variable hierarchy |
/** |
11 |
// |
* <b>Cvs-Log:</b> |
12 |
// Revision 1.1 2003/02/03 14:39:58 joko |
* |
13 |
// + initial commit |
* <pre> |
14 |
// |
* |
15 |
// --------------------------------------------------------------------------- |
* $Id$ |
16 |
|
* |
17 |
|
* $Log$ |
18 |
$smarty = $config['_startup'][path][lib][smarty]; |
* Revision 1.15 2003/04/05 19:55:24 joko |
19 |
$pear = $config['_startup'][path][lib][pear]; |
* moved some code to utils/includes.php |
20 |
$flib = $config['_startup'][path][lib][flib]; |
* |
21 |
$glib = $config['_startup'][path][lib][glib]; |
* Revision 1.14 2003/04/04 17:36:16 joko |
22 |
|
* added new required file |
23 |
|
* |
24 |
// ================== includes ================= |
* Revision 1.13 2003/03/28 06:43:20 joko |
25 |
|
* initial commit: php_constants.php |
26 |
// ------ override localized pear-libraries ------ |
* |
27 |
// determine OS |
* Revision 1.12 2003/03/11 02:23:02 joko |
28 |
$os = 'linux'; |
* + fixed metadata for phpDocumentor |
29 |
if (stristr($_SERVER["SERVER_SOFTWARE"], 'win32')) { |
* |
30 |
$os = 'windows'; |
* Revision 1.11 2003/03/11 02:14:17 joko |
31 |
} |
* + fixed metadata for phpDocumentor |
32 |
|
* |
33 |
$path_delimiter = ':'; |
* Revision 1.10 2003/03/10 23:24:59 joko |
34 |
// change path-delimiter for win32 |
* + fixed metadata for phpDocumentor |
35 |
if ($os == 'windows') { $path_delimiter = ';'; } |
* |
36 |
// build new 'include_path'-string |
* Revision 1.9 2003/03/10 23:05:24 joko |
37 |
$path_new = join($path_delimiter, array($pear, $flib, $glib, ini_get("include_path"))); |
* + fixed metadata for phpDocumentor |
38 |
ini_set("include_path", $path_new); |
* |
39 |
|
* Revision 1.8 2003/03/03 22:13:45 joko |
40 |
|
* minor update regarding includes |
41 |
// ------ pear libs ------ |
* |
42 |
// benchmarking |
* Revision 1.7 2003/03/03 21:08:47 joko |
43 |
require_once("Benchmark/Timer.php"); |
* updated |
44 |
$timer = new Benchmark_Timer; |
* |
45 |
$timer->start(); |
* Revision 1.6 2003/02/27 16:35:03 joko |
46 |
$timer->setMarker("pear libraries: including"); |
* + include path mungling now done via 'function add_include_path' |
47 |
|
* |
48 |
// logging |
* Revision 1.5 2003/02/22 16:17:56 joko |
49 |
require_once 'Log.php'; |
* + include path for new sister library org.netfrag.app |
50 |
require_once 'Log/file.php'; |
* + autoloading abstract class for backend-communication |
51 |
|
* |
52 |
|
* Revision 1.4 2003/02/09 16:52:08 joko |
53 |
|
* + updated, new modules in this library |
54 |
|
* |
55 |
|
* Revision 1.3 2003/02/04 08:26:18 joko |
56 |
|
* + fixed comment |
57 |
|
* |
58 |
|
* Revision 1.2 2003/02/04 08:25:43 joko |
59 |
|
* + minor modification regarding configuration/resource variable hierarchy |
60 |
|
* |
61 |
|
* Revision 1.1 2003/02/03 14:39:58 joko |
62 |
|
* + initial commit |
63 |
|
* |
64 |
|
* </pre> |
65 |
|
* |
66 |
|
*/ |
67 |
|
|
68 |
|
|
69 |
|
// utility- and helper functions- and classes |
70 |
|
require_once("utils/includes.php"); |
71 |
|
|
72 |
|
// tune libpath |
73 |
|
// FIXME: enhance! use constants here!!! |
74 |
|
$smarty = $config['_startup'][path][lib][smarty]; |
75 |
|
$pear = $config['_startup'][path][lib][pear]; |
76 |
|
$flib = $config['_startup'][path][lib][flib]; |
77 |
|
$glib = $config['_startup'][path][lib][glib]; |
78 |
|
$lib_app = $config['_startup'][path][lib][app]; |
79 |
|
php::add_libpath(array($pear, $glib, $lib_app)); |
80 |
|
|
81 |
|
|
82 |
|
// PEAR modules |
83 |
|
|
84 |
|
// --- logging |
85 |
|
require_once 'Log.php'; |
86 |
|
require_once 'Log/file.php'; |
87 |
|
|
88 |
|
// --- benchmarking |
89 |
|
require_once("Benchmark/Timer.php"); |
90 |
|
$timer = new Benchmark_Timer; |
91 |
|
$timer->start(); |
92 |
|
$timer->setMarker("pear libraries: including"); |
93 |
|
|
94 |
// date-handling and -manipulation ... 0.02 execution time for inclusion |
// date-handling and -manipulation ... 0.02 execution time for inclusion |
95 |
require_once 'Date.php'; |
require_once 'Date.php'; |
96 |
// database... 0.03 execution time for inclusion |
// database... 0.03 execution time for inclusion |
97 |
require_once 'DB.php'; |
require_once 'DB.php'; |
|
// rpc - standard |
|
|
require_once 'XML/RPC/RPC.php'; |
|
98 |
|
|
99 |
$timer->setMarker("pear libraries: ready"); |
$timer->setMarker("pear libraries: ready"); |
100 |
|
|
101 |
|
|
102 |
// ------ glib libraries/classes ------ |
|
103 |
|
// ======================================= |
104 |
|
// ------ glib libraries/classes/components ------ |
105 |
|
|
106 |
// abstract base classes - lowlevel |
// abstract base classes - lowlevel |
107 |
require_once("DesignPattern/Object.php"); |
|
108 |
loadModule('DesignPattern::Logger'); |
// old ones, got refactored somehow |
109 |
loadModule('DesignPattern::Bridge'); |
//loadModule('DesignPattern::Object'); |
110 |
loadModule('DesignPattern::Loader'); |
//loadModule('DesignPattern::Logger'); |
111 |
|
//loadModule('DesignPattern::Bridge'); |
112 |
|
//loadModule('DesignPattern::Loader'); |
113 |
|
|
114 |
// abstract base classes - application level |
// abstract base classes - application level |
115 |
loadModule('Application::AbstractRequest'); |
loadModule('Application::AbstractBase'); |
116 |
loadModule('Application::AbstractHandler'); |
loadModule('Application::AbstractRequest'); |
117 |
|
loadModule('Application::AbstractHandler'); |
118 |
|
loadModule('Application::AbstractBackend'); |
119 |
|
|
120 |
// concrete helper classes |
// concrete classes |
|
loadModule('Data::Encode'); |
|
|
loadModule('Data::Deep'); |
|
121 |
|
|
122 |
|
// helper: data-manipulation and -encoding |
123 |
|
loadModule('Data::Encode'); |
124 |
|
loadModule('Data::Deep'); |
125 |
|
|
126 |
|
// helper: CreditCard Validator |
127 |
|
loadModule('Data::Validator::CreditCard'); |
128 |
|
|
129 |
// ------ flib libraries/classes ------ |
// core/transport: rpc-xml communication |
130 |
// error handling |
//loadModule('Data::Driver::Proxy'); |
131 |
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"); |
|
132 |
|
|
133 |
|
|
134 |
|
// ======================================= |
135 |
|
// ------ flib libraries/classes ------ |
136 |
|
php::add_libpath($flib); |
137 |
|
require_once('includes.php'); |
138 |
|
|
|
// ------ middleware libs ------ |
|
|
// rpc via mysql |
|
|
//require_once ("$lib"."message/msgpd.php.inc"); |
|
|
require_once("Application/RPC/Remote.php"); |
|
|
require_once("Application/RPC/ProxyObject.php"); |
|
139 |
|
|
140 |
// ------ local libs - abstract ------ |
// ------ local libs - abstract ------ |
141 |
// site |
// site |
145 |
//define(SMARTY_DIR, $lib . 'external/smarty/'); |
//define(SMARTY_DIR, $lib . 'external/smarty/'); |
146 |
define(SMARTY_DIR, $smarty); |
define(SMARTY_DIR, $smarty); |
147 |
require_once(SMARTY_DIR . 'Smarty.class.php'); |
require_once(SMARTY_DIR . 'Smarty.class.php'); |
148 |
|
|
149 |
?> |
?> |