public
Description: phpBurn is a ORM for PHP usage, like hibernate and Nhibernate it allows you to create more and faster using OO concepts and patterns with a log of time gain.
Homepage: http://www.phpburn.com
Clone URL: git://github.com/klederson/phpburn.git
phpburn / example_application / config.php
100755 125 lines (110 sloc) 3.611 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<?php
/**
* This file has been designed to auto-config all your
* path variables like path, url and others automaticaly
* for this it have to stay the same folder as your index.php
*
* If you want to put it in another place you should to config manualy
* or modify our auto-generate code.
*
* @author Kléderson Bueno <klederson@klederson.com>
* @version 1.0
*/
 
ob_start();
 
//Setup locale for lots of internal reasons ( it will be good for you just make sure you use internacionalization correctly )
setlocale(LC_ALL, 'pt_BR');
 
$base_url = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") ? "https" : "http");
$base_url .= "://".$_SERVER['HTTP_HOST'];
$base_url .= str_replace(basename($_SERVER['SCRIPT_NAME']),"",$_SERVER['SCRIPT_NAME']);
 
if (function_exists('realpath') AND @realpath(dirname(__FILE__)) !== FALSE)
{
$system_folder = realpath(dirname(__FILE__)) . '/';
}
 
define('SYS_BASE_URL',$base_url,true);
define('SYS_BASE_PATH',$system_folder,true);
define('SYS_CSS_PATH',$system_folder . '/public/css/',true);
define('SYS_IMAGE_PATH',$system_folder . '/public/images/',true);
define('SYS_JAVASCRIPT_PATH',$system_folder . '/public/js/',true);
define('SYS_FILE_PATH',$system_folder . '/public/files/',true);
 
/**
* Extra Libs
*/
define('SYS_USE_FIREPHP',true,true);
define('SYS_USE_DATEFORMAT',"%a, %b : %H:%M:%S",true); //To see more read about srftime
 
$thisConfig = array(
/**
* Database configuration ( Default )
*
* This configuration will be used by defaul when
* package configs are not setted up
*/
'dialect' => 'MySQL',
'database' => 'phpburn_test',
'user' => 'phpburn',
'password' => 'phpburn',
'port' => '3306',
'host' => 'localhost',
 
/**
* Structure configuration
*/
'class_path' => SYS_BASE_PATH . DIRECTORY_SEPARATOR . 'model' . DIRECTORY_SEPARATOR,
 
/**
* database-options changes according to the database used
* So if you want to know what options have each database please
* look at documentation in section Dialects
*
* OPTIONAL
*/
'database_options' => array(),
 
/**
* options are general configs for the project
* See Configuration section at documentation for more information
*
* OPTIONAL
*/
'options' => array(),
 
/* ---------------------PACKAGES--------------------- */
/**
* Here we setup all our packages information
* If you want to use the default configuration above
* you just create:
*
* @example 'package' => array('packageone','packagetwo',.......);
*
* Or if you want to create some different config like another database
* or another host,port,user,password or even another Dialect you can use like this.
*
* @example 'package' => array(
* 'packageone',
* 'packagetwo',
* 'packagethree' => array(
* 'host' => 'sqlitefile',
* 'dialect' => 'SQLITE',
* 'database' => 'phpburn',
* 'class_path' => '/home/models/phpburn/',
* 'port' => '3000'
* ),
* 'packagefour' => array(
* 'host' => 'mssqlhost.com',
* 'dialect' => 'MSSQL',
* 'database' => 'microsoftclass',
* 'class_path' => '/home/models/microsoftclass/',
* 'port' => '666'
* ),
* 'packagefive',
* ...
* )
*/
 
'packages' => array(
'webinsys',
 
'phpburn' => array(
'host' => 'uol.com.br',
'dialect' => 'SQLITE',
'database' => 'phpburn',
'class_path' => '/home/models/phpburn/',
'port' => '3000'
),
 
'newmodel',
)
);
?>