/[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.10 by joko, Mon Mar 10 23:24:59 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    function org_netfrag_glib_includes_dummy() { }
10    
11  // ---------------------------------------------------------------------------  // ---------------------------------------------------------------------------
12  //  $Id$  //  $Id$
13  // ---------------------------------------------------------------------------  // ---------------------------------------------------------------------------
14  //  $Log$  //  $Log$
15    //  Revision 1.10  2003/03/10 23:24:59  joko
16    //  + fixed metadata for phpDocumentor
17    //
18    //  Revision 1.9  2003/03/10 23:05:24  joko
19    //  + fixed metadata for phpDocumentor
20    //
21    //  Revision 1.8  2003/03/03 22:13:45  joko
22    //  minor update regarding includes
23    //
24    //  Revision 1.7  2003/03/03 21:08:47  joko
25    //  updated
26    //
27  //  Revision 1.6  2003/02/27 16:35:03  joko  //  Revision 1.6  2003/02/27 16:35:03  joko
28  //  + include path mungling now done via 'function add_include_path'  //  + include path mungling now done via 'function add_include_path'
29  //  //
# Line 25  Line 46 
46  // ---------------------------------------------------------------------------  // ---------------------------------------------------------------------------
47    
48    
49  // ------ override/expand php's 'include_path' setting ------  // some extension functions for php
50  function add_include_path($paths) {    global $PHP_EXTENSIONS_EXPORT;
51      //$PHP_EXTENSIONS_EXPORT = array( 'loadModule', array('mkObject' => 'mkInstance') );
52      $PHP_EXTENSIONS_EXPORT = array( 'loadModule', array('mkComponent' => 'mkObject') );
53      //$PHP_EXTENSIONS_EXPORT = array( 'loadModule' );
54    
55      require_once("php_extensions.php");
56      //$php->Dumper_mode = HTML;
57      //exit;
58            
59    if (!is_array($paths)) {  // tune libpath
60      $paths = array($paths);    $smarty = $config['_startup'][path][lib][smarty];
61    }    $pear = $config['_startup'][path][lib][pear];
62    array_push($paths, ini_get("include_path"));    $flib = $config['_startup'][path][lib][flib];
63        $glib = $config['_startup'][path][lib][glib];
64    // determine OS    $lib_app = $config['_startup'][path][lib][app];
65    $os = 'linux';    php::add_libpath(array($pear, $glib, $lib_app));
66    if (stristr($_SERVER["SERVER_SOFTWARE"], 'win32')) {  
67      $os = 'windows';  
68    }  // PEAR modules
69    
70    $path_delimiter = ':';    // --- logging
71    // change path-delimiter for win32    require_once 'Log.php';
72    if ($os == 'windows') { $path_delimiter = ';'; }    require_once 'Log/file.php';
73    // build new 'include_path'-string  
74    $path_new = join($path_delimiter, $paths);    // --- benchmarking
75    ini_set("include_path", $path_new);    require_once("Benchmark/Timer.php");
76  }    $timer = new Benchmark_Timer;
77      $timer->start();
78  $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));  
   
   
79    
 // =======================================  
 // ------ 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';  
80    // date-handling and -manipulation ... 0.02 execution time for inclusion    // date-handling and -manipulation ... 0.02 execution time for inclusion
81      require_once 'Date.php';      require_once 'Date.php';
82    // database... 0.03 execution time for inclusion    // database... 0.03 execution time for inclusion
83      require_once 'DB.php';      require_once 'DB.php';
   // rpc - standard  
   require_once 'XML/RPC/RPC.php';  
84    
85      $timer->setMarker("pear libraries: ready");      $timer->setMarker("pear libraries: ready");
86    
# Line 83  add_include_path(array($pear, $flib, $gl Line 90  add_include_path(array($pear, $flib, $gl
90  // ------ glib libraries/classes/components ------  // ------ glib libraries/classes/components ------
91        
92    // abstract base classes - lowlevel    // abstract base classes - lowlevel
93      require_once("DesignPattern/Object.php");  
94      loadModule('DesignPattern::Logger');      // old ones, got refactored somehow
95      loadModule('DesignPattern::Bridge');      //loadModule('DesignPattern::Object');
96      loadModule('DesignPattern::Loader');      //loadModule('DesignPattern::Logger');
97          //loadModule('DesignPattern::Bridge');
98        //loadModule('DesignPattern::Loader');
99    
100    // abstract base classes - application level    // abstract base classes - application level
101      loadModule('Application::AbstractBase');      loadModule('Application::AbstractBase');
102      loadModule('Application::AbstractRequest');      loadModule('Application::AbstractRequest');
# Line 104  add_include_path(array($pear, $flib, $gl Line 113  add_include_path(array($pear, $flib, $gl
113      loadModule('Data::Validator::CreditCard');      loadModule('Data::Validator::CreditCard');
114    
115      // core/transport: rpc-xml communication      // core/transport: rpc-xml communication
116      loadModule('Data::Driver::Proxy');      //loadModule('Data::Driver::Proxy');
117      loadModule('Data::Driver::RPC::Remote');      //loadModule('Data::Driver::RPC::Remote');
   
118    
119    
120  // =======================================  // =======================================
121  // ------ flib libraries/classes ------  // ------ flib libraries/classes ------
122    // error handling      php::add_libpath($flib);
123     require_once("Application/ErrorHandler.php");      require_once('includes.php');
124    // 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");  
125    
126  // ------ local libs - abstract ------  // ------ local libs - abstract ------
127    // site    // site
# Line 141  add_include_path(array($pear, $flib, $gl Line 132  add_include_path(array($pear, $flib, $gl
132     define(SMARTY_DIR, $smarty);     define(SMARTY_DIR, $smarty);
133     require_once(SMARTY_DIR . 'Smarty.class.php');     require_once(SMARTY_DIR . 'Smarty.class.php');
134    
   
135  ?>  ?>

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

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