2 // Import framework stuff
3 use CoreFramework\Configuration\FrameworkConfiguration;
4 use CoreFramework\Bootstrap\FrameworkBootstrap;
5 use CoreFramework\EntryPoint\ApplicationEntryPoint;
8 * General configuration. Do not touch this file! If you need different settings
9 * create a config-local.php in this directory at and set your changed
10 * configuration entries there.
12 * @author Roland Haeder <webmaster@shipsimu.org>
14 * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Core Developer Team
15 * @license GNU GPL 3.0 or any newer version
16 * @link http://www.shipsimu.org
18 * This program is free software: you can redistribute it and/or modify
19 * it under the terms of the GNU General Public License as published by
20 * the Free Software Foundation, either version 3 of the License, or
21 * (at your option) any later version.
23 * This program is distributed in the hope that it will be useful,
24 * but WITHOUT ANY WARRANTY; without even the implied warranty of
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 * GNU General Public License for more details.
28 * You should have received a copy of the GNU General Public License
29 * along with this program. If not, see <http://www.gnu.org/licenses/>.
32 // Get a new configuration instance
33 $cfg = FrameworkConfiguration::getSelfInstance();
35 // CFG: ROOT-BASE-PATH
36 $cfg->setConfigEntry('root_base_path', ApplicationEntryPoint::getRootPath() . '/');
38 // CFG: CORE-BASE-PATH
39 $cfg->setConfigEntry('framework_base_path', ApplicationEntryPoint::detectFrameworkPath());
42 $cfg->setConfigEntry('base_url', $cfg->detectBaseUrl());
45 $cfg->setConfigEntry('database_type', 'local_file_database');
47 // CFG: LOCAL-DATABASE-PATH
48 $cfg->setConfigEntry('local_database_path', $cfg->getConfigEntry('root_base_path') . 'db/');
51 $cfg->setDefaultTimezone('Europe/Berlin');
53 // CFG: MAGIC-QUOTES-RUNTIME
54 // @DEPRECATED As PHP is deprecating this
55 $cfg->setMagicQuotesRuntime(false);
58 $cfg->setConfigEntry('class_prefix', 'class_');
61 $cfg->setConfigEntry('class_suffix', '.php');
63 // CFG: RAW-TEMPLATE-EXTENSION
64 $cfg->setConfigEntry('raw_template_extension', '.tpl');
66 // CFG: CODE-TEMPLATE-EXTENSION
67 $cfg->setConfigEntry('code_template_extension', '.ctp');
70 $cfg->setConfigEntry('selector_path', 'selector');
72 // CFG: TEMPLATE-BASE-PATH
73 $cfg->setConfigEntry('tpl_base_path', 'templates/');
75 // CFG: LANGUAGE-BASE-PATH
76 $cfg->setConfigEntry('language_base_path', 'language/');
78 // CFG: COMPRESSOR-BASE-PATH
79 $cfg->setConfigEntry('compressor_base_path', 'main/classes/compressor/');
81 // CFG: APPLICATION-BASE-PATH
82 $cfg->setConfigEntry('application_base_path', $cfg->getConfigEntry('root_base_path') . 'application/');
84 // CFG: COMPILE-OUTPUT-PATH
85 $cfg->setConfigEntry('compile_output_path', 'templates/_compiled/');
87 // CFG: HTML-TEMPLATE-CLASS
88 $cfg->setConfigEntry('html_template_class', 'CoreFramework\Template\Engine\HtmlTemplateEngine');
90 // CFG: DECO-XML-REWRITER-TEMPLATE-CLASS
91 $cfg->setConfigEntry('deco_xml_rewriter_template_class', 'CoreFramework\Template\Xml\XmlRewriterTemplateDecorator');
93 // CFG: DEBUG-HTML-CLASS
94 $cfg->setConfigEntry('debug_html_class', 'CoreFramework\Output\Debug\DebugWebOutput');
96 // CFG: DEBUG-CONSOLE-CLASS
97 $cfg->setConfigEntry('debug_console_class', 'CoreFramework\Debug\Output\DebugConsoleOutput');
99 // CFG: DEFAULT-LANGUAGE
100 $cfg->setConfigEntry('default_lang', 'de'); // A two-char language string: de for german, en for english and so on
102 // CFG: HTML-TEMPLATE-TYPE
103 $cfg->setConfigEntry('html_template_type', 'html');
105 // CFG: EMAIL-TEMPLATE-TYPE
106 $cfg->setConfigEntry('email_template_type', 'emails');
108 // CFG: CODE-HTML-TEMPLATE-TYPE
109 $cfg->setConfigEntry('code_html_template_type', 'code');
111 // CFG: CODE-CONSOLE-TEMPLATE-TYPE
112 $cfg->setConfigEntry('code_console_template_type', 'xml');
114 // CFG: IMAGE-TEMPLATE-TYPE
115 $cfg->setConfigEntry('image_template_type', 'image');
117 // CFG: MENU-TEMPLATE-TYPE
118 $cfg->setConfigEntry('menu_template_type', 'menu');
121 $cfg->setConfigEntry('output_class', 'CoreFramework\Output\WebOutput');
123 // CFG: LANGUAGE-SYSTEM-CLASS
124 $cfg->setConfigEntry('language_system_class', 'CoreFramework\Localization\LanguageSystem');
126 // CFG: SELECTOR-TEMPLATE-PREFIX
127 $cfg->setConfigEntry('tpl_selector_prefix', 'selector');
129 // CFG: WEB-CONTENT-TYPE
130 $cfg->setConfigEntry('web_content_type', 'text/html');
132 // CFG: VALID-TEMPLATE-VARIABLE
133 $cfg->setConfigEntry('tpl_valid_var', 'content');
136 $cfg->setConfigEntry('meta_author', 'Your-name-here');
138 // CFG: META-PUBLISHER
139 $cfg->setConfigEntry('meta_publisher', 'Your-name-here');
141 // CFG: META-KEYWORDS
142 $cfg->setConfigEntry('meta_keywords', 'test,test,test');
144 // CFG: META-DESCRIPTION
145 $cfg->setConfigEntry('meta_description', 'A description for your website');
147 // CFG: SELECTOR-MAIN-TEMPLATE
148 $cfg->setConfigEntry('selector_main_tpl', 'selector_main');
150 // CFG: SELECTOR-APPS-TEMPLATE
151 $cfg->setConfigEntry('selector_apps_tpl', 'selector_apps');
153 // CFG: SELECTOR-NAME
154 $cfg->setConfigEntry('selector_name', 'selector');
156 // CFG: DEFAULT-APPLICATION
157 $cfg->setConfigEntry('default_application', 'selector');
159 // CFG: VERBOSE-LEVEL
160 $cfg->setConfigEntry('verbose_level', 0);
163 $cfg->setConfigEntry('cache_class', 'CoreFramework\Cache\Memory\MemoryCache');
165 // CFG: SEARCH-CRITERIA-CLASS
166 $cfg->setConfigEntry('search_criteria_class', 'CoreFramework\Criteria\Search\SearchCriteria');
168 // CFG: DATASET-CRITERIA-CLASS
169 $cfg->setConfigEntry('dataset_criteria_class', 'CoreFramework\Criteria\DataSet\DataSetCriteria');
171 // CFG: UPDATE-CRITERIA-CLASS
172 $cfg->setConfigEntry('update_criteria_class', 'CoreFramework\Criteria\Update\UpdateCriteria');
174 // CFG: FILE-IO-CLASS
175 $cfg->setConfigEntry('file_io_class', 'CoreFramework\Handler\Filesystem\FileIoHandler');
177 // CFG: DATABASE-RESULT-CLASS
178 $cfg->setConfigEntry('database_result_class', 'CoreFramework\Result\Database\CachedDatabaseResult');
180 // CFG: FILTER-CHAIN-CLASS
181 $cfg->setConfigEntry('filter_chain_class', 'CoreFramework\Chain\Filter\FilterChain');
183 // CFG: FILE-INPUT-CLASS
184 $cfg->setConfigEntry('file_input_class', 'CoreFramework\Stream\Filesystem\FileIoStream');
186 // CFG: FILE-OUTPUT-CLASS
187 $cfg->setConfigEntry('file_output_class', 'CoreFramework\Stream\Filesystem\FileIoStream');
189 // CFG: EMAIL-VALIDATOR-FILTER-CLASS
190 $cfg->setConfigEntry('email_validator_filter_class', 'CoreFramework\Filter\Validator\Email\EmailValidatorFilter');
192 // CFG: USERNAME-VALIDATOR-FILTER-CLASS
193 $cfg->setConfigEntry('username_validator_filter_class', 'CoreFramework\Filter\Validator\Username\UserNameValidatorFilter');
195 // CFG: USERNAME-IS-GUEST-FILTER-CLASS
196 $cfg->setConfigEntry('username_is_guest_filter_class', 'CoreFramework\Filter\User\Username\UserNameIsGuestFilter');
198 // CFG: PASSWORD-VALIDATOR-FILTER-CLASS
199 $cfg->setConfigEntry('password_validator_filter_class', 'CoreFramework\Filter\Validator\Password\PasswordValidatorFilter');
201 // CFG: RULES-ACCEPTED-FILTER-CLASS
202 $cfg->setConfigEntry('rules_accepted_filter_class', 'CoreFramework\Filter\RulesCheckbox\RulesAcceptedFilter');
204 // CFG: USERNAME-VERIFIER-FILTER-CLASS
205 $cfg->setConfigEntry('username_verifier_filter_class', 'CoreFramework\Filter\Verifier\User\UserNameVerifierFilter');
207 // CFG: USER-GUEST-VERIFIER-FILTER-CLASS
208 $cfg->setConfigEntry('user_guest_verifier_filter_class', 'CoreFramework\Filter\Verifier\User\UserGuestVerifierFilter');
210 // CFG: EMAIL-VERIFIER-FILTER-CLASS
211 $cfg->setConfigEntry('email_verifier_filter_class', 'CoreFramework\Filter\Verifier\Email\EmailVerifierFilter');
213 // CFG: PASSWORD-VERIFIER-FILTER-CLASS
214 $cfg->setConfigEntry('password_verifier_filter_class', 'CoreFramework\Filter\Verifier\Password\PasswordVerifierFilter');
216 // CFG: PASSWD-GUEST-VERIFIER-FILTER-CLASS
217 $cfg->setConfigEntry('passwd_guest_verifier_filter_class', 'CoreFramework\Filter\Verifier\User\PasswordGuestVerifierFilter');
219 // CFG: EMAIL-CHANGE-FILTER-CLASS
220 $cfg->setConfigEntry('email_change_filter_class', 'CoreFramework\Filter\Change\Email\EmailChangeFilter');
222 // CFG: PASSWORD-CHANGE-FILTER-CLASS
223 $cfg->setConfigEntry('password_change_filter_class', 'CoreFramework\Filter\Change\Password\PasswordChangeFilter');
225 // CFG: ACCOUNT-PASSWORD-FILTER-CLASS
226 $cfg->setConfigEntry('account_password_filter_class', 'CoreFramework\Filter\Verifier\Password\AccountPasswordVerifierFilter');
228 // CFG: USER-STATUS-FILTER-CLASS
229 $cfg->setConfigEntry('user_status_filter_class', 'CoreFramework\Filter\Verifier\User\UserStatusVerifierFilter');
231 // CFG: USER-UNCONFIRMED-FILTER-CLASS
232 $cfg->setConfigEntry('user_unconfirmed_filter_class', 'CoreFramework\Filter\Verifier\User\UserUnconfirmedVerifierFilter');
235 $cfg->setConfigEntry('crypto_class', 'CoreFramework\Helper\Crypto\CryptoHelper');
238 $cfg->setConfigEntry('rng_class', 'CoreFramework\Crypto\RandomNumber\RandomNumberGenerator');
240 // CFG: USER-DB-WRAPPER-CLASS
241 $cfg->setConfigEntry('user_db_wrapper_class', 'CoreFramework\Database\Frontend\User\UserDatabaseWrapper');
243 // CFG: NEWS-DB-WRAPPER-CLASS
244 $cfg->setConfigEntry('news_db_wrapper_class', 'CoreFramework\Database\Frontend\News\NewsDatabaseWrapper');
246 // CFG: HTML-CMD-RESOLVER-CLASS
247 $cfg->setConfigEntry('html_cmd_resolver_class', 'CoreFramework\Resolver\Command\HtmlCommandResolver');
249 // CFG: HTML-CMD-LOGIN-RESOLVER-CLASS
250 $cfg->setConfigEntry('html_cmd_login_resolver_class', 'CoreFramework\Resolver\Command\HtmlCommandResolver');
252 // CFG: IMAGE-CMD-RESOLVER-CLASS
253 $cfg->setConfigEntry('image_cmd_resolver_class', 'CoreFramework\Resolver\Command\ImageCommandResolver');
255 // CFG: IMAGE-CMD-CODE-CAPTCHA-RESOLVER-CLASS
256 $cfg->setConfigEntry('image_cmd_code_captcha_resolver_class', 'CoreFramework\Resolver\Command\ImageCommandResolver');
259 $cfg->setConfigEntry('mailer_class', 'CoreFramework\Mailer\Debug\DebugMailer');
261 // CFG: XML-PARSER-CLASS
262 $cfg->setConfigEntry('xml_parser_class', 'CoreFramework\Parser\Xml\XmlParser');
264 // CFG: DECO-COMPACTING-XML-PARSER-CLASS
265 $cfg->setConfigEntry('deco_compacting_xml_parser_class', 'CoreFramework\Parser\Xml\XmlCompactorDecorator');
268 $cfg->setConfigEntry('math_prime', 591623);
271 $cfg->setConfigEntry('date_key', date('d-m-Y (l-F-T)', time()));
274 $cfg->setConfigEntry('salt_length', 10);
276 // CFG: RND-STR-LENGTH
277 $cfg->setConfigEntry('rnd_str_length', 128);
279 // CFG: HASH-EXTRA-MASK
280 $cfg->setConfigEntry('hash_extra_mask', '%1s:%2s:%3s'); // 1=salt, 2=extra salt, 3=plain password/string
282 // CFG: HASH-NORMAL-MASK
283 $cfg->setConfigEntry('hash_normal_mask', '%1s:%2s'); // 1=salt, 2=plain password/string
285 // CFG: IS-SINGLE-SERVER
286 $cfg->setConfigEntry('is_single_server', 'Y');
288 // CFG: POST-REGISTRATION-CLASS
289 $cfg->setConfigEntry('post_registration_class', 'CoreFramework\Action\PostRegistration\Login\LoginAfterRegistrationAction');
292 $cfg->setConfigEntry('user_class', 'CoreFramework\User\Login\Member');
295 $cfg->setConfigEntry('guest_class', 'CoreFramework\User\Guest\Guest');
297 // CFG: COOKIE-EXPIRE
298 $cfg->setConfigEntry('cookie_expire', (60*60*2)); // Two hours!
301 $cfg->setConfigEntry('cookie_path', $cfg->detectScriptPath() . '/');
303 // CFG: COOKIE-DOMAIN
304 $cfg->setConfigEntry('cookie_domain', $cfg->detectDomain()); // Is mostly the same...
307 $cfg->setConfigEntry('cookie_ssl', $cfg->isHttpSecured());
309 // CFG: CRYPT-FIXED-SALT
310 $cfg->setConfigEntry('crypt_fixed_salt', 'N');
312 // CFG: DB-UPDATE-PRIMARY-FORCED
313 $cfg->setConfigEntry('db_update_primary_forced', 'Y');
315 // CFG: GERMAN-DATE-TIME
316 $cfg->setConfigEntry('german_date_time', "%3\$s.%2\$s.%1\$s, %4\$s:%5\$s:%6\$s");
318 // CFG: PRODUCT-INSTALL-MODE
319 $cfg->setConfigEntry('product_install_mode', 'debug');
322 $cfg->setConfigEntry('decimals', 3);
324 // CFG: MENU-STACKER-CLASS
325 $cfg->setConfigEntry('menu_stacker_class', 'CoreFramework\Stacker\File\FiLoStacker');
327 // CFG: STACKER-GENERIC-MAX-SIZE
328 $cfg->setConfigEntry('stacker_generic_max_size', 100);
330 // CFG: STACKER-CURRENT-NODE-MAX-SIZE
331 $cfg->setConfigEntry('stacker_current_node_max_size', 20);
333 // CFG: LOCAL-FILE-DATABASE-CLASS
334 $cfg->setConfigEntry('local_file_database_class', 'CoreFramework\Database\Backend\Lfdb\CachedLocalFileDatabase');
336 // CFG: COMPRESSOR-CHANNEL-CLASS
337 $cfg->setConfigEntry('compressor_channel_class', 'CoreFramework\Middleware\Compressor\CompressorChannel');
339 // CFG: DEBUG-HTML-OUTPUT-TIMINGS
340 $cfg->setConfigEntry('debug_html_output_timings', 'N');
342 // CFG: DEBUG-CONSOLE-OUTPUT-TIMINGS
343 $cfg->setConfigEntry('debug_console_output_timings', 'Y');
346 $cfg->setConfigEntry('proxy_host', '');
349 $cfg->setConfigEntry('proxy_port', '');
351 // CFG: PROXY-USERNAME
352 $cfg->setConfigEntry('proxy_username', '');
354 // CFG: PROXY-PASSWORD
355 $cfg->setConfigEntry('proxy_password', '');
357 // CFG: PROXY-CONNECT-METHOD
358 $cfg->setConfigEntry('proxy_connect_method', 'Y');
360 // CFG: HOSTNAME-FILE
361 $cfg->setConfigEntry('hostname_file', '/etc/hostname');
363 // CFG: DATABASE-CACHE-ENABLED
364 $cfg->setConfigEntry('database_cache_enabled', false);
366 // CFG: DIRECTORY-CLASS
367 $cfg->setConfigEntry('directory_class', 'CoreFramework\Filesytem\Pointer\FrameworkDirectoryPointer');
369 // CFG: FILE-RAW-INPUT-CLASS
370 $cfg->setConfigEntry('file_raw_input_class', 'CoreFramework\Filesystem\Pointer\Input\FrameworkRawFileInputPointer');
372 // CFG: FILE-RAW-OUTPUT-CLASS
373 $cfg->setConfigEntry('file_raw_output_class', 'CoreFramework\Filesystem\Pointer\Output\FrameworkRawFileOutputPointer');
375 // CFG: FILE-RAW-INPUT-OUTPUT-CLASS
376 $cfg->setConfigEntry('file_raw_input_output_class', 'CoreFramework\Filesystem\Pointer\FrameworkFileInputOutputPointer');
378 // CFG: TEXT-FILE-INPUT-CLASS
379 $cfg->setConfigEntry('text_file_input_class', 'CoreFramework\Filesystem\Pointer\Input\FrameworkTextFileInputPointer');
381 // CFG: CSV-INPUT-FILE-CLASS
382 $cfg->setConfigEntry('csv_input_file_class', 'CoreFramework\Filesystem\Input\Csv\CsvInputFile');
384 // CFG: FILE-ITERATOR-CLASS
385 $cfg->setConfigEntry('file_iterator_class', 'CoreFramework\Iterator\File\FileIterator');
387 // CFG: FILE-STACK-PRE-ALLOCATE-ENABLED
388 $cfg->setConfigEntry('file_stack_pre_allocate_enabled', 'Y');
390 // CFG: FILE-STACK-PRE-ALLOCATE-COUNT
391 $cfg->setConfigEntry('file_stack_pre_allocate_count', 10000);
393 // CFG: INDEX-INDEX-CLASS
394 $cfg->setConfigEntry('file_stack_index_class', 'CoreFramework\Index\Stack\FileStackIndex');
396 // CFG: INDEX-PRE-ALLOCATE-ENABLED
397 $cfg->setConfigEntry('index_pre_allocate_enabled', 'Y');
399 // CFG: INDEX-PRE-ALLOCATE-COUNT
400 $cfg->setConfigEntry('index_pre_allocate_count', 10000);
402 // CFG: STACK-FILE-CLASS
403 $cfg->setConfigEntry('stack_file_class', 'CoreFramework\Filesystem\Stack\StackFile');
405 // CFG: INDEX-FILE-CLASS
406 $cfg->setConfigEntry('index_file_class', 'CoreFramework\Filesystem\Index\IndexFile');
408 // CFG: TASK-HANDLER-CLASS
409 $cfg->setConfigEntry('task_handler_class', 'CoreFramework\Handler\Task\TaskHandler');
411 // CFG: TASK-LIST-CLASS
412 $cfg->setConfigEntry('task_list_class', 'CoreFramework\Lists\Task\TaskList');
414 // CFG: LIST-GROUP-CLASS
415 $cfg->setConfigEntry('list_group_class', 'CoreFramework\Lists\Group\ListGroupList');
417 // CFG: DEFAULT-ITERATOR-CLASS
418 $cfg->setConfigEntry('default_iterator_class', 'CoreFramework\Iterator\DefaultIterator');
420 // CFG: IDLE-TASK-CLASS
421 $cfg->setConfigEntry('idle_task_class', 'CoreFramework\Task\IdleLoop\IdleLoopTask');
423 // CFG: TASK-IDLE-LOOP-STARTUP-DELAY
424 $cfg->setConfigEntry('task_idle_loop_startup_delay', 0);
426 // CFG: TASK-IDLE-LOOP-INTERVAL-DELAY
427 $cfg->setConfigEntry('task_idle_loop_interval_delay', 0);
429 // CFG: TASK-IDLE-LOOP-MAX-RUNS
430 $cfg->setConfigEntry('task_idle_loop_max_runs', 0);
432 // CFG: IDLE-LOOP-TIME (5 milli seconds)
433 $cfg->setConfigEntry('idle_loop_time', 5);
435 // CFG: SHUTDOWN-TASK-VISITOR-CLASS
436 $cfg->setConfigEntry('shutdown_task_visitor_class', 'CoreFramework\Visitor\Task\Shutdown\ShutdownTaskVisitor');
438 // CFG: DEFAULT-IMAGE-COMMAND
439 $cfg->setConfigEntry('default_image_command', 'build');
441 // CFG: DEFAULT-IMAGE-CONTROLLER
442 $cfg->setConfigEntry('default_image_controller', 'build');
444 // CFG: MENU-TEMPLATE-CLASS
445 $cfg->setConfigEntry('menu_template_class', 'CoreFramework\Template\Engine\MenuTemplateEngine');
447 // CFG: MENU-TEMPLATE-EXTENSION
448 $cfg->setConfigEntry('menu_template_extension', '.xml');
450 // CFG: FEATURE-FUSE-CLASS
451 $cfg->setConfigEntry('feature_fuse_class', 'CoreFramework\Feature\Fuse\FuseFeature');
453 // CFG: TEMP-FILE-PATH
454 $cfg->setConfigEntry('temp_file_path', sys_get_temp_dir());
456 // CFG: IPC-SOCKET-FILE-NAME
457 $cfg->setConfigEntry('ipc_socket_file_name', 'php_ipc_socket');
459 // CFG: EXTENSION-SCRYPT-LOADED (By default scrypt is assumed absent and later tested being there)
460 $cfg->setConfigEntry('extension_scrypt_loaded', false);
462 // CFG: EXTENSION-UUID-LOADED (By default uuid is assumed absent and later tested being there)
463 $cfg->setConfigEntry('extension_uuid_loaded', false);
465 // Remove config from this name-space. Don't worry, no configuration is cleared.