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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by joko, Tue Feb 4 08:26:18 2003 UTC revision 1.7 by joko, Mon Mar 3 21:08:47 2003 UTC
# Line 3  Line 3 
3  //  $Id$  //  $Id$
4  // ---------------------------------------------------------------------------  // ---------------------------------------------------------------------------
5  //  $Log$  //  $Log$
6    //  Revision 1.7  2003/03/03 21:08:47  joko
7    //  updated
8    //
9    //  Revision 1.6  2003/02/27 16:35:03  joko
10    //  + include path mungling now done via 'function add_include_path'
11    //
12    //  Revision 1.5  2003/02/22 16:17:56  joko
13    //  + include path for new sister library org.netfrag.app
14    //  + autoloading abstract class for backend-communication
15    //
16    //  Revision 1.4  2003/02/09 16:52:08  joko
17    //  + updated, new modules in this library
18    //
19  //  Revision 1.3  2003/02/04 08:26:18  joko  //  Revision 1.3  2003/02/04 08:26:18  joko
20  //  + fixed comment  //  + fixed comment
21  //  //
# Line 15  Line 28 
28  // ---------------------------------------------------------------------------  // ---------------------------------------------------------------------------
29    
30    
31  $smarty = $config['_startup'][path][lib][smarty];  // some extension functions for php
32  $pear = $config['_startup'][path][lib][pear];    global $PHP_EXTENSIONS_EXPORT;
33  $flib = $config['_startup'][path][lib][flib];    //$PHP_EXTENSIONS_EXPORT = array( 'loadModule', array('mkObject' => 'mkInstance') );
34  $glib = $config['_startup'][path][lib][glib];    $PHP_EXTENSIONS_EXPORT = array( 'loadModule', array('mkComponent' => 'mkObject') );
35      //$PHP_EXTENSIONS_EXPORT = array( 'loadModule' );
36    
37  // ================== includes =================    require_once("php_extensions.php");
38      //$php->Dumper_mode = HTML;
39    // ------ override localized pear-libraries ------    //exit;
40    // determine OS      
41    $os = 'linux';  // tune libpath
42    if (stristr($_SERVER["SERVER_SOFTWARE"], 'win32')) {    $smarty = $config['_startup'][path][lib][smarty];
43      $os = 'windows';    $pear = $config['_startup'][path][lib][pear];
44    }    $flib = $config['_startup'][path][lib][flib];
45      $glib = $config['_startup'][path][lib][glib];
46    $path_delimiter = ':';    $lib_app = $config['_startup'][path][lib][app];
47    // change path-delimiter for win32    php::add_libpath(array($pear, $glib, $lib_app));
48    if ($os == 'windows') { $path_delimiter = ';'; }  
49    // build new 'include_path'-string  
50    $path_new = join($path_delimiter, array($pear, $flib, $glib, ini_get("include_path")));  // PEAR modules
51    ini_set("include_path", $path_new);  
52      // --- logging
53      require_once 'Log.php';
54  // ------ pear libs ------    require_once 'Log/file.php';
55    // benchmarking  
56      require_once("Benchmark/Timer.php");    // --- benchmarking
57      $timer = new Benchmark_Timer;    require_once("Benchmark/Timer.php");
58      $timer->start();    $timer = new Benchmark_Timer;
59      $timer->setMarker("pear libraries: including");    $timer->start();
60      $timer->setMarker("pear libraries: including");
61    // logging  
     require_once 'Log.php';  
     require_once 'Log/file.php';  
62    // date-handling and -manipulation ... 0.02 execution time for inclusion    // date-handling and -manipulation ... 0.02 execution time for inclusion
63      require_once 'Date.php';      require_once 'Date.php';
64    // database... 0.03 execution time for inclusion    // database... 0.03 execution time for inclusion
# Line 58  $glib = $config['_startup'][path][lib][g Line 69  $glib = $config['_startup'][path][lib][g
69      $timer->setMarker("pear libraries: ready");      $timer->setMarker("pear libraries: ready");
70    
71    
72  // ------ glib libraries/classes ------  
73    // =======================================
74    // ------ glib libraries/classes/components ------
75        
76    // abstract base classes - lowlevel    // abstract base classes - lowlevel
77    require_once("DesignPattern/Object.php");  
78    loadModule('DesignPattern::Logger');      // old ones, got refactored somehow
79    loadModule('DesignPattern::Bridge');      //loadModule('DesignPattern::Object');
80    loadModule('DesignPattern::Loader');      //loadModule('DesignPattern::Logger');
81          //loadModule('DesignPattern::Bridge');
82        //loadModule('DesignPattern::Loader');
83    
84    // abstract base classes - application level    // abstract base classes - application level
85    loadModule('Application::AbstractRequest');      loadModule('Application::AbstractBase');
86    loadModule('Application::AbstractHandler');      loadModule('Application::AbstractRequest');
87        loadModule('Application::AbstractHandler');
88        loadModule('Application::AbstractBackend');
89        
90    // concrete helper classes    // concrete classes
   loadModule('Data::Encode');  
   loadModule('Data::Deep');  
91    
92        // helper: data-manipulation and -encoding
93        loadModule('Data::Encode');
94        loadModule('Data::Deep');
95    
96        // helper: CreditCard Validator
97        loadModule('Data::Validator::CreditCard');
98    
99  // ------ flib libraries/classes ------      // core/transport: rpc-xml communication
100    // error handling      //loadModule('Data::Driver::Proxy');
101     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");  
102    
103    
104    // =======================================
105    // ------ flib libraries/classes ------
106        php::add_libpath($flib);
107        require_once('includes.php');
108    
 // ------ middleware libs ------  
   // rpc via mysql  
   //require_once ("$lib"."message/msgpd.php.inc");  
   require_once("Application/RPC/Remote.php");  
   require_once("Application/RPC/ProxyObject.php");  
109    
110  // ------ local libs - abstract ------  // ------ local libs - abstract ------
111    // site    // site
# Line 116  $glib = $config['_startup'][path][lib][g Line 115  $glib = $config['_startup'][path][lib][g
115     //define(SMARTY_DIR, $lib . 'external/smarty/');     //define(SMARTY_DIR, $lib . 'external/smarty/');
116     define(SMARTY_DIR, $smarty);     define(SMARTY_DIR, $smarty);
117     require_once(SMARTY_DIR . 'Smarty.class.php');     require_once(SMARTY_DIR . 'Smarty.class.php');
118      
119  ?>  ?>

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.7

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