1 |
<? |
2 |
// --------------------------------------------------------------------------- |
3 |
// $Id: includes.php,v 1.6 2003/02/27 16:35:03 joko Exp $ |
4 |
// --------------------------------------------------------------------------- |
5 |
// $Log: includes.php,v $ |
6 |
// Revision 1.6 2003/02/27 16:35:03 joko |
7 |
// + include path mungling now done via 'function add_include_path' |
8 |
// |
9 |
// Revision 1.5 2003/02/22 16:17:56 joko |
10 |
// + include path for new sister library org.netfrag.app |
11 |
// + autoloading abstract class for backend-communication |
12 |
// |
13 |
// Revision 1.4 2003/02/09 16:52:08 joko |
14 |
// + updated, new modules in this library |
15 |
// |
16 |
// Revision 1.3 2003/02/04 08:26:18 joko |
17 |
// + fixed comment |
18 |
// |
19 |
// Revision 1.2 2003/02/04 08:25:43 joko |
20 |
// + minor modification regarding configuration/resource variable hierarchy |
21 |
// |
22 |
// Revision 1.1 2003/02/03 14:39:58 joko |
23 |
// + initial commit |
24 |
// |
25 |
// --------------------------------------------------------------------------- |
26 |
|
27 |
|
28 |
// some extension functions for php |
29 |
global $PHP_EXTENSIONS_EXPORT; |
30 |
//$PHP_EXTENSIONS_EXPORT = array( 'loadModule', array('mkObject' => 'mkInstance') ); |
31 |
$PHP_EXTENSIONS_EXPORT = array( 'loadModule', array('mkComponent' => 'mkObject') ); |
32 |
//$PHP_EXTENSIONS_EXPORT = array( 'loadModule' ); |
33 |
|
34 |
require_once("php_extensions.php"); |
35 |
//$php->Dumper_mode = HTML; |
36 |
//exit; |
37 |
|
38 |
// tune libpath |
39 |
$smarty = $config['_startup'][path][lib][smarty]; |
40 |
$pear = $config['_startup'][path][lib][pear]; |
41 |
$flib = $config['_startup'][path][lib][flib]; |
42 |
$glib = $config['_startup'][path][lib][glib]; |
43 |
$lib_app = $config['_startup'][path][lib][app]; |
44 |
php::add_libpath(array($pear, $glib, $lib_app)); |
45 |
|
46 |
|
47 |
// PEAR modules |
48 |
|
49 |
// --- logging |
50 |
require_once 'Log.php'; |
51 |
require_once 'Log/file.php'; |
52 |
|
53 |
// --- benchmarking |
54 |
require_once("Benchmark/Timer.php"); |
55 |
$timer = new Benchmark_Timer; |
56 |
$timer->start(); |
57 |
$timer->setMarker("pear libraries: including"); |
58 |
|
59 |
// date-handling and -manipulation ... 0.02 execution time for inclusion |
60 |
require_once 'Date.php'; |
61 |
// database... 0.03 execution time for inclusion |
62 |
require_once 'DB.php'; |
63 |
// rpc - standard |
64 |
require_once 'XML/RPC/RPC.php'; |
65 |
|
66 |
$timer->setMarker("pear libraries: ready"); |
67 |
|
68 |
|
69 |
|
70 |
// ======================================= |
71 |
// ------ glib libraries/classes/components ------ |
72 |
|
73 |
// abstract base classes - lowlevel |
74 |
|
75 |
// old ones, got refactored somehow |
76 |
//loadModule('DesignPattern::Object'); |
77 |
//loadModule('DesignPattern::Logger'); |
78 |
//loadModule('DesignPattern::Bridge'); |
79 |
//loadModule('DesignPattern::Loader'); |
80 |
|
81 |
// abstract base classes - application level |
82 |
loadModule('Application::AbstractBase'); |
83 |
loadModule('Application::AbstractRequest'); |
84 |
loadModule('Application::AbstractHandler'); |
85 |
loadModule('Application::AbstractBackend'); |
86 |
|
87 |
// concrete classes |
88 |
|
89 |
// helper: data-manipulation and -encoding |
90 |
loadModule('Data::Encode'); |
91 |
loadModule('Data::Deep'); |
92 |
|
93 |
// helper: CreditCard Validator |
94 |
loadModule('Data::Validator::CreditCard'); |
95 |
|
96 |
// core/transport: rpc-xml communication |
97 |
//loadModule('Data::Driver::Proxy'); |
98 |
loadModule('Data::Driver::RPC::Remote'); |
99 |
|
100 |
|
101 |
// ======================================= |
102 |
// ------ flib libraries/classes ------ |
103 |
php::add_libpath($flib); |
104 |
require_once('includes.php'); |
105 |
|
106 |
|
107 |
// ------ local libs - abstract ------ |
108 |
// site |
109 |
//require_once ("$lib"."content/Site.class.php"); |
110 |
// page |
111 |
// smarty |
112 |
//define(SMARTY_DIR, $lib . 'external/smarty/'); |
113 |
define(SMARTY_DIR, $smarty); |
114 |
require_once(SMARTY_DIR . 'Smarty.class.php'); |
115 |
|
116 |
?> |