/[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.6 by joko, Thu Feb 27 16:35:03 2003 UTC revision 1.13 by joko, Fri Mar 28 06:43:20 2003 UTC
# Line 1  Line 1 
1  <?  <?
2  // ---------------------------------------------------------------------------  /**
3  //  $Id$   * --- boot org.netfrag.glib
4  // ---------------------------------------------------------------------------   *
5  //  $Log$   * @author Andreas Motl <andreas.motl@ilo.de>
6  //  Revision 1.6  2003/02/27 16:35:03  joko   * @package org.netfrag.glib
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   * <b>Cvs-Log:</b>
12  //   *
13  //  Revision 1.4  2003/02/09 16:52:08  joko   * <pre>
14  //  + updated, new modules in this library   *
15  //   *  $Id$
16  //  Revision 1.3  2003/02/04 08:26:18  joko   *
17  //  + fixed comment   *  $Log$
18  //   *  Revision 1.13  2003/03/28 06:43:20  joko
19  //  Revision 1.2  2003/02/04 08:25:43  joko   *  initial commit: php_constants.php
20  //  + minor modification regarding configuration/resource variable hierarchy   *
21  //   *  Revision 1.12  2003/03/11 02:23:02  joko
22  //  Revision 1.1  2003/02/03 14:39:58  joko   *  + fixed metadata for phpDocumentor
23  //  + initial commit   *
24  //   *  Revision 1.11  2003/03/11 02:14:17  joko
25  // ---------------------------------------------------------------------------   *  + fixed metadata for phpDocumentor
26     *
27     *  Revision 1.10  2003/03/10 23:24:59  joko
28  // ------ override/expand php's 'include_path' setting ------   *  + fixed metadata for phpDocumentor
29  function add_include_path($paths) {   *
30     *  Revision 1.9  2003/03/10 23:05:24  joko
31     *  + fixed metadata for phpDocumentor
32     *
33     *  Revision 1.8  2003/03/03 22:13:45  joko
34     *  minor update regarding includes
35     *
36     *  Revision 1.7  2003/03/03 21:08:47  joko
37     *  updated
38     *
39     *  Revision 1.6  2003/02/27 16:35:03  joko
40     *  + include path mungling now done via 'function add_include_path'
41     *
42     *  Revision 1.5  2003/02/22 16:17:56  joko
43     *  + include path for new sister library org.netfrag.app
44     *  + autoloading abstract class for backend-communication
45     *
46     *  Revision 1.4  2003/02/09 16:52:08  joko
47     *  + updated, new modules in this library
48     *
49     *  Revision 1.3  2003/02/04 08:26:18  joko
50     *  + fixed comment
51     *
52     *  Revision 1.2  2003/02/04 08:25:43  joko
53     *  + minor modification regarding configuration/resource variable hierarchy
54     *
55     *  Revision 1.1  2003/02/03 14:39:58  joko
56     *  + initial commit
57     *
58     * </pre>
59     *
60     */
61    
62    
63    // some constant handling extension functions for php
64      require_once("php_constants.php");
65    
66    // some extension functions for php
67      global $PHP_EXTENSIONS_EXPORT;
68      //$PHP_EXTENSIONS_EXPORT = array( 'loadModule', array('mkObject' => 'mkInstance') );
69      $PHP_EXTENSIONS_EXPORT = array( 'loadModule', array('mkComponent' => 'mkObject') );
70      //$PHP_EXTENSIONS_EXPORT = array( 'loadModule' );
71    
72      require_once("php_extensions.php");
73      //$php->Dumper_mode = HTML;
74      //exit;
75            
76    if (!is_array($paths)) {  // tune libpath
77      $paths = array($paths);    $smarty = $config['_startup'][path][lib][smarty];
78    }    $pear = $config['_startup'][path][lib][pear];
79    array_push($paths, ini_get("include_path"));    $flib = $config['_startup'][path][lib][flib];
80        $glib = $config['_startup'][path][lib][glib];
81    // determine OS    $lib_app = $config['_startup'][path][lib][app];
82    $os = 'linux';    php::add_libpath(array($pear, $glib, $lib_app));
83    if (stristr($_SERVER["SERVER_SOFTWARE"], 'win32')) {  
84      $os = 'windows';  
85    }  // PEAR modules
86    
87    $path_delimiter = ':';    // --- logging
88    // change path-delimiter for win32    require_once 'Log.php';
89    if ($os == 'windows') { $path_delimiter = ';'; }    require_once 'Log/file.php';
90    // build new 'include_path'-string  
91    $path_new = join($path_delimiter, $paths);    // --- benchmarking
92    ini_set("include_path", $path_new);    require_once("Benchmark/Timer.php");
93  }    $timer = new Benchmark_Timer;
94      $timer->start();
95  $smarty = $config['_startup'][path][lib][smarty];    $timer->setMarker("pear libraries: including");
 $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];  
   
 add_include_path(array($pear, $flib, $glib, $lib_app));  
96    
   
   
 // =======================================  
 // ------ 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';  
97    // date-handling and -manipulation ... 0.02 execution time for inclusion    // date-handling and -manipulation ... 0.02 execution time for inclusion
98      require_once 'Date.php';      require_once 'Date.php';
99    // database... 0.03 execution time for inclusion    // database... 0.03 execution time for inclusion
100      require_once 'DB.php';      require_once 'DB.php';
   // rpc - standard  
   require_once 'XML/RPC/RPC.php';  
101    
102      $timer->setMarker("pear libraries: ready");      $timer->setMarker("pear libraries: ready");
103    
# Line 83  add_include_path(array($pear, $flib, $gl Line 107  add_include_path(array($pear, $flib, $gl
107  // ------ glib libraries/classes/components ------  // ------ glib libraries/classes/components ------
108        
109    // abstract base classes - lowlevel    // abstract base classes - lowlevel
110      require_once("DesignPattern/Object.php");  
111      loadModule('DesignPattern::Logger');      // old ones, got refactored somehow
112      loadModule('DesignPattern::Bridge');      //loadModule('DesignPattern::Object');
113      loadModule('DesignPattern::Loader');      //loadModule('DesignPattern::Logger');
114          //loadModule('DesignPattern::Bridge');
115        //loadModule('DesignPattern::Loader');
116    
117    // abstract base classes - application level    // abstract base classes - application level
118      loadModule('Application::AbstractBase');      loadModule('Application::AbstractBase');
119      loadModule('Application::AbstractRequest');      loadModule('Application::AbstractRequest');
# Line 104  add_include_path(array($pear, $flib, $gl Line 130  add_include_path(array($pear, $flib, $gl
130      loadModule('Data::Validator::CreditCard');      loadModule('Data::Validator::CreditCard');
131    
132      // core/transport: rpc-xml communication      // core/transport: rpc-xml communication
133      loadModule('Data::Driver::Proxy');      //loadModule('Data::Driver::Proxy');
134      loadModule('Data::Driver::RPC::Remote');      //loadModule('Data::Driver::RPC::Remote');
   
135    
136    
137  // =======================================  // =======================================
138  // ------ flib libraries/classes ------  // ------ flib libraries/classes ------
139    // error handling      php::add_libpath($flib);
140     require_once("Application/ErrorHandler.php");      require_once('includes.php');
141    // 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");  
142    
143  // ------ local libs - abstract ------  // ------ local libs - abstract ------
144    // site    // site
# Line 141  add_include_path(array($pear, $flib, $gl Line 149  add_include_path(array($pear, $flib, $gl
149     define(SMARTY_DIR, $smarty);     define(SMARTY_DIR, $smarty);
150     require_once(SMARTY_DIR . 'Smarty.class.php');     require_once(SMARTY_DIR . 'Smarty.class.php');
151    
   
152  ?>  ?>

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.13

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