| 3 |
// $Id$ |
// $Id$ |
| 4 |
// --------------------------------------------------------------------------- |
// --------------------------------------------------------------------------- |
| 5 |
// $Log$ |
// $Log$ |
| 6 |
|
// Revision 1.5 2003/02/22 16:17:56 joko |
| 7 |
|
// + include path for new sister library org.netfrag.app |
| 8 |
|
// + autoloading abstract class for backend-communication |
| 9 |
|
// |
| 10 |
|
// Revision 1.4 2003/02/09 16:52:08 joko |
| 11 |
|
// + updated, new modules in this library |
| 12 |
|
// |
| 13 |
|
// Revision 1.3 2003/02/04 08:26:18 joko |
| 14 |
|
// + fixed comment |
| 15 |
|
// |
| 16 |
|
// Revision 1.2 2003/02/04 08:25:43 joko |
| 17 |
|
// + minor modification regarding configuration/resource variable hierarchy |
| 18 |
|
// |
| 19 |
// Revision 1.1 2003/02/03 14:39:58 joko |
// Revision 1.1 2003/02/03 14:39:58 joko |
| 20 |
// + initial commit |
// + initial commit |
| 21 |
// |
// |
| 22 |
// --------------------------------------------------------------------------- |
// --------------------------------------------------------------------------- |
| 23 |
|
|
| 24 |
|
|
| 25 |
$smarty = $config['_startup'][path][smarty]; |
$smarty = $config['_startup'][path][lib][smarty]; |
| 26 |
$pear = $config['_startup'][path][pear]; |
$pear = $config['_startup'][path][lib][pear]; |
| 27 |
$flib = $config['_startup'][path][flib]; |
$flib = $config['_startup'][path][lib][flib]; |
| 28 |
$glib = $config['_startup'][path][glib]; |
$glib = $config['_startup'][path][lib][glib]; |
| 29 |
|
$lib_app = $config['_startup'][path][lib][app]; |
| 30 |
|
|
| 31 |
|
|
| 32 |
// ================== includes ================= |
// ------ override/expand php's 'include_path' setting ------ |
|
|
|
|
// ------ override localized pear-libraries ------ |
|
| 33 |
// determine OS |
// determine OS |
| 34 |
$os = 'linux'; |
$os = 'linux'; |
| 35 |
if (stristr($_SERVER["SERVER_SOFTWARE"], 'win32')) { |
if (stristr($_SERVER["SERVER_SOFTWARE"], 'win32')) { |
| 40 |
// change path-delimiter for win32 |
// change path-delimiter for win32 |
| 41 |
if ($os == 'windows') { $path_delimiter = ';'; } |
if ($os == 'windows') { $path_delimiter = ';'; } |
| 42 |
// build new 'include_path'-string |
// build new 'include_path'-string |
| 43 |
$path_new = join($path_delimiter, array($pear, $flib, $glib, ini_get("include_path"))); |
$path_new = join($path_delimiter, array($pear, $flib, $glib, $lib_app, ini_get("include_path"))); |
| 44 |
ini_set("include_path", $path_new); |
ini_set("include_path", $path_new); |
| 45 |
|
|
| 46 |
|
|
| 47 |
|
// ======================================= |
| 48 |
// ------ pear libs ------ |
// ------ pear libs ------ |
| 49 |
// benchmarking |
// benchmarking |
| 50 |
require_once("Benchmark/Timer.php"); |
require_once("Benchmark/Timer.php"); |
| 65 |
$timer->setMarker("pear libraries: ready"); |
$timer->setMarker("pear libraries: ready"); |
| 66 |
|
|
| 67 |
|
|
| 68 |
// ------ glib libraries/classes ------ |
|
| 69 |
|
// ======================================= |
| 70 |
// abstract base classes |
// ------ glib libraries/classes/components ------ |
|
require_once("DesignPattern/Object.php"); |
|
|
loadModule('DesignPattern::Logger'); |
|
|
loadModule('DesignPattern::Bridge'); |
|
|
loadModule('DesignPattern::Loader'); |
|
| 71 |
|
|
| 72 |
loadModule('Data::Encode'); |
// abstract base classes - lowlevel |
| 73 |
loadModule('Data::Deep'); |
require_once("DesignPattern/Object.php"); |
| 74 |
|
loadModule('DesignPattern::Logger'); |
| 75 |
|
loadModule('DesignPattern::Bridge'); |
| 76 |
|
loadModule('DesignPattern::Loader'); |
| 77 |
|
|
| 78 |
|
// abstract base classes - application level |
| 79 |
|
loadModule('Application::AbstractBase'); |
| 80 |
|
loadModule('Application::AbstractRequest'); |
| 81 |
|
loadModule('Application::AbstractHandler'); |
| 82 |
|
loadModule('Application::AbstractBackend'); |
| 83 |
|
|
| 84 |
|
// concrete classes |
| 85 |
|
|
| 86 |
|
// helper: data-manipulation and -encoding |
| 87 |
|
loadModule('Data::Encode'); |
| 88 |
|
loadModule('Data::Deep'); |
| 89 |
|
|
| 90 |
|
// helper: CreditCard Validator |
| 91 |
|
loadModule('Data::Validator::CreditCard'); |
| 92 |
|
|
| 93 |
|
// core/transport: rpc-xml communication |
| 94 |
|
loadModule('Data::Driver::Proxy'); |
| 95 |
|
loadModule('Data::Driver::RPC::Remote'); |
| 96 |
|
|
| 97 |
|
|
| 98 |
|
|
| 99 |
|
// ======================================= |
| 100 |
// ------ flib libraries/classes ------ |
// ------ flib libraries/classes ------ |
| 101 |
// error handling |
// error handling |
| 102 |
require_once("Application/ErrorHandler.php"); |
require_once("Application/ErrorHandler.php"); |
| 103 |
// misc |
// misc |
| 104 |
require_once("utils/helper.php"); |
require_once("utils/helper.php"); |
| 105 |
require_once("utils/shortcuts.php"); |
require_once("utils/shortcuts.php"); |
|
// CreditCard class (some useful functions) |
|
|
require_once("utils/CreditCard.php"); |
|
| 106 |
// array manipulation |
// array manipulation |
| 107 |
require_once("utils/Array_Manip.php"); |
require_once("utils/Array_Manip.php"); |
| 108 |
|
|
| 119 |
// tablebrowser |
// tablebrowser |
| 120 |
require_once("$flib/Site/Widget/TableBrowser.php"); |
require_once("$flib/Site/Widget/TableBrowser.php"); |
| 121 |
|
|
|
|
|
|
|
|
|
// ------ middleware libs ------ |
|
|
// rpc via mysql |
|
|
//require_once ("$lib"."message/msgpd.php.inc"); |
|
|
require_once("Application/RPC/Remote.php"); |
|
|
require_once("Application/RPC/ProxyObject.php"); |
|
|
|
|
| 122 |
// ------ local libs - abstract ------ |
// ------ local libs - abstract ------ |
| 123 |
// site |
// site |
| 124 |
//require_once ("$lib"."content/Site.class.php"); |
//require_once ("$lib"."content/Site.class.php"); |
| 127 |
//define(SMARTY_DIR, $lib . 'external/smarty/'); |
//define(SMARTY_DIR, $lib . 'external/smarty/'); |
| 128 |
define(SMARTY_DIR, $smarty); |
define(SMARTY_DIR, $smarty); |
| 129 |
require_once(SMARTY_DIR . 'Smarty.class.php'); |
require_once(SMARTY_DIR . 'Smarty.class.php'); |
| 130 |
|
|
| 131 |
|
|
| 132 |
?> |
?> |