Continued:
[core.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@shipsimu.org>
8  * @version             0.0.0
9  * @copyright   Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Core Developer Team
10  * @license             GNU GPL 3.0 or any newer version
11  * @link                http://www.shipsimu.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 very basic classes, required to bootstrap
28 require(ApplicationEntryPoint::detectCorePath() . '/inc/main/interfaces/class_FrameworkInterface.php');
29 require(ApplicationEntryPoint::detectCorePath() . '/inc/main/interfaces/registry/class_Registerable.php');
30 require(ApplicationEntryPoint::detectCorePath() . '/inc/config/class_FrameworkConfiguration.php');
31
32 // Get a new configuration instance
33 $cfg = FrameworkConfiguration::getSelfInstance();
34
35 // CFG: SERVER-PATH
36 $cfg->setConfigEntry('base_path', ApplicationEntryPoint::detectCorePath() . '/');
37
38 // CFG: BASE-URL
39 $cfg->setConfigEntry('base_url', $cfg->detectBaseUrl());
40
41 // CFG: DATABASE-TYPE
42 $cfg->setConfigEntry('db_type', 'local');
43
44 // CFG: LOCAL-DB-PATH
45 $cfg->setConfigEntry('local_db_path', $cfg->getConfigEntry('base_path') . 'db/');
46
47 // CFG: TIME-ZONE
48 $cfg->setDefaultTimezone('Europe/Berlin');
49
50 // CFG: MAGIC-QUOTES-RUNTIME
51 // @DEPRECATED As PHP is deprecating this
52 $cfg->setMagicQuotesRuntime(FALSE);
53
54 // CFG: CLASS-PREFIX
55 $cfg->setConfigEntry('class_prefix', 'class_');
56
57 // CFG: CLASS-SUFFIX
58 $cfg->setConfigEntry('class_suffix', '.php');
59
60 // CFG: RAW-TEMPLATE-EXTENSION
61 $cfg->setConfigEntry('raw_template_extension', '.tpl');
62
63 // CFG: CODE-TEMPLATE-EXTENSION
64 $cfg->setConfigEntry('code_template_extension', '.ctp');
65
66 // CFG: SELECTOR-PATH
67 $cfg->setConfigEntry('selector_path', 'selector');
68
69 // CFG: APPLICATION-HELPER-CLASS
70 $cfg->setConfigEntry('app_helper_class', 'ApplicationHelper');
71
72 // CFG: LAUNCH-METHOD
73 $cfg->setConfigEntry('entry_method', 'entryPoint');
74
75 // CFG: TEMPLATE-BASE-PATH
76 $cfg->setConfigEntry('tpl_base_path', 'templates/');
77
78 // CFG: LANGUAGE-BASE-PATH
79 $cfg->setConfigEntry('lang_base_path', 'inc/language/');
80
81 // CFG: COMPRESSOR-BASE-PATH
82 $cfg->setConfigEntry('compressor_base_path', 'inc/main/classes/compressor/');
83
84 // CFG: APPLICATION-BASE-PATH
85 $cfg->setConfigEntry('application_base_path', 'application/');
86
87 // CFG: APPLICATION-PATH
88 $cfg->setConfigEntry('application_path', $cfg->getConfigEntry('base_path') . $cfg->getConfigEntry('application_base_path'));
89
90 // CFG: COMPILE-OUTPUT-PATH
91 $cfg->setConfigEntry('compile_output_path', 'templates/_compiled/');
92
93 // CFG: HTML-TEMPLATE-CLASS
94 $cfg->setConfigEntry('html_template_class', 'HtmlTemplateEngine');
95
96 // CFG: DECO-XML-REWRITER-TEMPLATE-CLASS
97 $cfg->setConfigEntry('deco_xml_rewriter_template_class', 'XmlRewriterTemplateDecorator');
98
99 // CFG: DEBUG-HTML-CLASS
100 $cfg->setConfigEntry('debug_html_class', 'DebugWebOutput');
101
102 // CFG: DEBUG-CONSOLE-CLASS
103 $cfg->setConfigEntry('debug_console_class', 'DebugConsoleOutput');
104
105 // CFG: DEFAULT-LANGUAGE
106 $cfg->setConfigEntry('default_lang', 'de'); // A two-char language string: de for german, en for english and so on
107
108 // CFG: HTML-TEMPLATE-TYPE
109 $cfg->setConfigEntry('html_template_type', 'html');
110
111 // CFG: EMAIL-TEMPLATE-TYPE
112 $cfg->setConfigEntry('email_template_type', 'emails');
113
114 // CFG: CODE-HTML-TEMPLATE-TYPE
115 $cfg->setConfigEntry('code_html_template_type', 'code');
116
117 // CFG: CODE-CONSOLE-TEMPLATE-TYPE
118 $cfg->setConfigEntry('code_console_template_type', 'xml');
119
120 // CFG: IMAGE-TEMPLATE-TYPE
121 $cfg->setConfigEntry('image_template_type', 'image');
122
123 // CFG: MENU-TEMPLATE-TYPE
124 $cfg->setConfigEntry('menu_template_type', 'menu');
125
126 // CFG: OUTPUT-CLASS
127 $cfg->setConfigEntry('output_class', 'WebOutput');
128
129 // CFG: LANGUAGE-SYSTEM-CLASS
130 $cfg->setConfigEntry('language_system_class', 'LanguageSystem');
131
132 // CFG: SELECTOR-TEMPLATE-PREFIX
133 $cfg->setConfigEntry('tpl_selector_prefix', 'selector');
134
135 // CFG: WEB-CONTENT-TYPE
136 $cfg->setConfigEntry('web_content_type', 'text/html');
137
138 // CFG: VALID-TEMPLATE-VARIABLE
139 $cfg->setConfigEntry('tpl_valid_var', 'content');
140
141 // CFG: META-AUTHOR
142 $cfg->setConfigEntry('meta_author', 'Your-name-here');
143
144 // CFG: META-PUBLISHER
145 $cfg->setConfigEntry('meta_publisher', 'Your-name-here');
146
147 // CFG: META-KEYWORDS
148 $cfg->setConfigEntry('meta_keywords', 'test,test,test');
149
150 // CFG: META-DESCRIPTION
151 $cfg->setConfigEntry('meta_description', 'A description for your website');
152
153 // CFG: SELECTOR-MAIN-TEMPLATE
154 $cfg->setConfigEntry('selector_main_tpl', 'selector_main');
155
156 // CFG: SELECTOR-APPS-TEMPLATE
157 $cfg->setConfigEntry('selector_apps_tpl', 'selector_apps');
158
159 // CFG: SELECTOR-NAME
160 $cfg->setConfigEntry('selector_name', 'selector');
161
162 // CFG: DEFAULT-APPLICATION
163 $cfg->setConfigEntry('default_application', 'selector');
164
165 // CFG: VERBOSE-LEVEL
166 $cfg->setConfigEntry('verbose_level', 0);
167
168 // CFG: CACHE-CLASS
169 $cfg->setConfigEntry('cache_class', 'MemoryCache');
170
171 // CFG: SEARCH-CRITERIA-CLASS
172 $cfg->setConfigEntry('search_criteria_class', 'SearchCriteria');
173
174 // CFG: DATASET-CRITERIA-CLASS
175 $cfg->setConfigEntry('dataset_criteria_class', 'DataSetCriteria');
176
177 // CFG: UPDATE-CRITERIA-CLASS
178 $cfg->setConfigEntry('update_criteria_class', 'UpdateCriteria');
179
180 // CFG: FILE-IO-CLASS
181 $cfg->setConfigEntry('file_io_class', 'FileIoHandler');
182
183 // CFG: DATABASE-RESULT-CLASS
184 $cfg->setConfigEntry('database_result_class', 'CachedDatabaseResult');
185
186 // CFG: FILTER-CHAIN-CLASS
187 $cfg->setConfigEntry('filter_chain_class', 'FilterChain');
188
189 // CFG: FILE-INPUT-CLASS
190 $cfg->setConfigEntry('file_input_class', 'FileIoStream');
191
192 // CFG: FILE-OUTPUT-CLASS
193 $cfg->setConfigEntry('file_output_class', 'FileIoStream');
194
195 // CFG: EMAIL-VALIDATOR-FILTER
196 $cfg->setConfigEntry('email_validator_filter', 'EmailValidatorFilter');
197
198 // CFG: USERNAME-VALIDATOR-FILTER
199 $cfg->setConfigEntry('username_validator_filter', 'UserNameValidatorFilter');
200
201 // CFG: USERNAME-IS-GUEST-FILTER
202 $cfg->setConfigEntry('username_is_guest_filter', 'UserNameIsGuestFilter');
203
204 // CFG: PASSWORD-VALIDATOR-FILTER
205 $cfg->setConfigEntry('password_validator_filter', 'PasswordValidatorFilter');
206
207 // CFG: RULES-ACCEPTED-FILTER
208 $cfg->setConfigEntry('rules_accepted_filter', 'RulesAcceptedFilter');
209
210 // CFG: USERNAME-VERIFIER-FILTER
211 $cfg->setConfigEntry('username_verifier_filter', 'UserNameVerifierFilter');
212
213 // CFG: USER-GUEST-VERIFIER-FILTER
214 $cfg->setConfigEntry('user_guest_verifier_filter', 'UserGuestVerifierFilter');
215
216 // CFG: EMAIL-VERIFIER-FILTER
217 $cfg->setConfigEntry('email_verifier_filter', 'EmailVerifierFilter');
218
219 // CFG: PASSWORD-VERIFIER-FILTER
220 $cfg->setConfigEntry('password_verifier_filter', 'PasswordVerifierFilter');
221
222 // CFG: PASSWD-GUEST-VERIFIER-FILTER
223 $cfg->setConfigEntry('passwd_guest_verifier_filter', 'PasswordGuestVerifierFilter');
224
225 // CFG: EMAIL-CHANGE-FILTER
226 $cfg->setConfigEntry('email_change_filter', 'EmailChangeFilter');
227
228 // CFG: PASSWORD-CHANGE-FILTER
229 $cfg->setConfigEntry('password_change_filter', 'PasswordChangeFilter');
230
231 // CFG: ACCOUNT-PASSWORD-FILTER
232 $cfg->setConfigEntry('account_password_filter', 'AccountPasswordVerifierFilter');
233
234 // CFG: USER-STATUS-FILTER
235 $cfg->setConfigEntry('user_status_filter', 'UserStatusVerifierFilter');
236
237 // CFG: USER-UNCONFIRMED-FILTER
238 $cfg->setConfigEntry('user_unconfirmed_filter', 'UserUnconfirmedVerifierFilter');
239
240 // CFG: CRYPTO-CLASS
241 $cfg->setConfigEntry('crypto_class', 'CryptoHelper');
242
243 // CFG: RNG-CLASS
244 $cfg->setConfigEntry('rng_class', 'RandomNumberGenerator');
245
246 // CFG: USER-DB-WRAPPER-CLASS
247 $cfg->setConfigEntry('user_db_wrapper_class', 'UserDatabaseWrapper');
248
249 // CFG: NEWS-DB-WRAPPER-CLASS
250 $cfg->setConfigEntry('news_db_wrapper_class', 'NewsDatabaseWrapper');
251
252 // CFG: HTML-CMD-RESOLVER-CLASS
253 $cfg->setConfigEntry('html_cmd_resolver_class', 'HtmlCommandResolver');
254
255 // CFG: HTML-CMD-LOGIN-RESOLVER-CLASS
256 $cfg->setConfigEntry('html_cmd_login_resolver_class', 'HtmlCommandResolver');
257
258 // CFG: IMAGE-CMD-RESOLVER-CLASS
259 $cfg->setConfigEntry('image_cmd_resolver_class', 'ImageCommandResolver');
260
261 // CFG: IMAGE-CMD-CODE-CAPTCHA-RESOLVER-CLASS
262 $cfg->setConfigEntry('image_cmd_code_captcha_resolver_class', 'ImageCommandResolver');
263
264 // CFG: MAILER-CLASS
265 $cfg->setConfigEntry('mailer_class', 'DebugMailer');
266
267 // CFG: XML-PARSER-CLASS
268 $cfg->setConfigEntry('xml_parser_class', 'XmlParser');
269
270 // CFG: DECO-COMPACTING-XML-PARSER-CLASS
271 $cfg->setConfigEntry('deco_compacting_xml_parser_class', 'XmlCompactorDecorator');
272
273 // CFG: MATH-PRIME
274 $cfg->setConfigEntry('math_prime', 591623);
275
276 // CFG: DATE-KEY
277 $cfg->setConfigEntry('date_key', date('d-m-Y (l-F-T)', time()));
278
279 // CFG: SALT-LENGTH
280 $cfg->setConfigEntry('salt_length', 10);
281
282 // CFG: RND-STR-LENGTH
283 $cfg->setConfigEntry('rnd_str_length', 128);
284
285 // CFG: HASH-EXTRA-MASK
286 $cfg->setConfigEntry('hash_extra_mask', '%1s:%2s:%3s'); // 1=salt, 2=extra salt, 3=plain password/string
287
288 // CFG: HASH-NORMAL-MASK
289 $cfg->setConfigEntry('hash_normal_mask', '%1s:%2s'); // 1=salt, 2=plain password/string
290
291 // CFG: IS-SINGLE-SERVER
292 $cfg->setConfigEntry('is_single_server', 'Y');
293
294 // CFG: POST-REGISTRATION-CLASS
295 $cfg->setConfigEntry('post_registration_class', 'LoginAfterRegistrationAction');
296
297 // CFG: USER-CLASS
298 $cfg->setConfigEntry('user_class', 'Member');
299
300 // CFG: GUEST-CLASS
301 $cfg->setConfigEntry('guest_class', 'Guest');
302
303 // CFG: COOKIE-EXPIRE
304 $cfg->setConfigEntry('cookie_expire', (60*60*2)); // Two hours!
305
306 // CFG: COOKIE-PATH
307 $cfg->setConfigEntry('cookie_path', $cfg->detectScriptPath() . '/');
308
309 // CFG: COOKIE-DOMAIN
310 $cfg->setConfigEntry('cookie_domain', $cfg->detectDomain()); // Is mostly the same...
311
312 // CFG: COOKIE-SSL
313 $cfg->setConfigEntry('cookie_ssl', $cfg->isHttpSecured());
314
315 // CFG: CRYPT-FIXED-SALT
316 $cfg->setConfigEntry('crypt_fixed_salt', 'N');
317
318 // CFG: DB-UPDATE-PRIMARY-FORCED
319 $cfg->setConfigEntry('db_update_primary_forced', 'Y');
320
321 // CFG: GERMAN-DATE-TIME
322 $cfg->setConfigEntry('german_date_time', "%3\$s.%2\$s.%1\$s, %4\$s:%5\$s:%6\$s");
323
324 // CFG: PRODUCT-INSTALL-MODE
325 $cfg->setConfigEntry('product_install_mode', 'debug');
326
327 // CFG: DECIMALS
328 $cfg->setConfigEntry('decimals', 3);
329
330 // CFG: MENU-STACKER-CLASS
331 $cfg->setConfigEntry('menu_stacker_class', 'FiLoStacker');
332
333 // CFG: STACKER-GENERIC-MAX-SIZE
334 $cfg->setConfigEntry('stacker_generic_max_size', 100);
335
336 // CFG: STACKER-CURRENT-NODE-MAX-SIZE
337 $cfg->setConfigEntry('stacker_current_node_max_size', 20);
338
339 // CFG: LOCAL-FILE-DATABASE-CLASS
340 $cfg->setConfigEntry('local_file_database_class', 'CachedLocalFileDatabase');
341
342 // CFG: COMPRESSOR-CHANNEL-CLASS
343 $cfg->setConfigEntry('compressor_channel_class', 'CompressorChannel');
344
345 // CFG: DEBUG-HTML-OUTPUT-TIMINGS
346 $cfg->setConfigEntry('debug_html_output_timings', 'N');
347
348 // CFG: DEBUG-CONSOLE-OUTPUT-TIMINGS
349 $cfg->setConfigEntry('debug_console_output_timings', 'Y');
350
351 // CFG: PROXY-HOST
352 $cfg->setConfigEntry('proxy_host', '');
353
354 // CFG: PROXY-PORT
355 $cfg->setConfigEntry('proxy_port', '');
356
357 // CFG: PROXY-USERNAME
358 $cfg->setConfigEntry('proxy_username', '');
359
360 // CFG: PROXY-PASSWORD
361 $cfg->setConfigEntry('proxy_password', '');
362
363 // CFG: PROXY-CONNECT-METHOD
364 $cfg->setConfigEntry('proxy_connect_method', 'Y');
365
366 // CFG: HOSTNAME-FILE
367 $cfg->setConfigEntry('hostname_file', '/etc/hostname');
368
369 // CFG: DATABASE-CACHE-ENABLED
370 $cfg->setConfigEntry('database_cache_enabled', FALSE);
371
372 // CFG: DIRECTORY-CLASS
373 $cfg->setConfigEntry('directory_class', 'FrameworkDirectoryPointer');
374
375 // CFG: FILE-RAW-INPUT-CLASS
376 $cfg->setConfigEntry('file_raw_input_class', 'FrameworkRawFileInputPointer');
377
378 // CFG: FILE-RAW-OUTPUT-CLASS
379 $cfg->setConfigEntry('file_raw_output_class', 'FrameworkRawFileOutputPointer');
380
381 // CFG: FILE-RAW-INPUT-OUTPUT-CLASS
382 $cfg->setConfigEntry('file_raw_input_output_class', 'FrameworkFileInputOutputPointer');
383
384 // CFG: TEXT-FILE-INPUT-CLASS
385 $cfg->setConfigEntry('text_file_input_class', 'FrameworkTextFileInputPointer');
386
387 // CFG: CSV-INPUT-FILE-CLASS
388 $cfg->setConfigEntry('csv_input_file_class', 'CsvInputFile');
389
390 // CFG: FILE-ITERATOR-CLASS
391 $cfg->setConfigEntry('file_iterator_class', 'FileIterator');
392
393 // CFG: FILE-STACK-PRE-ALLOCATE-ENABLED
394 $cfg->setConfigEntry('file_stack_pre_allocate_enabled', 'Y');
395
396 // CFG: FILE-STACK-PRE-ALLOCATE-COUNT
397 $cfg->setConfigEntry('file_stack_pre_allocate_count', 10000);
398
399 // CFG: INDEX-INDEX-CLASS
400 $cfg->setConfigEntry('file_stack_index_class', 'FileStackIndex');
401
402 // CFG: INDEX-PRE-ALLOCATE-ENABLED
403 $cfg->setConfigEntry('index_pre_allocate_enabled', 'Y');
404
405 // CFG: INDEX-PRE-ALLOCATE-COUNT
406 $cfg->setConfigEntry('index_pre_allocate_count', 10000);
407
408 // CFG: STACK-FILE-CLASS
409 $cfg->setConfigEntry('stack_file_class', 'StackFile');
410
411 // CFG: INDEX-FILE-CLASS
412 $cfg->setConfigEntry('index_file_class', 'IndexFile');
413
414 // CFG: TASK-HANDLER-CLASS
415 $cfg->setConfigEntry('task_handler_class', 'TaskHandler');
416
417 // CFG: TASK-LIST-CLASS
418 $cfg->setConfigEntry('task_list_class', 'TaskList');
419
420 // CFG: LIST-GROUP-CLASS
421 $cfg->setConfigEntry('list_group_class', 'ListGroupList');
422
423 // CFG: DEFAULT-ITERATOR-CLASS
424 $cfg->setConfigEntry('default_iterator_class', 'DefaultIterator');
425
426 // CFG: ACTIVE-TASK-VISITOR-CLASS
427 $cfg->setConfigEntry('active_task_visitor_class', 'ActiveTaskVisitor');
428
429 // CFG: IDLE-TASK-CLASS
430 $cfg->setConfigEntry('idle_task_class', 'IdleLoopTask');
431
432 // CFG: TASK-IDLE-LOOP-STARTUP-DELAY
433 $cfg->setConfigEntry('task_idle_loop_startup_delay', 0);
434
435 // CFG: TASK-IDLE-LOOP-INTERVAL-DELAY
436 $cfg->setConfigEntry('task_idle_loop_interval_delay', 0);
437
438 // CFG: TASK-IDLE-LOOP-MAX-RUNS
439 $cfg->setConfigEntry('task_idle_loop_max_runs', 0);
440
441 // CFG: IDLE-LOOP-TIME (5 milli seconds)
442 $cfg->setConfigEntry('idle_loop_time', 5);
443
444 // CFG: SHUTDOWN-TASK-VISITOR-CLASS
445 $cfg->setConfigEntry('shutdown_task_visitor_class', 'ShutdownTaskVisitor');
446
447 // CFG: DEFAULT-IMAGE-COMMAND
448 $cfg->setConfigEntry('default_image_command', 'build');
449
450 // CFG: DEFAULT-IMAGE-CONTROLLER
451 $cfg->setConfigEntry('default_image_controller', 'build');
452
453 // CFG: MENU-TEMPLATE-CLASS
454 $cfg->setConfigEntry('menu_template_class', 'MenuTemplateEngine');
455
456 // CFG: MENU-TEMPLATE-EXTENSION
457 $cfg->setConfigEntry('menu_template_extension', '.xml');
458
459 // CFG: FEATURE-FUSE-CLASS
460 $cfg->setConfigEntry('feature_fuse_class', 'FuseFeature');
461
462 // CFG: TEMP-FILE-PATH
463 $cfg->setConfigEntry('temp_file_path', sys_get_temp_dir());
464
465 // CFG: IPC-SOCKET-FILE-NAME
466 $cfg->setConfigEntry('ipc_socket_file_name', 'php_ipc_socket');
467
468 // CFG: EXTENSION-SCRYPT-LOADED (By default scrypt is assumed absent and later tested being there)
469 $cfg->setConfigEntry('extension_scrypt_loaded', FALSE);
470
471 // CFG: EXTENSION-UUID-LOADED (By default uuid is assumed absent and later tested being there)
472 $cfg->setConfigEntry('extension_uuid_loaded', FALSE);
473
474 // Remove config from this name-space. Don't worry, no configuration is cleared.
475 unset($cfg);
476
477 // [EOF]
478 ?>