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