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