/[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.5 by joko, Sat Feb 22 16:17:56 2003 UTC revision 1.9 by joko, Mon Mar 10 23:05:24 2003 UTC
# Line 1  Line 1 
1  <?  <?
2    /**
3     * --- boot org.netfrag.glib
4     *
5     * @author Andreas Motl <andreas.motl@ilo.de>
6     * @package org.netfrag.glib
7     *
8     */
9    
10    
11  // ---------------------------------------------------------------------------  // ---------------------------------------------------------------------------
12  //  $Id$  //  $Id$
13  // ---------------------------------------------------------------------------  // ---------------------------------------------------------------------------
14  //  $Log$  //  $Log$
15    //  Revision 1.9  2003/03/10 23:05:24  joko
16    //  + fixed metadata for phpDocumentor
17    //
18    //  Revision 1.8  2003/03/03 22:13:45  joko
19    //  minor update regarding includes
20    //
21    //  Revision 1.7  2003/03/03 21:08:47  joko
22    //  updated
23    //
24    //  Revision 1.6  2003/02/27 16:35:03  joko
25    //  + include path mungling now done via 'function add_include_path'
26    //
27  //  Revision 1.5  2003/02/22 16:17:56  joko  //  Revision 1.5  2003/02/22 16:17:56  joko
28  //  + include path for new sister library org.netfrag.app  //  + include path for new sister library org.netfrag.app
29  //  + autoloading abstract class for backend-communication  //  + autoloading abstract class for backend-communication
# Line 22  Line 43 
43  // ---------------------------------------------------------------------------  // ---------------------------------------------------------------------------
44    
45    
46  $smarty = $config['_startup'][path][lib][smarty];  // some extension functions for php
47  $pear = $config['_startup'][path][lib][pear];    global $PHP_EXTENSIONS_EXPORT;
48  $flib = $config['_startup'][path][lib][flib];    //$PHP_EXTENSIONS_EXPORT = array( 'loadModule', array('mkObject' => 'mkInstance') );
49  $glib = $config['_startup'][path][lib][glib];    $PHP_EXTENSIONS_EXPORT = array( 'loadModule', array('mkComponent' => 'mkObject') );
50  $lib_app = $config['_startup'][path][lib][app];    //$PHP_EXTENSIONS_EXPORT = array( 'loadModule' );
51    
52      require_once("php_extensions.php");
53    // ------ override/expand php's 'include_path' setting ------    //$php->Dumper_mode = HTML;
54    // determine OS    //exit;
55    $os = 'linux';      
56    if (stristr($_SERVER["SERVER_SOFTWARE"], 'win32')) {  // tune libpath
57      $os = 'windows';    $smarty = $config['_startup'][path][lib][smarty];
58    }    $pear = $config['_startup'][path][lib][pear];
59      $flib = $config['_startup'][path][lib][flib];
60    $path_delimiter = ':';    $glib = $config['_startup'][path][lib][glib];
61    // change path-delimiter for win32    $lib_app = $config['_startup'][path][lib][app];
62    if ($os == 'windows') { $path_delimiter = ';'; }    php::add_libpath(array($pear, $glib, $lib_app));
63    // build new 'include_path'-string  
64    $path_new = join($path_delimiter, array($pear, $flib, $glib, $lib_app, ini_get("include_path")));  
65    ini_set("include_path", $path_new);  // PEAR modules
66    
67      // --- logging
68      require_once 'Log.php';
69      require_once 'Log/file.php';
70    
71      // --- benchmarking
72      require_once("Benchmark/Timer.php");
73      $timer = new Benchmark_Timer;
74      $timer->start();
75      $timer->setMarker("pear libraries: including");
76    
   
 // =======================================  
 // ------ 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';  
77    // date-handling and -manipulation ... 0.02 execution time for inclusion    // date-handling and -manipulation ... 0.02 execution time for inclusion
78      require_once 'Date.php';      require_once 'Date.php';
79    // database... 0.03 execution time for inclusion    // database... 0.03 execution time for inclusion
80      require_once 'DB.php';      require_once 'DB.php';
   // rpc - standard  
   require_once 'XML/RPC/RPC.php';  
81    
82      $timer->setMarker("pear libraries: ready");      $timer->setMarker("pear libraries: ready");
83    
# Line 70  $lib_app = $config['_startup'][path][lib Line 87  $lib_app = $config['_startup'][path][lib
87  // ------ glib libraries/classes/components ------  // ------ glib libraries/classes/components ------
88        
89    // abstract base classes - lowlevel    // abstract base classes - lowlevel
90      require_once("DesignPattern/Object.php");  
91      loadModule('DesignPattern::Logger');      // old ones, got refactored somehow
92      loadModule('DesignPattern::Bridge');      //loadModule('DesignPattern::Object');
93      loadModule('DesignPattern::Loader');      //loadModule('DesignPattern::Logger');
94          //loadModule('DesignPattern::Bridge');
95        //loadModule('DesignPattern::Loader');
96    
97    // abstract base classes - application level    // abstract base classes - application level
98      loadModule('Application::AbstractBase');      loadModule('Application::AbstractBase');
99      loadModule('Application::AbstractRequest');      loadModule('Application::AbstractRequest');
# Line 91  $lib_app = $config['_startup'][path][lib Line 110  $lib_app = $config['_startup'][path][lib
110      loadModule('Data::Validator::CreditCard');      loadModule('Data::Validator::CreditCard');
111    
112      // core/transport: rpc-xml communication      // core/transport: rpc-xml communication
113      loadModule('Data::Driver::Proxy');      //loadModule('Data::Driver::Proxy');
114      loadModule('Data::Driver::RPC::Remote');      //loadModule('Data::Driver::RPC::Remote');
   
115    
116    
117  // =======================================  // =======================================
118  // ------ flib libraries/classes ------  // ------ flib libraries/classes ------
119    // error handling      php::add_libpath($flib);
120     require_once("Application/ErrorHandler.php");      require_once('includes.php');
121    // misc  
    require_once("utils/helper.php");  
    require_once("utils/shortcuts.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");  
122    
123  // ------ local libs - abstract ------  // ------ local libs - abstract ------
124    // site    // site
# Line 128  $lib_app = $config['_startup'][path][lib Line 129  $lib_app = $config['_startup'][path][lib
129     define(SMARTY_DIR, $smarty);     define(SMARTY_DIR, $smarty);
130     require_once(SMARTY_DIR . 'Smarty.class.php');     require_once(SMARTY_DIR . 'Smarty.class.php');
131    
   
132  ?>  ?>

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.9

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