Simple exception handler and error handler added, profile update added with stubs
[shipsimu.git] / inc / config.php
1 <?php
2 /**
3  * General configuration. Do not touch this file! If you need different settings
4  * create a config-local.php in this directory at and set your changed
5  * configuration entries there.
6  *
7  * @author              Roland Haeder <webmaster@ship-simu.org>
8  * @version             0.0.0
9  * @copyright   Copyright(c) 2007, 2008 Roland Haeder, this is free software
10  * @license             GNU GPL 3.0 or any newer version
11  * @link                http://www.ship-simu.org
12  *
13  * This program is free software: you can redistribute it and/or modify
14  * it under the terms of the GNU General Public License as published by
15  * the Free Software Foundation, either version 3 of the License, or
16  * (at your option) any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21  * GNU General Public License for more details.
22  *
23  * You should have received a copy of the GNU General Public License
24  * along with this program. If not, see <http://www.gnu.org/licenses/>.
25  */
26
27 // Load the class from inc/config direktory
28 @require_once(dirname(__FILE__) . '/classes/interfaces/class_FrameworkInterface.php');
29 @require_once(dirname(__FILE__) . '/classes/interfaces/registry/class_Registerable.php');
30 @require_once(dirname(__FILE__) . '/config/class_FrameworkConfiguration.php');
31
32 // Get a new configuration instance
33 $cfg = FrameworkConfiguration::createFrameworkConfiguration();
34
35 // CFG: SERVER-PATH
36 $cfg->definePath(dirname(dirname(__FILE__)) . '/'); // DON'T MISS THE TRAILING SLASH!!!
37
38 // CFG: BASE-URL
39 $cfg->setConfigEntry('base_url', $cfg->detectBaseUrl());
40
41 // CFG: DATABASE-TYPE
42 $cfg->defineDatabaseType('local');
43
44 // CFG: LOCAL-DB-PATH
45 $cfg->setConfigEntry('local_db_path', "db/");
46
47 // CFG: TIME-ZONE
48 $cfg->setDefaultTimezone("Europe/Berlin");
49
50 // CFG: MAGIC-QUOTES-RUNTIME
51 $cfg->setMagicQuotesRuntime(false);
52
53 // CFG: PHP-SCRIPT-EXTENSION
54 $cfg->setConfigEntry('php_extension', ".php");
55
56 // CFG: CLASS-PREFIX
57 $cfg->setConfigEntry('class_prefix', "class_");
58
59 // CFG: CLASS-SUFFIX
60 $cfg->setConfigEntry('class_suffix', ".php");
61
62 // CFG: RAW-TEMPLATE-EXTENSION
63 $cfg->setConfigEntry('raw_template_extension', ".tpl");
64
65 // CFG: CODE-TEMPLATE-EXTENSION
66 $cfg->setConfigEntry('code_template_extension', ".ctp");
67
68 // CFG: SELECTOR-PATH
69 $cfg->setConfigEntry('selector_path', "selector");
70
71 // CFG: APPLICATION-HELPER
72 $cfg->setConfigEntry('app_helper_class', "ApplicationHelper");
73
74 // CFG: LAUNCH-METHOD
75 $cfg->setConfigEntry('entry_method', "entryPoint");
76
77 // CFG: TEMPLATE-BASE-PATH
78 $cfg->setConfigEntry('tpl_base_path', "templates/"); // DON'T MISS THE TRAILING SLASH!
79
80 // CFG: LANGUAGE-BASE-PATH
81 $cfg->setConfigEntry('lang_base_path', "inc/language/"); // DON'T MISS THE TRAILING SLASH!
82
83 // CFG: COMPRESSOR-BASE-PATH
84 $cfg->setConfigEntry('compressor_base_path', "inc/classes/main/compressor/"); // DON'T MISS THE TRAILING SLASH!
85
86 // CFG: APPLICATION-PATH
87 $cfg->setConfigEntry('application_path', "application");
88
89 // CFG: COMPILE-OUTPUT-PATH
90 $cfg->setConfigEntry('compile_output_path', "templates/_compiled/"); // DON'T MISS THE TRAILING SLASH!
91
92 // CFG: TEMPLATE-ENGINE
93 $cfg->setConfigEntry('template_class', "TemplateEngine");
94
95 // CFG: DEBUG-ENGINE
96 $cfg->setConfigEntry('debug_class', "DebugWebOutput");
97
98 // CFG: DEFAULT-LANGUAGE
99 $cfg->setConfigEntry('default_lang', "de"); // A two-char language string: de for german, en for english and so on
100
101 // CFG: WEB-TEMPLATE-TYPE
102 $cfg->setConfigEntry('web_template_type', "html");
103
104 // CFG: EMAIL-TEMPLATE-TYPE
105 $cfg->setConfigEntry('email_template_type', "emails");
106
107 // CFG: CODE-TEMPLATE-TYPE
108 $cfg->setConfigEntry('code_template_type', "code");
109
110 // CFG: WEB-ENGINE
111 $cfg->setConfigEntry('web_engine', "WebOutput");
112
113 // CFG: SELECTOR-TEMPLATE-PREFIX
114 $cfg->setConfigEntry('tpl_selector_prefix', "selector");
115
116 // CFG: WEB-CONTENT-TYPE
117 $cfg->setConfigEntry('web_content_type', "text/html");
118
119 // CFG: HEADER-CHARSET
120 $cfg->setConfigEntry('header_charset', "utf-8");
121
122 // CFG: VALID-TEMPLATE-VARIABLE
123 $cfg->setConfigEntry('tpl_valid_var', "content");
124
125 // CFG: META-AUTHOR
126 $cfg->setConfigEntry('meta_author', "Roland H&auml;der");
127
128 // CFG: META-PUBLISHER
129 $cfg->setConfigEntry('meta_publisher', "Roland H&auml;der");
130
131 // CFG: META-KEYWORDS
132 $cfg->setConfigEntry('meta_keywords', "test,test,test");
133
134 // CFG: META-DESCRIPTION
135 $cfg->setConfigEntry('meta_description', "A lame description for an application framework");
136
137 // CFG: SELECTOR-MAIN-TEMPLATE
138 $cfg->setConfigEntry('selector_main_tpl', "selector_main");
139
140 // CFG: SELECTOR-APPS-TEMPLATE
141 $cfg->setConfigEntry('selector_apps_tpl', "selector_apps");
142
143 // CFG: SELECTOR-NAME
144 $cfg->setConfigEntry('selector_name', "selector");
145
146 // CFG: DEFAULT-APPLICATION
147 $cfg->setConfigEntry('default_application', "selector");
148
149 // CFG: VERBOSE-LEVEL
150 $cfg->setConfigEntry('verbose_level', 0);
151
152 // CFG: CACHE-TYPE
153 $cfg->setConfigEntry('cache_class', "MemoryCache");
154
155 // CFG: SEARCH-CRITERIA
156 $cfg->setConfigEntry('search_criteria_class', "SearchCriteria");
157
158 // CFG: DATASET-CRITERIA
159 $cfg->setConfigEntry('dataset_criteria_class', "DataSetCriteria");
160
161 // CFG: UPDATE-CRITERIA
162 $cfg->setConfigEntry('update_criteria_class', "UpdateCriteria");
163
164 // CFG: FILE-IO-HANDLER
165 $cfg->setConfigEntry('file_io_class', "FileIoHandler");
166
167 // CFG: FILTER-CHAIN
168 $cfg->setConfigEntry('filter_chain_class', "FilterChain");
169
170 // CFG: FILE-INPUT-STREAM
171 $cfg->setConfigEntry('file_input_class', "FileIoStream");
172
173 // CFG: FILE-OUTPUT-STREAM
174 $cfg->setConfigEntry('file_output_class', "FileIoStream");
175
176 // CFG: EMAIL-VALIDATOR
177 $cfg->setConfigEntry('email_validator_class', "EmailValidatorFilter");
178
179 // CFG: USERNAME-VALIDATOR
180 $cfg->setConfigEntry('username_validator_class', "UserNameValidatorFilter");
181
182 // CFG: USERNAME-IS-GUEST
183 $cfg->setConfigEntry('username_is_guest_class', "UserNameIsGuestFilter");
184
185 // CFG: PASSWORD-VALIDATOR
186 $cfg->setConfigEntry('password_validator_class', "PasswordValidatorFilter");
187
188 // CFG: RULES-ACCEPTED-FILTER
189 $cfg->setConfigEntry('rules_accepted_class', "RulesAcceptedFilter");
190
191 // CFG: USERNAME-VERIFIER
192 $cfg->setConfigEntry('username_verifier_class', "UserNameVerifierFilter");
193
194 // CFG: EMAIL-VERIFIER
195 $cfg->setConfigEntry('email_verifier_class', "EmailVerifierFilter");
196
197 // CFG: PASSWORD-VERIFIER
198 $cfg->setConfigEntry('password_verifier_class', "PasswordVerifierFilter");
199
200 // CFG: EMAIL-CHANGE-CLASS
201 $cfg->setConfigEntry('email_change_class', "EmailChangeFilter");
202
203 // CFG: PASSWORD-CHANGE-FILTER
204 $cfg->setConfigEntry('password_change_class', "PasswordChangeFilter");
205
206 // CFG: CRYPTO-HELPER
207 $cfg->setConfigEntry('crypto_class', "CryptoHelper");
208
209 // CFG: RNG-CLASS
210 $cfg->setConfigEntry('rng_class', "RandomNumberGenerator");
211
212 // CFG: USER-DB-WRAPPER
213 $cfg->setConfigEntry('user_db_wrapper_class', "UserDatabaseWrapper");
214
215 // CFG: NEWS-DB-WRAPPER
216 $cfg->setConfigEntry('news_db_wrapper_class', "NewsDatabaseWrapper");
217
218 // CFG: WEB-CMD-RESOLVER
219 $cfg->setConfigEntry('web_cmd_resolver_class', "WebCommandResolver");
220
221 // CFG: MATH-PRIME
222 $cfg->setConfigEntry('math_prime', 591623);
223
224 // CFG: DATE-KEY
225 $cfg->setConfigEntry('date_key', date("d-m-Y (l-F-T)", time()));
226
227 // CFG: SALT-LENGTH
228 $cfg->setConfigEntry('salt_length', 10);
229
230 // CFG: RND-STR-LENGTH
231 $cfg->setConfigEntry('rnd_str_length', 128);
232
233 // CFG: HASH-MASK
234 $cfg->setConfigEntry('hash_mask', "%1s:%2s:%3s"); // 1=salt, 2=extra salt, 3=plain password
235
236 // CFG: IS-SINGLE-SERVER
237 $cfg->setConfigEntry('is_single_server', "Y");
238
239 // CFG: POST-REGISTRATION-ACTION
240 $cfg->setConfigEntry('post_registration_class', "LoginAfterRegistrationAction");
241
242 // CFG: USER-CLASS
243 $cfg->setConfigEntry('user_class', "User");
244
245 // CFG: GUEST-CLASS
246 $cfg->setConfigEntry('guest_class', "Guest");
247
248 // CFG: COOKIE-EXPIRE
249 $cfg->setConfigEntry('cookie_expire', (60*60*2)); // Two hours!
250
251 // CFG: COOKIE-PATH
252 $cfg->setConfigEntry('cookie_path', dirname($_SERVER['SCRIPT_NAME']) . "/");
253
254 // CFG: COOKIE-DOMAIN
255 $cfg->setConfigEntry('cookie_domain', $cfg->detectDomain()); // Is mostly the same...
256
257 // CFG: COOKIE-SSL
258 $cfg->setConfigEntry('cookie_ssl', (isset($_SERVER['HTTPS'])));
259
260 // [EOF]
261 ?>