TODO: We should find something better than BaseFrameworkSystem as a type-hint
[shipsimu.git] / ship-simu / inc / config.php
1 <?php
2 /**
3  * Base configuration, you should edit config-local.php (or create it) instead
4  * of editing this configuration file.
5  *
6  * @author              Roland Haeder <webmaster@ship-simu.org>
7  * @version             0.0
8  * @copyright   Copyright(c) 2007, 2008 Roland Haeder, this is free software
9  * @license             GNU GPL 3.0 or any newer version
10  *
11  * This program is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation, either version 3 of the License, or
14  * (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
23  */
24
25 // Load the class from inc/config direktory
26 @require_once(dirname(__FILE__) . "/config/class_FrameworkConfiguration.php");
27
28 // Get a new configuration instance
29 $cfg = FrameworkConfiguration::createFrameworkConfiguration();
30
31 // CFG: SERVER-PATH
32 $cfg->definePath(dirname(dirname(__FILE__)) . "/"); // DON'T MISS THE TRAILING SLASH!!!
33
34 // CFG: DATABASE-TYPE
35 $cfg->defineDatabaseType("local");
36
37 // CFG: TIME-ZONE
38 $cfg->setDefaultTimezone("Europe/Berlin");
39
40 // CFG: MAGIC-QUOTES-RUNTIME
41 $cfg->setMagicQuotesRuntime(false);
42
43 // CFG: PHP-SCRIPT-EXTENSION
44 $cfg->setConfigEntry("php_extension", ".php");
45
46 // CFG: CLASS-PREFIX
47 $cfg->setConfigEntry("class_prefix", "class_");
48
49 // CFG: CLASS-SUFFIX
50 $cfg->setConfigEntry("class_suffix", ".php");
51
52 // CFG: RAW-TEMPLATE-EXTENSION
53 $cfg->setConfigEntry("raw_template_extension", ".tpl");
54
55 // CFG: CODE-TEMPLATE-EXTENSION
56 $cfg->setConfigEntry("code_template_extension", ".ctp");
57
58 // CFG: SELECTOR-GET
59 $cfg->setConfigEntry("app_selector_get", "app");
60
61 // CFG: APPLICATION-HELPER
62 $cfg->setConfigEntry("app_helper_class", "ApplicationHelper");
63
64 // CFG: SELECTOR-PATH
65 $cfg->setConfigEntry("selector_path", "selector");
66
67 // CFG: TEMPLATE-BASE-PATH
68 $cfg->setConfigEntry("tpl_base_path", "templates/"); // DON'T MISS THE TRAILING SLASH!
69
70 // CFG: LANGUAGE-BASE-PATH
71 $cfg->setConfigEntry("lang_base_path", "inc/language/"); // DON'T MISS THE TRAILING SLASH!
72
73 // CFG: COMPRESSOR-BASE-PATH
74 $cfg->setConfigEntry("compressor_base_path", "inc/classes/main/compressor/"); // DON'T MISS THE TRAILING SLASH!
75
76 // CFG: APPLICATION-PATH
77 $cfg->setConfigEntry("application_path", "application");
78
79 // CFG: COMPILE-OUTPUT-PATH
80 $cfg->setConfigEntry("compile_output_path", "templates/_compiled/"); // DON'T MISS THE TRAILING SLASH!
81
82 // CFG: TEMPLATE-ENGINE
83 $cfg->setConfigEntry("tpl_engine", "TemplateEngine");
84
85 // CFG: DEBUG-ENGINE
86 $cfg->setConfigEntry("debug_engine", "DebugWebOutput");
87
88 // CFG: DEFAULT-LANGUAGE
89 $cfg->setConfigEntry("default_lang", "de"); // A two-char language string: de for german, en for english and so on
90
91 // CFG: WEB-TEMPLATE-TYPE
92 $cfg->setConfigEntry("web_template_type", "html");
93
94 // CFG: EMAIL-TEMPLATE-TYPE
95 $cfg->setConfigEntry("email_template_type", "emails");
96
97 // CFG: CODE-TEMPLATE-TYPE
98 $cfg->setConfigEntry("code_template_type", "code");
99
100 // CFG: WEB-ENGINE
101 $cfg->setConfigEntry("web_engine", "WebOutput");
102
103 // CFG: SELECTOR-TEMPLATE-PREFIX
104 $cfg->setConfigEntry("tpl_selector_prefix", "selector");
105
106 // CFG: WEB-CONTENT-TYPE
107 $cfg->setConfigEntry("web_content_type", "text/html");
108
109 // CFG: VALID-TEMPLATE-VARIABLE
110 $cfg->setConfigEntry("tpl_valid_var", "content");
111
112 // CFG: META-AUTHOR
113 $cfg->setConfigEntry("meta_author", "Roland H&auml;der");
114
115 // CFG: META-PUBLISHER
116 $cfg->setConfigEntry("meta_publisher", "Roland H&auml;der");
117
118 // CFG: META-KEYWORDS
119 $cfg->setConfigEntry("meta_keywords", "test,test,test");
120
121 // CFG: META-DESCRIPTION
122 $cfg->setConfigEntry("meta_description", "A lame description for an application framework");
123
124 // CFG: LAUNCH-METHOD
125 $cfg->setConfigEntry("entry_method", "entryPoint");
126
127 // CFG: SELECTOR-MAIN-TEMPLATE
128 $cfg->setConfigEntry("selector_main_tpl", "selector_main");
129
130 // CFG: SELECTOR-APPS-TEMPLATE
131 $cfg->setConfigEntry("selector_apps_tpl", "selector_apps");
132
133 // CFG: SELECTOR-NAME
134 $cfg->setConfigEntry("selector_name", "selector");
135
136 // CFG: DEFAULT-APPLICATION
137 $cfg->setConfigEntry("default_application", "selector");
138
139 // CFG: VERBOSE-LEVEL
140 $cfg->setConfigEntry("verbose_level", 0);
141
142 // Shall we include config-local.php where you can configure some things? Then
143 // We need to do some things:
144 //
145 // First generate FQFN
146 $localConfig = sprintf("%sinc/config-local%s", PATH, $cfg->readConfig("php_extension"));
147
148 // Second is the file there and readable?
149 if ((file_exists($localConfig)) && (is_readable($localConfig))) {
150         // The third step to load it
151         require_once($localConfig);
152 }
153
154 // [EOF]
155 ?>