--- nfo/php/libs/org.netfrag.glib/includes.php 2003/02/03 14:39:58 1.1 +++ nfo/php/libs/org.netfrag.glib/includes.php 2003/03/10 23:05:24 1.9 @@ -1,100 +1,124 @@ + * @package org.netfrag.glib + * + */ + + // --------------------------------------------------------------------------- -// $Id: includes.php,v 1.1 2003/02/03 14:39:58 joko Exp $ +// $Id: includes.php,v 1.9 2003/03/10 23:05:24 joko Exp $ // --------------------------------------------------------------------------- // $Log: includes.php,v $ +// Revision 1.9 2003/03/10 23:05:24 joko +// + fixed metadata for phpDocumentor +// +// Revision 1.8 2003/03/03 22:13:45 joko +// minor update regarding includes +// +// Revision 1.7 2003/03/03 21:08:47 joko +// updated +// +// Revision 1.6 2003/02/27 16:35:03 joko +// + include path mungling now done via 'function add_include_path' +// +// Revision 1.5 2003/02/22 16:17:56 joko +// + include path for new sister library org.netfrag.app +// + autoloading abstract class for backend-communication +// +// Revision 1.4 2003/02/09 16:52:08 joko +// + updated, new modules in this library +// +// Revision 1.3 2003/02/04 08:26:18 joko +// + fixed comment +// +// Revision 1.2 2003/02/04 08:25:43 joko +// + minor modification regarding configuration/resource variable hierarchy +// // Revision 1.1 2003/02/03 14:39:58 joko // + initial commit // // --------------------------------------------------------------------------- -$smarty = $config['_startup'][path][smarty]; -$pear = $config['_startup'][path][pear]; -$flib = $config['_startup'][path][flib]; -$glib = $config['_startup'][path][glib]; - - -// ================== includes ================= - - // ------ override localized pear-libraries ------ - // determine OS - $os = 'linux'; - if (stristr($_SERVER["SERVER_SOFTWARE"], 'win32')) { - $os = 'windows'; - } - - $path_delimiter = ':'; - // change path-delimiter for win32 - if ($os == 'windows') { $path_delimiter = ';'; } - // build new 'include_path'-string - $path_new = join($path_delimiter, array($pear, $flib, $glib, ini_get("include_path"))); - ini_set("include_path", $path_new); - - -// ------ pear libs ------ - // benchmarking - require_once("Benchmark/Timer.php"); - $timer = new Benchmark_Timer; - $timer->start(); - $timer->setMarker("pear libraries: including"); - - // logging - require_once 'Log.php'; - require_once 'Log/file.php'; +// some extension functions for php + global $PHP_EXTENSIONS_EXPORT; + //$PHP_EXTENSIONS_EXPORT = array( 'loadModule', array('mkObject' => 'mkInstance') ); + $PHP_EXTENSIONS_EXPORT = array( 'loadModule', array('mkComponent' => 'mkObject') ); + //$PHP_EXTENSIONS_EXPORT = array( 'loadModule' ); + + require_once("php_extensions.php"); + //$php->Dumper_mode = HTML; + //exit; + +// tune libpath + $smarty = $config['_startup'][path][lib][smarty]; + $pear = $config['_startup'][path][lib][pear]; + $flib = $config['_startup'][path][lib][flib]; + $glib = $config['_startup'][path][lib][glib]; + $lib_app = $config['_startup'][path][lib][app]; + php::add_libpath(array($pear, $glib, $lib_app)); + + +// PEAR modules + + // --- logging + require_once 'Log.php'; + require_once 'Log/file.php'; + + // --- benchmarking + require_once("Benchmark/Timer.php"); + $timer = new Benchmark_Timer; + $timer->start(); + $timer->setMarker("pear libraries: including"); + // date-handling and -manipulation ... 0.02 execution time for inclusion require_once 'Date.php'; // database... 0.03 execution time for inclusion require_once 'DB.php'; - // rpc - standard - require_once 'XML/RPC/RPC.php'; $timer->setMarker("pear libraries: ready"); -// ------ glib libraries/classes ------ - - // abstract base classes - require_once("DesignPattern/Object.php"); - loadModule('DesignPattern::Logger'); - loadModule('DesignPattern::Bridge'); - loadModule('DesignPattern::Loader'); + +// ======================================= +// ------ glib libraries/classes/components ------ - loadModule('Data::Encode'); - loadModule('Data::Deep'); + // abstract base classes - lowlevel - -// ------ flib libraries/classes ------ - // error handling - require_once("Application/ErrorHandler.php"); - // 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"); + // old ones, got refactored somehow + //loadModule('DesignPattern::Object'); + //loadModule('DesignPattern::Logger'); + //loadModule('DesignPattern::Bridge'); + //loadModule('DesignPattern::Loader'); + + // abstract base classes - application level + loadModule('Application::AbstractBase'); + loadModule('Application::AbstractRequest'); + loadModule('Application::AbstractHandler'); + loadModule('Application::AbstractBackend'); + + // concrete classes + + // helper: data-manipulation and -encoding + loadModule('Data::Encode'); + loadModule('Data::Deep'); + + // helper: CreditCard Validator + loadModule('Data::Validator::CreditCard'); + + // core/transport: rpc-xml communication + //loadModule('Data::Driver::Proxy'); + //loadModule('Data::Driver::RPC::Remote'); +// ======================================= +// ------ flib libraries/classes ------ + php::add_libpath($flib); + require_once('includes.php'); -// ------ middleware libs ------ - // rpc via mysql - //require_once ("$lib"."message/msgpd.php.inc"); - require_once("Application/RPC/Remote.php"); - require_once("Application/RPC/ProxyObject.php"); // ------ local libs - abstract ------ // site @@ -104,5 +128,5 @@ //define(SMARTY_DIR, $lib . 'external/smarty/'); define(SMARTY_DIR, $smarty); require_once(SMARTY_DIR . 'Smarty.class.php'); - + ?> \ No newline at end of file