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

Contents of /nfo/php/libs/org.netfrag.glib/Application/Core.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations)
Mon Feb 3 05:00:01 2003 UTC (21 years, 6 months ago) by joko
Branch: MAIN
+ initial commit

1 <?
2 // ---------------------------------------------------------------------------
3 // $Id: Config.php,v 1.1 2003/02/03 03:51:36 joko Exp $
4 // ---------------------------------------------------------------------------
5 // $Log: Config.php,v $
6 // ---------------------------------------------------------------------------
7
8
9 /*
10
11 ------------------------------------------------------------
12 How to use this?
13 ------------------------------------------------------------
14
15 require_once("../etc/defaults.php");
16 require_once("../etc/includes.php");
17
18 $init =
19 array(
20 'machine' => 'grasshopper',
21 'appname' => 'pub',
22 'resources' => array(
23 'machines' => '../etc/machines.php',
24 ),
25 'run' => array(
26 'boot' => array(
27 'scripts' => array( '../core/boot/boot.php' ),
28 //'objects' => array(),
29 'methods' => array( 'e_init', 'e_start', 'e_shutdown' ),
30 ),
31 ),
32 );
33
34 $appConfig = mkObject('Application::Config', $init);
35
36 $app = mkObject('Application::Core', $appConfig);
37 $app->run();
38
39 ------------------------------------------------------------
40
41 */
42
43
44 class Application_Core {
45
46 var $_config;
47
48 function Application_Core($initCfgObject = null) {
49 $this->_config = $initCfgObject;
50 }
51
52 function run() {
53 //print Dumper($this->_config);
54 foreach ($this->_config->_store[run] as $key => $container) {
55
56 // include files
57 foreach ($container[scripts] as $script) {
58 require_once($script);
59 }
60
61 // run procedural functions
62 foreach ($container[methods] as $method) {
63 call_user_func($method);
64 }
65 }
66 }
67
68 }
69
70 ?>

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