ca94bb71b721cc7560374792f3b170d460f1066b
[web.Builder] / index.example.php
1 <?php 
2
3 // set up the paths..
4 ini_set('include_path', 
5             dirname(__FILE__). ':' . 
6             dirname(__FILE__).'/pear:' . 
7             ini_get('include_path'));
8
9 // disable getter/setters - causes more trouble than it's worth.
10 define('DB_DATAOBJECT_NO_OVERLOAD', true);
11
12 // since the builder does not have direct access to submodule databases
13 // we have to load them all up here..
14
15 $bd = dirname(__FILE__).'/Pman';
16 $cl = array();
17 $pa = array();
18 $cp = array();
19
20 foreach(scandir($bd) as $d) {
21     if (!strlen($d) || $d[0] == '.' || !file_exists("$bd/$d/DataObjects")) {
22         continue;
23     }
24     $pa[] = "$bd/$d/DataObjects/pman.ini";
25     $cl[] = "$bd/$d/DataObjects";
26     $cp[] = 'Pman_'.$d.'_DataObjects_';
27     
28 }
29  
30 $db =  'mysql://??:@??/pman';
31 $dbp = parse_url($db);
32
33 require_once 'HTML/FlexyFramework.php';
34
35 // run the thing...
36 new HTML_FlexyFramework(  array(
37     'project'=> 'Pman',
38     'debug' => 0,
39     'version' => '1.3',
40     'enable' => 'Core,Builder',
41        
42     'appNameShort' => "Builder",
43     'appName' => "Application Builder",
44     'database' => $db,
45     //'database' =>  'mysql://root:@localhost/clippingdev',
46     'Pman' => array(
47         'storedir' => '/home/edoc',
48         // need package!
49         'eximspool' => '/var/spool/exim4', 
50         
51         'isDev' => true,  // in future we need to suport non dev versions (which have single DB dir etc. 
52         
53          
54          
55     ),
56     'DB_DataObject' => array(
57         'class_location' => implode(PATH_SEPARATOR, $cl),
58         'class_prefix' => implode(PATH_SEPARATOR, $cp),
59         // this needs fixing for other
60         'ini_' . basename($dbp['path']) => implode(PATH_SEPARATOR, $pa),
61        // 'debug' => 5,
62     )
63     
64     
65 ) );