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