/[cvs]/nfo/php/libs/org.netfrag.glib/includes.php
ViewVC logotype

Contents of /nfo/php/libs/org.netfrag.glib/includes.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations)
Thu Feb 27 16:35:03 2003 UTC (21 years, 4 months ago) by joko
Branch: MAIN
Changes since 1.5: +24 -10 lines
+ include path mungling now done via 'function add_include_path'

1 <?
2 // ---------------------------------------------------------------------------
3 // $Id: includes.php,v 1.5 2003/02/22 16:17:56 joko Exp $
4 // ---------------------------------------------------------------------------
5 // $Log: includes.php,v $
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
20 // + initial commit
21 //
22 // ---------------------------------------------------------------------------
23
24
25 // ------ override/expand php's 'include_path' setting ------
26 function add_include_path($paths) {
27
28 if (!is_array($paths)) {
29 $paths = array($paths);
30 }
31 array_push($paths, ini_get("include_path"));
32
33 // determine OS
34 $os = 'linux';
35 if (stristr($_SERVER["SERVER_SOFTWARE"], 'win32')) {
36 $os = 'windows';
37 }
38
39 $path_delimiter = ':';
40 // change path-delimiter for win32
41 if ($os == 'windows') { $path_delimiter = ';'; }
42 // build new 'include_path'-string
43 $path_new = join($path_delimiter, $paths);
44 ini_set("include_path", $path_new);
45 }
46
47 $smarty = $config['_startup'][path][lib][smarty];
48 $pear = $config['_startup'][path][lib][pear];
49 $flib = $config['_startup'][path][lib][flib];
50 $glib = $config['_startup'][path][lib][glib];
51 $lib_app = $config['_startup'][path][lib][app];
52
53 add_include_path(array($pear, $flib, $glib, $lib_app));
54
55
56
57 // =======================================
58 // ------ pear libs ------
59 // benchmarking
60 require_once("Benchmark/Timer.php");
61 $timer = new Benchmark_Timer;
62 $timer->start();
63 $timer->setMarker("pear libraries: including");
64
65 // logging
66 require_once 'Log.php';
67 require_once 'Log/file.php';
68 // date-handling and -manipulation ... 0.02 execution time for inclusion
69 require_once 'Date.php';
70 // database... 0.03 execution time for inclusion
71 require_once 'DB.php';
72 // rpc - standard
73 require_once 'XML/RPC/RPC.php';
74
75 $timer->setMarker("pear libraries: ready");
76
77
78
79 // =======================================
80 // ------ glib libraries/classes/components ------
81
82 // abstract base classes - lowlevel
83 require_once("DesignPattern/Object.php");
84 loadModule('DesignPattern::Logger');
85 loadModule('DesignPattern::Bridge');
86 loadModule('DesignPattern::Loader');
87
88 // abstract base classes - application level
89 loadModule('Application::AbstractBase');
90 loadModule('Application::AbstractRequest');
91 loadModule('Application::AbstractHandler');
92 loadModule('Application::AbstractBackend');
93
94 // concrete classes
95
96 // helper: data-manipulation and -encoding
97 loadModule('Data::Encode');
98 loadModule('Data::Deep');
99
100 // helper: CreditCard Validator
101 loadModule('Data::Validator::CreditCard');
102
103 // core/transport: rpc-xml communication
104 loadModule('Data::Driver::Proxy');
105 loadModule('Data::Driver::RPC::Remote');
106
107
108
109 // =======================================
110 // ------ flib libraries/classes ------
111 // error handling
112 require_once("Application/ErrorHandler.php");
113 // misc
114 require_once("utils/helper.php");
115 require_once("utils/shortcuts.php");
116 // array manipulation
117 require_once("utils/Array_Manip.php");
118
119 // utf8-encodings (Internationalization)
120 // iso <-> utf8
121 //require_once("Application/i18n/TextEncode.php");
122 // language (Localization)
123 require_once("Application/l10n/LocaleText.php");
124 // site
125 require_once("Site.php");
126 // user
127 require_once("Tracker/Session.php");
128 require_once("Tracker/User.php");
129 // tablebrowser
130 require_once("$flib/Site/Widget/TableBrowser.php");
131
132 // ------ local libs - abstract ------
133 // site
134 //require_once ("$lib"."content/Site.class.php");
135 // page
136 // smarty
137 //define(SMARTY_DIR, $lib . 'external/smarty/');
138 define(SMARTY_DIR, $smarty);
139 require_once(SMARTY_DIR . 'Smarty.class.php');
140
141
142 ?>

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed