Continued with rewrites:
authorRoland Haeder <roland@mxchange.org>
Sun, 26 Mar 2017 14:39:13 +0000 (16:39 +0200)
committerRoland Haeder <roland@mxchange.org>
Sun, 26 Mar 2017 14:39:13 +0000 (16:39 +0200)
- rewrote bootstrap to a more easier way, still index.php will contain a class
- this class has a method to detect the framework's path on common places
- splitted application_base_path and framework_base_path, was only base_path
  before

Signed-off-by: Roland Häder <roland@mxchange.org>
27 files changed:
application/tests/init.php
framework/bootstrap/bootstrap.inc.php [new file with mode: 0644]
framework/bootstrap/class_BootstrapFramework.php
framework/config.inc.php [new file with mode: 0644]
framework/config.php [deleted file]
framework/database.php
framework/includes.php
framework/loader/class_ClassLoader.php
framework/main/classes/database/backend/class_CachedLocalFileDatabase.php
framework/main/classes/factories/stacks/class_FileStackFactory.php
framework/main/classes/language/class_LanguageSystem.php
framework/main/classes/template/class_BaseTemplateEngine.php
framework/main/classes/template/console/class_ConsoleTemplateEngine.php
framework/main/classes/template/html/class_HtmlTemplateEngine.php
framework/main/classes/template/image/class_ImageTemplateEngine.php
framework/main/classes/template/mail/class_MailTemplateEngine.php
framework/main/classes/template/menu/class_MenuTemplateEngine.php
framework/main/middleware/compressor/class_CompressorChannel.php
framework/selector.php
index.php
tests/ConfigTest.php
tests/RegistryTest.php
tests/RequestTest.php
tests/Test.php
tests/old/contract-test.php
tests/old/loader-test.php
tests/old/personell-test.php

index 77c9fb873fc03fd4784710bf64edd5c386304118..29dfc167c42d60030a425832d0f71f0a22165607 100644 (file)
@@ -37,7 +37,7 @@ ApplicationHelper::createDebugInstance('ApplicationHelper');
 
 // This application needs a database connection then we have to simply include
 // the framework/database.php script
 
 // This application needs a database connection then we have to simply include
 // the framework/database.php script
-require($cfg->getConfigEntry('base_path') . 'framework/database.php');
+require($cfg->getConfigEntry('framework_base_path') . 'database.php');
 
 // Register core tests
 ClassLoader::registerTestsPath('framework/main/tests');
 
 // Register core tests
 ClassLoader::registerTestsPath('framework/main/tests');
diff --git a/framework/bootstrap/bootstrap.inc.php b/framework/bootstrap/bootstrap.inc.php
new file mode 100644 (file)
index 0000000..4c2ebd4
--- /dev/null
@@ -0,0 +1,32 @@
+<?php
+// Import framework stuff
+use CoreFramework\Bootstrap\BootstrapFramework;
+
+/**
+ * Start including this file to bootstrap into the framework
+ *
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2016 Core Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+// Load very basic classes, required to bootstrap
+require(__DIR__ . '/class_BootstrapFramework.php');
+
+// Bootstrap framework
+BootstrapFramework::doBootstrap();
index ee8b6b95f389d0251e0a188bfd5ade2840030442..565f3c8b93fb222c20d766fdb48979d3bc3f1034 100644 (file)
@@ -1,4 +1,10 @@
 <?php
 <?php
+// Own namespace
+namespace CoreFramework\Bootstrap;
+
+// Import framework stuff
+use CoreFramework\EntryPoint\ApplicationEntryPoint;
+
 /**
  * A framework-bootstrap class which helps the frameworks to bootstrap ... ;-)
  *
 /**
  * A framework-bootstrap class which helps the frameworks to bootstrap ... ;-)
  *
@@ -21,7 +27,7 @@
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
-class BootstrapFramework {
+final class BootstrapFramework {
        /**
         * Private constructor, no instance is needed from this class as only
         * static methods exist.
        /**
         * Private constructor, no instance is needed from this class as only
         * static methods exist.
@@ -29,7 +35,20 @@ class BootstrapFramework {
        private function __construct () {
                // Prevent making instances from this "utilities" class
        }
        private function __construct () {
                // Prevent making instances from this "utilities" class
        }
-}
 
 
-// [EOF]
-?>
+       /**
+        * Does the actual bootstrap
+        *
+        * @return      void
+        */
+       public static function doBootstrap () {
+               // Load basic include files to continue bootstrapping
+               require(ApplicationEntryPoint::detectFrameworkPath() . 'main/interfaces/class_FrameworkInterface.php');
+               require(ApplicationEntryPoint::detectFrameworkPath() . 'main/interfaces/registry/class_Registerable.php');
+               require(ApplicationEntryPoint::detectFrameworkPath() . 'config/class_FrameworkConfiguration.php');
+
+               // Load main configuration
+               require(ApplicationEntryPoint::detectFrameworkPath() . 'config.inc.php');
+       }
+
+}
diff --git a/framework/config.inc.php b/framework/config.inc.php
new file mode 100644 (file)
index 0000000..1ea3397
--- /dev/null
@@ -0,0 +1,472 @@
+<?php
+// Import framework stuff
+use CoreFramework\Configuration\FrameworkConfiguration;
+use CoreFramework\Bootstrap\BootstrapFramework;
+use CoreFramework\EntryPoint\ApplicationEntryPoint;
+
+/**
+ * General configuration. Do not touch this file! If you need different settings
+ * create a config-local.php in this directory at and set your changed
+ * configuration entries there.
+ *
+ * @author             Roland Haeder <webmaster@shipsimu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Core Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.shipsimu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+// Get a new configuration instance
+$cfg = FrameworkConfiguration::getSelfInstance();
+
+// CFG: ROOT-BASE-PATH
+$cfg->setConfigEntry('root_base_path', BootstrapFramework::detectRootPath() . '/');
+
+// CFG: CORE-BASE-PATH
+$cfg->setConfigEntry('framework_base_path', ApplicationEntryPoint::detectFrameworkPath());
+
+// CFG: BASE-URL
+$cfg->setConfigEntry('base_url', $cfg->detectBaseUrl());
+
+// CFG: DATABASE-TYPE
+$cfg->setConfigEntry('database_type', 'lfdb');
+
+// CFG: LOCAL-DATABASE-PATH
+$cfg->setConfigEntry('local_database_path', $cfg->getConfigEntry('root_base_path') . 'db/');
+
+// CFG: TIME-ZONE
+$cfg->setDefaultTimezone('Europe/Berlin');
+
+// CFG: MAGIC-QUOTES-RUNTIME
+// @DEPRECATED As PHP is deprecating this
+$cfg->setMagicQuotesRuntime(FALSE);
+
+// CFG: CLASS-PREFIX
+$cfg->setConfigEntry('class_prefix', 'class_');
+
+// CFG: CLASS-SUFFIX
+$cfg->setConfigEntry('class_suffix', '.php');
+
+// CFG: RAW-TEMPLATE-EXTENSION
+$cfg->setConfigEntry('raw_template_extension', '.tpl');
+
+// CFG: CODE-TEMPLATE-EXTENSION
+$cfg->setConfigEntry('code_template_extension', '.ctp');
+
+// CFG: SELECTOR-PATH
+$cfg->setConfigEntry('selector_path', 'selector');
+
+// CFG: LAUNCH-METHOD
+$cfg->setConfigEntry('entry_method', 'entryPoint');
+
+// CFG: TEMPLATE-BASE-PATH
+$cfg->setConfigEntry('tpl_base_path', 'templates/');
+
+// CFG: LANGUAGE-BASE-PATH
+$cfg->setConfigEntry('language_base_path', 'language/');
+
+// CFG: COMPRESSOR-BASE-PATH
+$cfg->setConfigEntry('compressor_base_path', 'main/classes/compressor/');
+
+// CFG: APPLICATION-BASE-PATH
+$cfg->setConfigEntry('application_base_path', FrameworkBootstrap::detectApplicationBasePath());
+
+// CFG: COMPILE-OUTPUT-PATH
+$cfg->setConfigEntry('compile_output_path', 'templates/_compiled/');
+
+// CFG: HTML-TEMPLATE-CLASS
+$cfg->setConfigEntry('html_template_class', 'CoreFramework\Template\Engine\HtmlTemplateEngine');
+
+// CFG: DECO-XML-REWRITER-TEMPLATE-CLASS
+$cfg->setConfigEntry('deco_xml_rewriter_template_class', 'CoreFramework\Template\Xml\XmlRewriterTemplateDecorator');
+
+// CFG: DEBUG-HTML-CLASS
+$cfg->setConfigEntry('debug_html_class', 'CoreFramework\Output\Debug\DebugWebOutput');
+
+// CFG: DEBUG-CONSOLE-CLASS
+$cfg->setConfigEntry('debug_console_class', 'CoreFramework\Debug\Output\DebugConsoleOutput');
+
+// CFG: DEFAULT-LANGUAGE
+$cfg->setConfigEntry('default_lang', 'de'); // A two-char language string: de for german, en for english and so on
+
+// CFG: HTML-TEMPLATE-TYPE
+$cfg->setConfigEntry('html_template_type', 'html');
+
+// CFG: EMAIL-TEMPLATE-TYPE
+$cfg->setConfigEntry('email_template_type', 'emails');
+
+// CFG: CODE-HTML-TEMPLATE-TYPE
+$cfg->setConfigEntry('code_html_template_type', 'code');
+
+// CFG: CODE-CONSOLE-TEMPLATE-TYPE
+$cfg->setConfigEntry('code_console_template_type', 'xml');
+
+// CFG: IMAGE-TEMPLATE-TYPE
+$cfg->setConfigEntry('image_template_type', 'image');
+
+// CFG: MENU-TEMPLATE-TYPE
+$cfg->setConfigEntry('menu_template_type', 'menu');
+
+// CFG: OUTPUT-CLASS
+$cfg->setConfigEntry('output_class', 'CoreFramework\Output\WebOutput');
+
+// CFG: LANGUAGE-SYSTEM-CLASS
+$cfg->setConfigEntry('language_system_class', 'CoreFramework\Localization\LanguageSystem');
+
+// CFG: SELECTOR-TEMPLATE-PREFIX
+$cfg->setConfigEntry('tpl_selector_prefix', 'selector');
+
+// CFG: WEB-CONTENT-TYPE
+$cfg->setConfigEntry('web_content_type', 'text/html');
+
+// CFG: VALID-TEMPLATE-VARIABLE
+$cfg->setConfigEntry('tpl_valid_var', 'content');
+
+// CFG: META-AUTHOR
+$cfg->setConfigEntry('meta_author', 'Your-name-here');
+
+// CFG: META-PUBLISHER
+$cfg->setConfigEntry('meta_publisher', 'Your-name-here');
+
+// CFG: META-KEYWORDS
+$cfg->setConfigEntry('meta_keywords', 'test,test,test');
+
+// CFG: META-DESCRIPTION
+$cfg->setConfigEntry('meta_description', 'A description for your website');
+
+// CFG: SELECTOR-MAIN-TEMPLATE
+$cfg->setConfigEntry('selector_main_tpl', 'selector_main');
+
+// CFG: SELECTOR-APPS-TEMPLATE
+$cfg->setConfigEntry('selector_apps_tpl', 'selector_apps');
+
+// CFG: SELECTOR-NAME
+$cfg->setConfigEntry('selector_name', 'selector');
+
+// CFG: DEFAULT-APPLICATION
+$cfg->setConfigEntry('default_application', 'selector');
+
+// CFG: VERBOSE-LEVEL
+$cfg->setConfigEntry('verbose_level', 0);
+
+// CFG: CACHE-CLASS
+$cfg->setConfigEntry('cache_class', 'CoreFramework\Cache\Memory\MemoryCache');
+
+// CFG: SEARCH-CRITERIA-CLASS
+$cfg->setConfigEntry('search_criteria_class', 'CoreFramework\Criteria\Search\SearchCriteria');
+
+// CFG: DATASET-CRITERIA-CLASS
+$cfg->setConfigEntry('dataset_criteria_class', 'CoreFramework\Criteria\DataSet\DataSetCriteria');
+
+// CFG: UPDATE-CRITERIA-CLASS
+$cfg->setConfigEntry('update_criteria_class', 'CoreFramework\Criteria\Update\UpdateCriteria');
+
+// CFG: FILE-IO-CLASS
+$cfg->setConfigEntry('file_io_class', 'CoreFramework\Handler\Filesystem\FileIoHandler');
+
+// CFG: DATABASE-RESULT-CLASS
+$cfg->setConfigEntry('database_result_class', 'CoreFramework\Result\Database\CachedDatabaseResult');
+
+// CFG: FILTER-CHAIN-CLASS
+$cfg->setConfigEntry('filter_chain_class', 'CoreFramework\Chain\Filter\FilterChain');
+
+// CFG: FILE-INPUT-CLASS
+$cfg->setConfigEntry('file_input_class', 'CoreFramework\Stream\Filesystem\FileIoStream');
+
+// CFG: FILE-OUTPUT-CLASS
+$cfg->setConfigEntry('file_output_class', 'CoreFramework\Stream\Filesystem\FileIoStream');
+
+// CFG: EMAIL-VALIDATOR-FILTER-CLASS
+$cfg->setConfigEntry('email_validator_filter_class', 'CoreFramework\Filter\Validator\Email\EmailValidatorFilter');
+
+// CFG: USERNAME-VALIDATOR-FILTER-CLASS
+$cfg->setConfigEntry('username_validator_filter_class', 'CoreFramework\Filter\Validator\Username\UserNameValidatorFilter');
+
+// CFG: USERNAME-IS-GUEST-FILTER-CLASS
+$cfg->setConfigEntry('username_is_guest_filter_class', 'CoreFramework\Filter\User\Username\UserNameIsGuestFilter');
+
+// CFG: PASSWORD-VALIDATOR-FILTER-CLASS
+$cfg->setConfigEntry('password_validator_filter_class', 'CoreFramework\Filter\Validator\Password\PasswordValidatorFilter');
+
+// CFG: RULES-ACCEPTED-FILTER-CLASS
+$cfg->setConfigEntry('rules_accepted_filter_class', 'CoreFramework\Filter\RulesCheckbox\RulesAcceptedFilter');
+
+// CFG: USERNAME-VERIFIER-FILTER-CLASS
+$cfg->setConfigEntry('username_verifier_filter_class', 'CoreFramework\Filter\Verifier\User\UserNameVerifierFilter');
+
+// CFG: USER-GUEST-VERIFIER-FILTER-CLASS
+$cfg->setConfigEntry('user_guest_verifier_filter_class', 'CoreFramework\Filter\Verifier\User\UserGuestVerifierFilter');
+
+// CFG: EMAIL-VERIFIER-FILTER-CLASS
+$cfg->setConfigEntry('email_verifier_filter_class', 'CoreFramework\Filter\Verifier\Email\EmailVerifierFilter');
+
+// CFG: PASSWORD-VERIFIER-FILTER-CLASS
+$cfg->setConfigEntry('password_verifier_filter_class', 'CoreFramework\Filter\Verifier\Password\PasswordVerifierFilter');
+
+// CFG: PASSWD-GUEST-VERIFIER-FILTER-CLASS
+$cfg->setConfigEntry('passwd_guest_verifier_filter_class', 'CoreFramework\Filter\Verifier\User\PasswordGuestVerifierFilter');
+
+// CFG: EMAIL-CHANGE-FILTER-CLASS
+$cfg->setConfigEntry('email_change_filter_class', 'CoreFramework\Filter\Change\Email\EmailChangeFilter');
+
+// CFG: PASSWORD-CHANGE-FILTER-CLASS
+$cfg->setConfigEntry('password_change_filter_class', 'CoreFramework\Filter\Change\Password\PasswordChangeFilter');
+
+// CFG: ACCOUNT-PASSWORD-FILTER-CLASS
+$cfg->setConfigEntry('account_password_filter_class', 'CoreFramework\Filter\Verifier\Password\AccountPasswordVerifierFilter');
+
+// CFG: USER-STATUS-FILTER-CLASS
+$cfg->setConfigEntry('user_status_filter_class', 'CoreFramework\Filter\Verifier\User\UserStatusVerifierFilter');
+
+// CFG: USER-UNCONFIRMED-FILTER-CLASS
+$cfg->setConfigEntry('user_unconfirmed_filter_class', 'CoreFramework\Filter\Verifier\User\UserUnconfirmedVerifierFilter');
+
+// CFG: CRYPTO-CLASS
+$cfg->setConfigEntry('crypto_class', 'CoreFramework\Helper\Crypto\CryptoHelper');
+
+// CFG: RNG-CLASS
+$cfg->setConfigEntry('rng_class', 'CoreFramework\Crypto\RandomNumber\RandomNumberGenerator');
+
+// CFG: USER-DB-WRAPPER-CLASS
+$cfg->setConfigEntry('user_db_wrapper_class', 'CoreFramework\Wrapper\Database\User\UserDatabaseWrapper');
+
+// CFG: NEWS-DB-WRAPPER-CLASS
+$cfg->setConfigEntry('news_db_wrapper_class', 'CoreFramework\Wrapper\Database\News\NewsDatabaseWrapper');
+
+// CFG: HTML-CMD-RESOLVER-CLASS
+$cfg->setConfigEntry('html_cmd_resolver_class', 'CoreFramework\Resolver\Command\HtmlCommandResolver');
+
+// CFG: HTML-CMD-LOGIN-RESOLVER-CLASS
+$cfg->setConfigEntry('html_cmd_login_resolver_class', 'CoreFramework\Resolver\Command\HtmlCommandResolver');
+
+// CFG: IMAGE-CMD-RESOLVER-CLASS
+$cfg->setConfigEntry('image_cmd_resolver_class', 'CoreFramework\Resolver\Command\ImageCommandResolver');
+
+// CFG: IMAGE-CMD-CODE-CAPTCHA-RESOLVER-CLASS
+$cfg->setConfigEntry('image_cmd_code_captcha_resolver_class', 'CoreFramework\Resolver\Command\ImageCommandResolver');
+
+// CFG: MAILER-CLASS
+$cfg->setConfigEntry('mailer_class', 'CoreFramework\Mailer\Debug\DebugMailer');
+
+// CFG: XML-PARSER-CLASS
+$cfg->setConfigEntry('xml_parser_class', 'CoreFramework\Parser\Xml\XmlParser');
+
+// CFG: DECO-COMPACTING-XML-PARSER-CLASS
+$cfg->setConfigEntry('deco_compacting_xml_parser_class', 'CoreFramework\Parser\Xml\XmlCompactorDecorator');
+
+// CFG: MATH-PRIME
+$cfg->setConfigEntry('math_prime', 591623);
+
+// CFG: DATE-KEY
+$cfg->setConfigEntry('date_key', date('d-m-Y (l-F-T)', time()));
+
+// CFG: SALT-LENGTH
+$cfg->setConfigEntry('salt_length', 10);
+
+// CFG: RND-STR-LENGTH
+$cfg->setConfigEntry('rnd_str_length', 128);
+
+// CFG: HASH-EXTRA-MASK
+$cfg->setConfigEntry('hash_extra_mask', '%1s:%2s:%3s'); // 1=salt, 2=extra salt, 3=plain password/string
+
+// CFG: HASH-NORMAL-MASK
+$cfg->setConfigEntry('hash_normal_mask', '%1s:%2s'); // 1=salt, 2=plain password/string
+
+// CFG: IS-SINGLE-SERVER
+$cfg->setConfigEntry('is_single_server', 'Y');
+
+// CFG: POST-REGISTRATION-CLASS
+$cfg->setConfigEntry('post_registration_class', 'CoreFramework\Action\PostRegistration\Login\LoginAfterRegistrationAction');
+
+// CFG: USER-CLASS
+$cfg->setConfigEntry('user_class', 'CoreFramework\User\Login\Member');
+
+// CFG: GUEST-CLASS
+$cfg->setConfigEntry('guest_class', 'CoreFramework\User\Guest\Guest');
+
+// CFG: COOKIE-EXPIRE
+$cfg->setConfigEntry('cookie_expire', (60*60*2)); // Two hours!
+
+// CFG: COOKIE-PATH
+$cfg->setConfigEntry('cookie_path', $cfg->detectScriptPath() . '/');
+
+// CFG: COOKIE-DOMAIN
+$cfg->setConfigEntry('cookie_domain', $cfg->detectDomain()); // Is mostly the same...
+
+// CFG: COOKIE-SSL
+$cfg->setConfigEntry('cookie_ssl', $cfg->isHttpSecured());
+
+// CFG: CRYPT-FIXED-SALT
+$cfg->setConfigEntry('crypt_fixed_salt', 'N');
+
+// CFG: DB-UPDATE-PRIMARY-FORCED
+$cfg->setConfigEntry('db_update_primary_forced', 'Y');
+
+// CFG: GERMAN-DATE-TIME
+$cfg->setConfigEntry('german_date_time', "%3\$s.%2\$s.%1\$s, %4\$s:%5\$s:%6\$s");
+
+// CFG: PRODUCT-INSTALL-MODE
+$cfg->setConfigEntry('product_install_mode', 'debug');
+
+// CFG: DECIMALS
+$cfg->setConfigEntry('decimals', 3);
+
+// CFG: MENU-STACKER-CLASS
+$cfg->setConfigEntry('menu_stacker_class', 'CoreFramework\Stacker\File\FiLoStacker');
+
+// CFG: STACKER-GENERIC-MAX-SIZE
+$cfg->setConfigEntry('stacker_generic_max_size', 100);
+
+// CFG: STACKER-CURRENT-NODE-MAX-SIZE
+$cfg->setConfigEntry('stacker_current_node_max_size', 20);
+
+// CFG: LOCAL-FILE-DATABASE-CLASS
+$cfg->setConfigEntry('local_file_database_class', 'CoreFramework\Database\Backend\Lfdb\CachedLocalFileDatabase');
+
+// CFG: COMPRESSOR-CHANNEL-CLASS
+$cfg->setConfigEntry('compressor_channel_class', 'CoreFramework\Middleware\Compressor\CompressorChannel');
+
+// CFG: DEBUG-HTML-OUTPUT-TIMINGS
+$cfg->setConfigEntry('debug_html_output_timings', 'N');
+
+// CFG: DEBUG-CONSOLE-OUTPUT-TIMINGS
+$cfg->setConfigEntry('debug_console_output_timings', 'Y');
+
+// CFG: PROXY-HOST
+$cfg->setConfigEntry('proxy_host', '');
+
+// CFG: PROXY-PORT
+$cfg->setConfigEntry('proxy_port', '');
+
+// CFG: PROXY-USERNAME
+$cfg->setConfigEntry('proxy_username', '');
+
+// CFG: PROXY-PASSWORD
+$cfg->setConfigEntry('proxy_password', '');
+
+// CFG: PROXY-CONNECT-METHOD
+$cfg->setConfigEntry('proxy_connect_method', 'Y');
+
+// CFG: HOSTNAME-FILE
+$cfg->setConfigEntry('hostname_file', '/etc/hostname');
+
+// CFG: DATABASE-CACHE-ENABLED
+$cfg->setConfigEntry('database_cache_enabled', FALSE);
+
+// CFG: DIRECTORY-CLASS
+$cfg->setConfigEntry('directory_class', 'CoreFramework\Filesytem\Pointer\FrameworkDirectoryPointer');
+
+// CFG: FILE-RAW-INPUT-CLASS
+$cfg->setConfigEntry('file_raw_input_class', 'CoreFramework\Filesystem\Pointer\Input\FrameworkRawFileInputPointer');
+
+// CFG: FILE-RAW-OUTPUT-CLASS
+$cfg->setConfigEntry('file_raw_output_class', 'CoreFramework\Filesystem\Pointer\Output\FrameworkRawFileOutputPointer');
+
+// CFG: FILE-RAW-INPUT-OUTPUT-CLASS
+$cfg->setConfigEntry('file_raw_input_output_class', 'CoreFramework\Filesystem\Pointer\FrameworkFileInputOutputPointer');
+
+// CFG: TEXT-FILE-INPUT-CLASS
+$cfg->setConfigEntry('text_file_input_class', 'CoreFramework\Filesystem\Pointer\Input\FrameworkTextFileInputPointer');
+
+// CFG: CSV-INPUT-FILE-CLASS
+$cfg->setConfigEntry('csv_input_file_class', 'CoreFramework\Filesystem\Input\Csv\CsvInputFile');
+
+// CFG: FILE-ITERATOR-CLASS
+$cfg->setConfigEntry('file_iterator_class', 'CoreFramework\Iterator\File\FileIterator');
+
+// CFG: FILE-STACK-PRE-ALLOCATE-ENABLED
+$cfg->setConfigEntry('file_stack_pre_allocate_enabled', 'Y');
+
+// CFG: FILE-STACK-PRE-ALLOCATE-COUNT
+$cfg->setConfigEntry('file_stack_pre_allocate_count', 10000);
+
+// CFG: INDEX-INDEX-CLASS
+$cfg->setConfigEntry('file_stack_index_class', 'CoreFramework\Index\Stack\FileStackIndex');
+
+// CFG: INDEX-PRE-ALLOCATE-ENABLED
+$cfg->setConfigEntry('index_pre_allocate_enabled', 'Y');
+
+// CFG: INDEX-PRE-ALLOCATE-COUNT
+$cfg->setConfigEntry('index_pre_allocate_count', 10000);
+
+// CFG: STACK-FILE-CLASS
+$cfg->setConfigEntry('stack_file_class', 'CoreFramework\Filesystem\Stack\StackFile');
+
+// CFG: INDEX-FILE-CLASS
+$cfg->setConfigEntry('index_file_class', 'CoreFramework\Filesystem\Index\IndexFile');
+
+// CFG: TASK-HANDLER-CLASS
+$cfg->setConfigEntry('task_handler_class', 'CoreFramework\Handler\Task\TaskHandler');
+
+// CFG: TASK-LIST-CLASS
+$cfg->setConfigEntry('task_list_class', 'CoreFramework\Lists\Task\TaskList');
+
+// CFG: LIST-GROUP-CLASS
+$cfg->setConfigEntry('list_group_class', 'CoreFramework\Lists\Group\ListGroupList');
+
+// CFG: DEFAULT-ITERATOR-CLASS
+$cfg->setConfigEntry('default_iterator_class', 'CoreFramework\Iterator\DefaultIterator');
+
+// CFG: ACTIVE-TASK-VISITOR-CLASS
+$cfg->setConfigEntry('active_task_visitor_class', 'CoreFramework\Visitor\Task\Active\ActiveTaskVisitor');
+
+// CFG: IDLE-TASK-CLASS
+$cfg->setConfigEntry('idle_task_class', 'CoreFramework\Task\IdleLoop\IdleLoopTask');
+
+// CFG: TASK-IDLE-LOOP-STARTUP-DELAY
+$cfg->setConfigEntry('task_idle_loop_startup_delay', 0);
+
+// CFG: TASK-IDLE-LOOP-INTERVAL-DELAY
+$cfg->setConfigEntry('task_idle_loop_interval_delay', 0);
+
+// CFG: TASK-IDLE-LOOP-MAX-RUNS
+$cfg->setConfigEntry('task_idle_loop_max_runs', 0);
+
+// CFG: IDLE-LOOP-TIME (5 milli seconds)
+$cfg->setConfigEntry('idle_loop_time', 5);
+
+// CFG: SHUTDOWN-TASK-VISITOR-CLASS
+$cfg->setConfigEntry('shutdown_task_visitor_class', 'CoreFramework\Visitor\Task\Shutdown\ShutdownTaskVisitor');
+
+// CFG: DEFAULT-IMAGE-COMMAND
+$cfg->setConfigEntry('default_image_command', 'build');
+
+// CFG: DEFAULT-IMAGE-CONTROLLER
+$cfg->setConfigEntry('default_image_controller', 'build');
+
+// CFG: MENU-TEMPLATE-CLASS
+$cfg->setConfigEntry('menu_template_class', 'CoreFramework\Template\Engine\MenuTemplateEngine');
+
+// CFG: MENU-TEMPLATE-EXTENSION
+$cfg->setConfigEntry('menu_template_extension', '.xml');
+
+// CFG: FEATURE-FUSE-CLASS
+$cfg->setConfigEntry('feature_fuse_class', 'CoreFramework\Feature\Fuse\FuseFeature');
+
+// CFG: TEMP-FILE-PATH
+$cfg->setConfigEntry('temp_file_path', sys_get_temp_dir());
+
+// CFG: IPC-SOCKET-FILE-NAME
+$cfg->setConfigEntry('ipc_socket_file_name', 'php_ipc_socket');
+
+// CFG: EXTENSION-SCRYPT-LOADED (By default scrypt is assumed absent and later tested being there)
+$cfg->setConfigEntry('extension_scrypt_loaded', FALSE);
+
+// CFG: EXTENSION-UUID-LOADED (By default uuid is assumed absent and later tested being there)
+$cfg->setConfigEntry('extension_uuid_loaded', FALSE);
+
+// Remove config from this name-space. Don't worry, no configuration is cleared.
+unset($cfg);
diff --git a/framework/config.php b/framework/config.php
deleted file mode 100644 (file)
index 28803fe..0000000
+++ /dev/null
@@ -1,476 +0,0 @@
-<?php
-// Import framework stuff
-use CoreFramework\Configuration\FrameworkConfiguration;
-use CoreFramework\EntryPoint\ApplicationEntryPoint;
-
-/**
- * General configuration. Do not touch this file! If you need different settings
- * create a config-local.php in this directory at and set your changed
- * configuration entries there.
- *
- * @author             Roland Haeder <webmaster@shipsimu.org>
- * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Core Developer Team
- * @license            GNU GPL 3.0 or any newer version
- * @link               http://www.shipsimu.org
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-// Load very basic classes, required to bootstrap
-require(ApplicationEntryPoint::detectCorePath() . '/framework/main/interfaces/class_FrameworkInterface.php');
-require(ApplicationEntryPoint::detectCorePath() . '/framework/main/interfaces/registry/class_Registerable.php');
-require(ApplicationEntryPoint::detectCorePath() . '/framework/config/class_FrameworkConfiguration.php');
-
-// Get a new configuration instance
-$cfg = FrameworkConfiguration::getSelfInstance();
-
-// CFG: SERVER-PATH
-$cfg->setConfigEntry('base_path', ApplicationEntryPoint::detectCorePath() . '/');
-
-// CFG: BASE-URL
-$cfg->setConfigEntry('base_url', $cfg->detectBaseUrl());
-
-// CFG: DATABASE-TYPE
-$cfg->setConfigEntry('db_type', 'lfdb');
-
-// CFG: LOCAL-DB-PATH
-$cfg->setConfigEntry('local_db_path', $cfg->getConfigEntry('base_path') . 'db/');
-
-// CFG: TIME-ZONE
-$cfg->setDefaultTimezone('Europe/Berlin');
-
-// CFG: MAGIC-QUOTES-RUNTIME
-// @DEPRECATED As PHP is deprecating this
-$cfg->setMagicQuotesRuntime(FALSE);
-
-// CFG: CLASS-PREFIX
-$cfg->setConfigEntry('class_prefix', 'class_');
-
-// CFG: CLASS-SUFFIX
-$cfg->setConfigEntry('class_suffix', '.php');
-
-// CFG: RAW-TEMPLATE-EXTENSION
-$cfg->setConfigEntry('raw_template_extension', '.tpl');
-
-// CFG: CODE-TEMPLATE-EXTENSION
-$cfg->setConfigEntry('code_template_extension', '.ctp');
-
-// CFG: SELECTOR-PATH
-$cfg->setConfigEntry('selector_path', 'selector');
-
-// CFG: LAUNCH-METHOD
-$cfg->setConfigEntry('entry_method', 'entryPoint');
-
-// CFG: TEMPLATE-BASE-PATH
-$cfg->setConfigEntry('tpl_base_path', 'templates/');
-
-// CFG: LANGUAGE-BASE-PATH
-$cfg->setConfigEntry('lang_base_path', 'framework/language/');
-
-// CFG: COMPRESSOR-BASE-PATH
-$cfg->setConfigEntry('compressor_base_path', 'framework/main/classes/compressor/');
-
-// CFG: APPLICATION-BASE-PATH
-$cfg->setConfigEntry('application_base_path', 'application/');
-
-// CFG: APPLICATION-PATH
-$cfg->setConfigEntry('application_path', $cfg->getConfigEntry('base_path') . $cfg->getConfigEntry('application_base_path'));
-
-// CFG: COMPILE-OUTPUT-PATH
-$cfg->setConfigEntry('compile_output_path', 'templates/_compiled/');
-
-// CFG: HTML-TEMPLATE-CLASS
-$cfg->setConfigEntry('html_template_class', 'CoreFramework\Template\Engine\HtmlTemplateEngine');
-
-// CFG: DECO-XML-REWRITER-TEMPLATE-CLASS
-$cfg->setConfigEntry('deco_xml_rewriter_template_class', 'CoreFramework\Template\Xml\XmlRewriterTemplateDecorator');
-
-// CFG: DEBUG-HTML-CLASS
-$cfg->setConfigEntry('debug_html_class', 'CoreFramework\Output\Debug\DebugWebOutput');
-
-// CFG: DEBUG-CONSOLE-CLASS
-$cfg->setConfigEntry('debug_console_class', 'CoreFramework\Debug\Output\DebugConsoleOutput');
-
-// CFG: DEFAULT-LANGUAGE
-$cfg->setConfigEntry('default_lang', 'de'); // A two-char language string: de for german, en for english and so on
-
-// CFG: HTML-TEMPLATE-TYPE
-$cfg->setConfigEntry('html_template_type', 'html');
-
-// CFG: EMAIL-TEMPLATE-TYPE
-$cfg->setConfigEntry('email_template_type', 'emails');
-
-// CFG: CODE-HTML-TEMPLATE-TYPE
-$cfg->setConfigEntry('code_html_template_type', 'code');
-
-// CFG: CODE-CONSOLE-TEMPLATE-TYPE
-$cfg->setConfigEntry('code_console_template_type', 'xml');
-
-// CFG: IMAGE-TEMPLATE-TYPE
-$cfg->setConfigEntry('image_template_type', 'image');
-
-// CFG: MENU-TEMPLATE-TYPE
-$cfg->setConfigEntry('menu_template_type', 'menu');
-
-// CFG: OUTPUT-CLASS
-$cfg->setConfigEntry('output_class', 'CoreFramework\Output\WebOutput');
-
-// CFG: LANGUAGE-SYSTEM-CLASS
-$cfg->setConfigEntry('language_system_class', 'CoreFramework\Localization\LanguageSystem');
-
-// CFG: SELECTOR-TEMPLATE-PREFIX
-$cfg->setConfigEntry('tpl_selector_prefix', 'selector');
-
-// CFG: WEB-CONTENT-TYPE
-$cfg->setConfigEntry('web_content_type', 'text/html');
-
-// CFG: VALID-TEMPLATE-VARIABLE
-$cfg->setConfigEntry('tpl_valid_var', 'content');
-
-// CFG: META-AUTHOR
-$cfg->setConfigEntry('meta_author', 'Your-name-here');
-
-// CFG: META-PUBLISHER
-$cfg->setConfigEntry('meta_publisher', 'Your-name-here');
-
-// CFG: META-KEYWORDS
-$cfg->setConfigEntry('meta_keywords', 'test,test,test');
-
-// CFG: META-DESCRIPTION
-$cfg->setConfigEntry('meta_description', 'A description for your website');
-
-// CFG: SELECTOR-MAIN-TEMPLATE
-$cfg->setConfigEntry('selector_main_tpl', 'selector_main');
-
-// CFG: SELECTOR-APPS-TEMPLATE
-$cfg->setConfigEntry('selector_apps_tpl', 'selector_apps');
-
-// CFG: SELECTOR-NAME
-$cfg->setConfigEntry('selector_name', 'selector');
-
-// CFG: DEFAULT-APPLICATION
-$cfg->setConfigEntry('default_application', 'selector');
-
-// CFG: VERBOSE-LEVEL
-$cfg->setConfigEntry('verbose_level', 0);
-
-// CFG: CACHE-CLASS
-$cfg->setConfigEntry('cache_class', 'CoreFramework\Cache\Memory\MemoryCache');
-
-// CFG: SEARCH-CRITERIA-CLASS
-$cfg->setConfigEntry('search_criteria_class', 'CoreFramework\Criteria\Search\SearchCriteria');
-
-// CFG: DATASET-CRITERIA-CLASS
-$cfg->setConfigEntry('dataset_criteria_class', 'CoreFramework\Criteria\DataSet\DataSetCriteria');
-
-// CFG: UPDATE-CRITERIA-CLASS
-$cfg->setConfigEntry('update_criteria_class', 'CoreFramework\Criteria\Update\UpdateCriteria');
-
-// CFG: FILE-IO-CLASS
-$cfg->setConfigEntry('file_io_class', 'CoreFramework\Handler\Filesystem\FileIoHandler');
-
-// CFG: DATABASE-RESULT-CLASS
-$cfg->setConfigEntry('database_result_class', 'CoreFramework\Result\Database\CachedDatabaseResult');
-
-// CFG: FILTER-CHAIN-CLASS
-$cfg->setConfigEntry('filter_chain_class', 'CoreFramework\Chain\Filter\FilterChain');
-
-// CFG: FILE-INPUT-CLASS
-$cfg->setConfigEntry('file_input_class', 'CoreFramework\Stream\Filesystem\FileIoStream');
-
-// CFG: FILE-OUTPUT-CLASS
-$cfg->setConfigEntry('file_output_class', 'CoreFramework\Stream\Filesystem\FileIoStream');
-
-// CFG: EMAIL-VALIDATOR-FILTER-CLASS
-$cfg->setConfigEntry('email_validator_filter_class', 'CoreFramework\Filter\Validator\Email\EmailValidatorFilter');
-
-// CFG: USERNAME-VALIDATOR-FILTER-CLASS
-$cfg->setConfigEntry('username_validator_filter_class', 'CoreFramework\Filter\Validator\Username\UserNameValidatorFilter');
-
-// CFG: USERNAME-IS-GUEST-FILTER-CLASS
-$cfg->setConfigEntry('username_is_guest_filter_class', 'CoreFramework\Filter\User\Username\UserNameIsGuestFilter');
-
-// CFG: PASSWORD-VALIDATOR-FILTER-CLASS
-$cfg->setConfigEntry('password_validator_filter_class', 'CoreFramework\Filter\Validator\Password\PasswordValidatorFilter');
-
-// CFG: RULES-ACCEPTED-FILTER-CLASS
-$cfg->setConfigEntry('rules_accepted_filter_class', 'CoreFramework\Filter\RulesCheckbox\RulesAcceptedFilter');
-
-// CFG: USERNAME-VERIFIER-FILTER-CLASS
-$cfg->setConfigEntry('username_verifier_filter_class', 'CoreFramework\Filter\Verifier\User\UserNameVerifierFilter');
-
-// CFG: USER-GUEST-VERIFIER-FILTER-CLASS
-$cfg->setConfigEntry('user_guest_verifier_filter_class', 'CoreFramework\Filter\Verifier\User\UserGuestVerifierFilter');
-
-// CFG: EMAIL-VERIFIER-FILTER-CLASS
-$cfg->setConfigEntry('email_verifier_filter_class', 'CoreFramework\Filter\Verifier\Email\EmailVerifierFilter');
-
-// CFG: PASSWORD-VERIFIER-FILTER-CLASS
-$cfg->setConfigEntry('password_verifier_filter_class', 'CoreFramework\Filter\Verifier\Password\PasswordVerifierFilter');
-
-// CFG: PASSWD-GUEST-VERIFIER-FILTER-CLASS
-$cfg->setConfigEntry('passwd_guest_verifier_filter_class', 'CoreFramework\Filter\Verifier\User\PasswordGuestVerifierFilter');
-
-// CFG: EMAIL-CHANGE-FILTER-CLASS
-$cfg->setConfigEntry('email_change_filter_class', 'CoreFramework\Filter\Change\Email\EmailChangeFilter');
-
-// CFG: PASSWORD-CHANGE-FILTER-CLASS
-$cfg->setConfigEntry('password_change_filter_class', 'CoreFramework\Filter\Change\Password\PasswordChangeFilter');
-
-// CFG: ACCOUNT-PASSWORD-FILTER-CLASS
-$cfg->setConfigEntry('account_password_filter_class', 'CoreFramework\Filter\Verifier\Password\AccountPasswordVerifierFilter');
-
-// CFG: USER-STATUS-FILTER-CLASS
-$cfg->setConfigEntry('user_status_filter_class', 'CoreFramework\Filter\Verifier\User\UserStatusVerifierFilter');
-
-// CFG: USER-UNCONFIRMED-FILTER-CLASS
-$cfg->setConfigEntry('user_unconfirmed_filter_class', 'CoreFramework\Filter\Verifier\User\UserUnconfirmedVerifierFilter');
-
-// CFG: CRYPTO-CLASS
-$cfg->setConfigEntry('crypto_class', 'CoreFramework\Helper\Crypto\CryptoHelper');
-
-// CFG: RNG-CLASS
-$cfg->setConfigEntry('rng_class', 'CoreFramework\Crypto\RandomNumber\RandomNumberGenerator');
-
-// CFG: USER-DB-WRAPPER-CLASS
-$cfg->setConfigEntry('user_db_wrapper_class', 'CoreFramework\Wrapper\Database\User\UserDatabaseWrapper');
-
-// CFG: NEWS-DB-WRAPPER-CLASS
-$cfg->setConfigEntry('news_db_wrapper_class', 'CoreFramework\Wrapper\Database\News\NewsDatabaseWrapper');
-
-// CFG: HTML-CMD-RESOLVER-CLASS
-$cfg->setConfigEntry('html_cmd_resolver_class', 'CoreFramework\Resolver\Command\HtmlCommandResolver');
-
-// CFG: HTML-CMD-LOGIN-RESOLVER-CLASS
-$cfg->setConfigEntry('html_cmd_login_resolver_class', 'CoreFramework\Resolver\Command\HtmlCommandResolver');
-
-// CFG: IMAGE-CMD-RESOLVER-CLASS
-$cfg->setConfigEntry('image_cmd_resolver_class', 'CoreFramework\Resolver\Command\ImageCommandResolver');
-
-// CFG: IMAGE-CMD-CODE-CAPTCHA-RESOLVER-CLASS
-$cfg->setConfigEntry('image_cmd_code_captcha_resolver_class', 'CoreFramework\Resolver\Command\ImageCommandResolver');
-
-// CFG: MAILER-CLASS
-$cfg->setConfigEntry('mailer_class', 'CoreFramework\Mailer\Debug\DebugMailer');
-
-// CFG: XML-PARSER-CLASS
-$cfg->setConfigEntry('xml_parser_class', 'CoreFramework\Parser\Xml\XmlParser');
-
-// CFG: DECO-COMPACTING-XML-PARSER-CLASS
-$cfg->setConfigEntry('deco_compacting_xml_parser_class', 'CoreFramework\Parser\Xml\XmlCompactorDecorator');
-
-// CFG: MATH-PRIME
-$cfg->setConfigEntry('math_prime', 591623);
-
-// CFG: DATE-KEY
-$cfg->setConfigEntry('date_key', date('d-m-Y (l-F-T)', time()));
-
-// CFG: SALT-LENGTH
-$cfg->setConfigEntry('salt_length', 10);
-
-// CFG: RND-STR-LENGTH
-$cfg->setConfigEntry('rnd_str_length', 128);
-
-// CFG: HASH-EXTRA-MASK
-$cfg->setConfigEntry('hash_extra_mask', '%1s:%2s:%3s'); // 1=salt, 2=extra salt, 3=plain password/string
-
-// CFG: HASH-NORMAL-MASK
-$cfg->setConfigEntry('hash_normal_mask', '%1s:%2s'); // 1=salt, 2=plain password/string
-
-// CFG: IS-SINGLE-SERVER
-$cfg->setConfigEntry('is_single_server', 'Y');
-
-// CFG: POST-REGISTRATION-CLASS
-$cfg->setConfigEntry('post_registration_class', 'CoreFramework\Action\PostRegistration\Login\LoginAfterRegistrationAction');
-
-// CFG: USER-CLASS
-$cfg->setConfigEntry('user_class', 'CoreFramework\User\Login\Member');
-
-// CFG: GUEST-CLASS
-$cfg->setConfigEntry('guest_class', 'CoreFramework\User\Guest\Guest');
-
-// CFG: COOKIE-EXPIRE
-$cfg->setConfigEntry('cookie_expire', (60*60*2)); // Two hours!
-
-// CFG: COOKIE-PATH
-$cfg->setConfigEntry('cookie_path', $cfg->detectScriptPath() . '/');
-
-// CFG: COOKIE-DOMAIN
-$cfg->setConfigEntry('cookie_domain', $cfg->detectDomain()); // Is mostly the same...
-
-// CFG: COOKIE-SSL
-$cfg->setConfigEntry('cookie_ssl', $cfg->isHttpSecured());
-
-// CFG: CRYPT-FIXED-SALT
-$cfg->setConfigEntry('crypt_fixed_salt', 'N');
-
-// CFG: DB-UPDATE-PRIMARY-FORCED
-$cfg->setConfigEntry('db_update_primary_forced', 'Y');
-
-// CFG: GERMAN-DATE-TIME
-$cfg->setConfigEntry('german_date_time', "%3\$s.%2\$s.%1\$s, %4\$s:%5\$s:%6\$s");
-
-// CFG: PRODUCT-INSTALL-MODE
-$cfg->setConfigEntry('product_install_mode', 'debug');
-
-// CFG: DECIMALS
-$cfg->setConfigEntry('decimals', 3);
-
-// CFG: MENU-STACKER-CLASS
-$cfg->setConfigEntry('menu_stacker_class', 'CoreFramework\Stacker\File\FiLoStacker');
-
-// CFG: STACKER-GENERIC-MAX-SIZE
-$cfg->setConfigEntry('stacker_generic_max_size', 100);
-
-// CFG: STACKER-CURRENT-NODE-MAX-SIZE
-$cfg->setConfigEntry('stacker_current_node_max_size', 20);
-
-// CFG: LOCAL-FILE-DATABASE-CLASS
-$cfg->setConfigEntry('local_file_database_class', 'CoreFramework\Database\Backend\Lfdb\CachedLocalFileDatabase');
-
-// CFG: COMPRESSOR-CHANNEL-CLASS
-$cfg->setConfigEntry('compressor_channel_class', 'CoreFramework\Middleware\Compressor\CompressorChannel');
-
-// CFG: DEBUG-HTML-OUTPUT-TIMINGS
-$cfg->setConfigEntry('debug_html_output_timings', 'N');
-
-// CFG: DEBUG-CONSOLE-OUTPUT-TIMINGS
-$cfg->setConfigEntry('debug_console_output_timings', 'Y');
-
-// CFG: PROXY-HOST
-$cfg->setConfigEntry('proxy_host', '');
-
-// CFG: PROXY-PORT
-$cfg->setConfigEntry('proxy_port', '');
-
-// CFG: PROXY-USERNAME
-$cfg->setConfigEntry('proxy_username', '');
-
-// CFG: PROXY-PASSWORD
-$cfg->setConfigEntry('proxy_password', '');
-
-// CFG: PROXY-CONNECT-METHOD
-$cfg->setConfigEntry('proxy_connect_method', 'Y');
-
-// CFG: HOSTNAME-FILE
-$cfg->setConfigEntry('hostname_file', '/etc/hostname');
-
-// CFG: DATABASE-CACHE-ENABLED
-$cfg->setConfigEntry('database_cache_enabled', FALSE);
-
-// CFG: DIRECTORY-CLASS
-$cfg->setConfigEntry('directory_class', 'CoreFramework\Filesytem\Pointer\FrameworkDirectoryPointer');
-
-// CFG: FILE-RAW-INPUT-CLASS
-$cfg->setConfigEntry('file_raw_input_class', 'CoreFramework\Filesystem\Pointer\Input\FrameworkRawFileInputPointer');
-
-// CFG: FILE-RAW-OUTPUT-CLASS
-$cfg->setConfigEntry('file_raw_output_class', 'CoreFramework\Filesystem\Pointer\Output\FrameworkRawFileOutputPointer');
-
-// CFG: FILE-RAW-INPUT-OUTPUT-CLASS
-$cfg->setConfigEntry('file_raw_input_output_class', 'CoreFramework\Filesystem\Pointer\FrameworkFileInputOutputPointer');
-
-// CFG: TEXT-FILE-INPUT-CLASS
-$cfg->setConfigEntry('text_file_input_class', 'CoreFramework\Filesystem\Pointer\Input\FrameworkTextFileInputPointer');
-
-// CFG: CSV-INPUT-FILE-CLASS
-$cfg->setConfigEntry('csv_input_file_class', 'CoreFramework\Filesystem\Input\Csv\CsvInputFile');
-
-// CFG: FILE-ITERATOR-CLASS
-$cfg->setConfigEntry('file_iterator_class', 'CoreFramework\Iterator\File\FileIterator');
-
-// CFG: FILE-STACK-PRE-ALLOCATE-ENABLED
-$cfg->setConfigEntry('file_stack_pre_allocate_enabled', 'Y');
-
-// CFG: FILE-STACK-PRE-ALLOCATE-COUNT
-$cfg->setConfigEntry('file_stack_pre_allocate_count', 10000);
-
-// CFG: INDEX-INDEX-CLASS
-$cfg->setConfigEntry('file_stack_index_class', 'CoreFramework\Index\Stack\FileStackIndex');
-
-// CFG: INDEX-PRE-ALLOCATE-ENABLED
-$cfg->setConfigEntry('index_pre_allocate_enabled', 'Y');
-
-// CFG: INDEX-PRE-ALLOCATE-COUNT
-$cfg->setConfigEntry('index_pre_allocate_count', 10000);
-
-// CFG: STACK-FILE-CLASS
-$cfg->setConfigEntry('stack_file_class', 'CoreFramework\Filesystem\Stack\StackFile');
-
-// CFG: INDEX-FILE-CLASS
-$cfg->setConfigEntry('index_file_class', 'CoreFramework\Filesystem\Index\IndexFile');
-
-// CFG: TASK-HANDLER-CLASS
-$cfg->setConfigEntry('task_handler_class', 'CoreFramework\Handler\Task\TaskHandler');
-
-// CFG: TASK-LIST-CLASS
-$cfg->setConfigEntry('task_list_class', 'CoreFramework\Lists\Task\TaskList');
-
-// CFG: LIST-GROUP-CLASS
-$cfg->setConfigEntry('list_group_class', 'CoreFramework\Lists\Group\ListGroupList');
-
-// CFG: DEFAULT-ITERATOR-CLASS
-$cfg->setConfigEntry('default_iterator_class', 'CoreFramework\Iterator\DefaultIterator');
-
-// CFG: ACTIVE-TASK-VISITOR-CLASS
-$cfg->setConfigEntry('active_task_visitor_class', 'CoreFramework\Visitor\Task\Active\ActiveTaskVisitor');
-
-// CFG: IDLE-TASK-CLASS
-$cfg->setConfigEntry('idle_task_class', 'CoreFramework\Task\IdleLoop\IdleLoopTask');
-
-// CFG: TASK-IDLE-LOOP-STARTUP-DELAY
-$cfg->setConfigEntry('task_idle_loop_startup_delay', 0);
-
-// CFG: TASK-IDLE-LOOP-INTERVAL-DELAY
-$cfg->setConfigEntry('task_idle_loop_interval_delay', 0);
-
-// CFG: TASK-IDLE-LOOP-MAX-RUNS
-$cfg->setConfigEntry('task_idle_loop_max_runs', 0);
-
-// CFG: IDLE-LOOP-TIME (5 milli seconds)
-$cfg->setConfigEntry('idle_loop_time', 5);
-
-// CFG: SHUTDOWN-TASK-VISITOR-CLASS
-$cfg->setConfigEntry('shutdown_task_visitor_class', 'CoreFramework\Visitor\Task\Shutdown\ShutdownTaskVisitor');
-
-// CFG: DEFAULT-IMAGE-COMMAND
-$cfg->setConfigEntry('default_image_command', 'build');
-
-// CFG: DEFAULT-IMAGE-CONTROLLER
-$cfg->setConfigEntry('default_image_controller', 'build');
-
-// CFG: MENU-TEMPLATE-CLASS
-$cfg->setConfigEntry('menu_template_class', 'CoreFramework\Template\Engine\MenuTemplateEngine');
-
-// CFG: MENU-TEMPLATE-EXTENSION
-$cfg->setConfigEntry('menu_template_extension', '.xml');
-
-// CFG: FEATURE-FUSE-CLASS
-$cfg->setConfigEntry('feature_fuse_class', 'CoreFramework\Feature\Fuse\FuseFeature');
-
-// CFG: TEMP-FILE-PATH
-$cfg->setConfigEntry('temp_file_path', sys_get_temp_dir());
-
-// CFG: IPC-SOCKET-FILE-NAME
-$cfg->setConfigEntry('ipc_socket_file_name', 'php_ipc_socket');
-
-// CFG: EXTENSION-SCRYPT-LOADED (By default scrypt is assumed absent and later tested being there)
-$cfg->setConfigEntry('extension_scrypt_loaded', FALSE);
-
-// CFG: EXTENSION-UUID-LOADED (By default uuid is assumed absent and later tested being there)
-$cfg->setConfigEntry('extension_uuid_loaded', FALSE);
-
-// Remove config from this name-space. Don't worry, no configuration is cleared.
-unset($cfg);
index 6249535f47918677b53f3c5d4faf0b9567a2807c..2a13ed54263d5085c94bbfde1e67c932b4c84121 100644 (file)
@@ -2,6 +2,7 @@
 // Import framework stuff
 use CoreFramework\Configuration\FrameworkConfiguration;
 use CoreFramework\Connection\Database\DatabaseConnection;
 // Import framework stuff
 use CoreFramework\Configuration\FrameworkConfiguration;
 use CoreFramework\Connection\Database\DatabaseConnection;
+use CoreFramework\EntryPoint\ApplicationEntryPoint;
 use CoreFramework\Object\BaseFrameworkSystem;
 use CoreFramework\Middleware\Debug\DebugMiddleware;
 
 use CoreFramework\Object\BaseFrameworkSystem;
 use CoreFramework\Middleware\Debug\DebugMiddleware;
 
@@ -35,9 +36,9 @@ $databaseInstance = NULL;
 
 // Generate FQFN for the database layer
 $fqfn = sprintf(
 
 // Generate FQFN for the database layer
 $fqfn = sprintf(
-       '%sframework/database/lib-%s.php',
-       FrameworkConfiguration::getSelfInstance()->getConfigEntry('base_path'),
-       FrameworkConfiguration::getSelfInstance()->getConfigEntry('db_type')
+       '%sdatabase/lib-%s.php',
+       FrameworkConfiguration::getSelfInstance()->getConfigEntry('framework_base_path'),
+       FrameworkConfiguration::getSelfInstance()->getConfigEntry('database_type')
 );
 
 // Load the database layer include
 );
 
 // Load the database layer include
@@ -47,7 +48,7 @@ if (BaseFrameworkSystem::isReadableFile($fqfn)) {
 } else {
        // Layer is missing!
        ApplicationEntryPoint::app_exit(sprintf('[Main:] Database layer is missing! (%s) -&gt; R.I.P.',
 } else {
        // Layer is missing!
        ApplicationEntryPoint::app_exit(sprintf('[Main:] Database layer is missing! (%s) -&gt; R.I.P.',
-               FrameworkConfiguration::getSelfInstance()->getConfigEntry('db_type')
+               FrameworkConfiguration::getSelfInstance()->getConfigEntry('database_type')
        ));
 }
 
        ));
 }
 
index 806be0491441c1dfb6949627f4f63e7130479d26..3764ca733f1e8646da0c41363f0baa2efb2f1996 100644 (file)
@@ -29,7 +29,7 @@ use CoreFramework\Loader\ClassLoader;
  */
 
 // Include the class loader function
  */
 
 // Include the class loader function
-require(FrameworkConfiguration::getSelfInstance()->getConfigEntry('base_path') . 'framework/loader/class_ClassLoader.php');
+require(FrameworkConfiguration::getSelfInstance()->getConfigEntry('framework_base_path') . 'loader/class_ClassLoader.php');
 
 /*
  * Shall we include additional configs where you can configure some things?
 
 /*
  * Shall we include additional configs where you can configure some things?
index 0560362015876308c5d86c846d46d652bb4f3634..bc37b2ad05579cc79c992a33d66c0d9219c1fd2d 100644 (file)
@@ -4,7 +4,6 @@ namespace CoreFramework\Loader;
 
 // Import framework stuff
 use CoreFramework\Configuration\FrameworkConfiguration;
 
 // Import framework stuff
 use CoreFramework\Configuration\FrameworkConfiguration;
-use CoreFramework\EntryPoint\ApplicationEntryPoint;
 use CoreFramework\Object\BaseFrameworkSystem;
 
 // Import SPL stuff
 use CoreFramework\Object\BaseFrameworkSystem;
 
 // Import SPL stuff
@@ -217,8 +216,8 @@ class ClassLoader {
 
                        // Generate full path from it
                        $pathName = realpath(sprintf(
 
                        // Generate full path from it
                        $pathName = realpath(sprintf(
-                               '%s/framework/main/%s/',
-                               $cfg->getConfigEntry('base_path'),
+                               '%smain/%s/',
+                               $cfg->getConfigEntry('framework_base_path'),
                                $shortPath
                        ));
 
                                $shortPath
                        ));
 
@@ -265,7 +264,7 @@ class ClassLoader {
                        // Create path name
                        $pathName = realpath(sprintf(
                                '%s/%s/%s',
                        // Create path name
                        $pathName = realpath(sprintf(
                                '%s/%s/%s',
-                               $cfg->getConfigEntry('application_path'),
+                               $cfg->getConfigEntry('application_base_path'),
                                $cfg->getConfigEntry('app_name'),
                                $shortPath
                        ));
                                $cfg->getConfigEntry('app_name'),
                                $shortPath
                        ));
@@ -304,7 +303,7 @@ class ClassLoader {
                        // Create path name
                        $pathName = realpath(sprintf(
                                '%s/%s',
                        // Create path name
                        $pathName = realpath(sprintf(
                                '%s/%s',
-                               $cfg->getConfigEntry('base_path'),
+                               $cfg->getConfigEntry('framework_base_path'),
                                $shortPath
                        ));
 
                                $shortPath
                        ));
 
@@ -374,7 +373,7 @@ class ClassLoader {
        /**
         * Scans recursively a local path for class files which must have a prefix and a suffix as given by $this->suffix and $this->prefix
         *
        /**
         * Scans recursively a local path for class files which must have a prefix and a suffix as given by $this->suffix and $this->prefix
         *
-        * @param       $basePath               The relative base path to 'base_path' constant for all classes
+        * @param       $basePath               The relative base path to 'framework_base_path' constant for all classes
         * @param       $ignoreList             An optional list (array forced) of directory and file names which shall be ignored
         * @return      void
         */
         * @param       $ignoreList             An optional list (array forced) of directory and file names which shall be ignored
         * @return      void
         */
@@ -465,7 +464,7 @@ class ClassLoader {
                $this->prefix = 'config-';
 
                // Set base directory
                $this->prefix = 'config-';
 
                // Set base directory
-               $basePath = $this->configInstance->getConfigEntry('base_path') . 'framework/config/';
+               $basePath = $this->configInstance->getConfigEntry('framework_base_path') . 'config/';
 
                // Load all classes from the config directory
                $this->scanClassPath($basePath);
 
                // Load all classes from the config directory
                $this->scanClassPath($basePath);
@@ -489,8 +488,8 @@ class ClassLoader {
 
                // Construct the FQFN for the cache
                if (!defined('DEVELOPER')) {
 
                // Construct the FQFN for the cache
                if (!defined('DEVELOPER')) {
-                       $this->listCacheFQFN  = $this->configInstance->getConfigEntry('local_db_path') . 'list-' . $this->configInstance->getConfigEntry('app_name') . '.cache';
-                       $this->classCacheFQFN = $this->configInstance->getConfigEntry('local_db_path') . 'class-' . $this->configInstance->getConfigEntry('app_name') . '.cache';
+                       $this->listCacheFQFN  = $this->configInstance->getConfigEntry('local_database_path') . 'list-' . $this->configInstance->getConfigEntry('app_name') . '.cache';
+                       $this->classCacheFQFN = $this->configInstance->getConfigEntry('local_database_path') . 'class-' . $this->configInstance->getConfigEntry('app_name') . '.cache';
                } // END - if
 
                // Set suffix and prefix from configuration
                } // END - if
 
                // Set suffix and prefix from configuration
index fac9b9eae610e315ec6149ac0268f7c5341ee486..a2f65b40110774aa5a1b2b2bb312b0e2ec1ea9ac 100644 (file)
@@ -257,7 +257,7 @@ class CachedLocalFileDatabase extends BaseDatabaseBackend implements DatabaseBac
         */
        private function generateFqfnFromDataSet (Criteria $dataSetInstance, $rowName) {
                // This is the FQFN
         */
        private function generateFqfnFromDataSet (Criteria $dataSetInstance, $rowName) {
                // This is the FQFN
-               $fqfn = $this->getConfigInstance()->getConfigEntry('local_db_path') . $dataSetInstance->getTableName() . '/' . $rowName . '.' . $this->getFileExtension();
+               $fqfn = $this->getConfigInstance()->getConfigEntry('local_database_path') . $dataSetInstance->getTableName() . '/' . $rowName . '.' . $this->getFileExtension();
 
                // Return it
                return $fqfn;
 
                // Return it
                return $fqfn;
@@ -359,7 +359,7 @@ class CachedLocalFileDatabase extends BaseDatabaseBackend implements DatabaseBac
                $resultData = NULL;
 
                // Create full path name
                $resultData = NULL;
 
                // Create full path name
-               $pathName = $this->getConfigInstance()->getConfigEntry('local_db_path') . $tableName . '/';
+               $pathName = $this->getConfigInstance()->getConfigEntry('local_database_path') . $tableName . '/';
 
                /*
                 * A 'select' query is not that easy on local files, so first try to
 
                /*
                 * A 'select' query is not that easy on local files, so first try to
@@ -502,7 +502,7 @@ class CachedLocalFileDatabase extends BaseDatabaseBackend implements DatabaseBac
         */
        public function queryUpdateDataSet (StoreableCriteria $dataSetInstance) {
                // Create full path name
         */
        public function queryUpdateDataSet (StoreableCriteria $dataSetInstance) {
                // Create full path name
-               $pathName = $this->getConfigInstance()->getConfigEntry('local_db_path') . $dataSetInstance->getTableName() . '/';
+               $pathName = $this->getConfigInstance()->getConfigEntry('local_database_path') . $dataSetInstance->getTableName() . '/';
 
                // Try all the requests
                try {
 
                // Try all the requests
                try {
@@ -646,7 +646,7 @@ class CachedLocalFileDatabase extends BaseDatabaseBackend implements DatabaseBac
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DATABASE: tableName=' . $tableName . ' - CALLED!');
 
                // Create full path name
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DATABASE: tableName=' . $tableName . ' - CALLED!');
 
                // Create full path name
-               $pathName = $this->getConfigInstance()->getConfigEntry('local_db_path') . $tableName . '/';
+               $pathName = $this->getConfigInstance()->getConfigEntry('local_database_path') . $tableName . '/';
 
                // Try all the requests
                try {
 
                // Try all the requests
                try {
index 4394ab4c089b8c4498fc4897a485626e26843d39..957810fbfe35bad3b4fe4bf15bf6d08868545b1b 100644 (file)
@@ -50,7 +50,7 @@ class FileStackFactory extends ObjectFactory {
        public static final function createFileStackInstance ($prefix, $stackName) {
                // Construct file stack name
                $stackFileName = sprintf('%s%s/%s.%s',
        public static final function createFileStackInstance ($prefix, $stackName) {
                // Construct file stack name
                $stackFileName = sprintf('%s%s/%s.%s',
-                       FrameworkConfiguration::getSelfInstance()->getConfigEntry('base_path'),
+                       FrameworkConfiguration::getSelfInstance()->getConfigEntry('framework_base_path'),
                        FrameworkConfiguration::getSelfInstance()->getConfigEntry('base_file_stacks_path'),
                        $stackName,
                        FrameworkConfiguration::getSelfInstance()->getConfigEntry('file_stacks_extension')
                        FrameworkConfiguration::getSelfInstance()->getConfigEntry('base_file_stacks_path'),
                        $stackName,
                        FrameworkConfiguration::getSelfInstance()->getConfigEntry('file_stacks_extension')
index 0c2875ac2c9740666d07ecdb437f151d01be50f0..6e775009ab3c94f6e41fdc3f8a339e00d55d511e 100644 (file)
@@ -85,10 +85,9 @@ class LanguageSystem extends BaseFrameworkSystem implements ManageableLanguage,
                        $applicationInstance = Registry::getRegistry()->getInstance('app');
 
                        // 2) Try to build it
                        $applicationInstance = Registry::getRegistry()->getInstance('app');
 
                        // 2) Try to build it
-                       $languageBasePath = sprintf('%sapplication/%s/language/',
-                               $langInstance->getConfigInstance()->getConfigEntry('base_path'),
-                               // Don't allow any underscores/dashes in application names
-                               str_replace(array('_', '-'), array('', ''), $applicationInstance->getAppShortName())
+                       $languageBasePath = sprintf('%s%s/language/',
+                               $langInstance->getConfigInstance()->getConfigEntry('application_base_path'),
+                               $applicationInstance->getAppShortName()
                        );
                } // END - if
 
                        );
                } // END - if
 
index 9cb1411b748c3fe74363b036a998828b052c9f87..cb0712578ad38c5e73e86b80dbf27cd034d45340 100644 (file)
@@ -690,7 +690,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem {
                 * template paths comes from an older time.
                 */
                $fqfn = sprintf('%s%s%s%s/%s%s',
                 * template paths comes from an older time.
                 */
                $fqfn = sprintf('%s%s%s%s/%s%s',
-                       $this->getConfigInstance()->getConfigEntry('base_path'),
+                       $this->getConfigInstance()->getConfigEntry('application_base_path'),
                        $this->getTemplateBasePath(),
                        $this->getGenericBasePath(),
                        $this->getTemplateType(),
                        $this->getTemplateBasePath(),
                        $this->getGenericBasePath(),
                        $this->getTemplateType(),
index e6305d81ea9f42007419cdddb1f897147e861925..0464ce97958baca59ae7e1ec51f986f23a592552 100644 (file)
@@ -62,7 +62,7 @@ class ConsoleTemplateEngine extends BaseTemplateEngine implements CompileableTem
                $applicationInstance = Registry::getRegistry()->getInstance('app');
 
                // Determine base path
                $applicationInstance = Registry::getRegistry()->getInstance('app');
 
                // Determine base path
-               $templateBasePath = $templateInstance->getConfigInstance()->getConfigEntry('application_base_path') . $applicationInstance->getRequestInstance()->getRequestElement('app') . '/';
+               $templateBasePath = $templateInstance->getConfigInstance()->getConfigEntry('application_base_path') . $applicationInstance->getAppShortName(). '/';
 
                // Is the base path valid?
                if (empty($templateBasePath)) {
 
                // Is the base path valid?
                if (empty($templateBasePath)) {
@@ -87,7 +87,10 @@ class ConsoleTemplateEngine extends BaseTemplateEngine implements CompileableTem
                $templateInstance->setCodeTemplateExtension($templateInstance->getConfigInstance()->getConfigEntry('code_template_extension'));
 
                // Absolute output path for compiled templates
                $templateInstance->setCodeTemplateExtension($templateInstance->getConfigInstance()->getConfigEntry('code_template_extension'));
 
                // Absolute output path for compiled templates
-               $templateInstance->setCompileOutputPath($templateInstance->getConfigInstance()->getConfigEntry('base_path') . $templateInstance->getConfigInstance()->getConfigEntry('compile_output_path'));
+               $templateInstance->setCompileOutputPath(sprintf('%s%s/',
+                       $templateBasePath,
+                       $templateInstance->getConfigInstance()->getConfigEntry('compile_output_path')
+               ));
 
                // Return the prepared instance
                return $templateInstance;
 
                // Return the prepared instance
                return $templateInstance;
index 1149effff9de6e8add6800558b7f664cf078b050..763d88c2f3f6b4aa744fd0f91e93d44129d58b00 100644 (file)
@@ -62,7 +62,7 @@ class HtmlTemplateEngine extends BaseTemplateEngine implements CompileableTempla
                $applicationInstance = Registry::getRegistry()->getInstance('app');
 
                // Determine base path
                $applicationInstance = Registry::getRegistry()->getInstance('app');
 
                // Determine base path
-               $templateBasePath = $templateInstance->getConfigInstance()->getConfigEntry('application_base_path') . $applicationInstance->getRequestInstance()->getRequestElement('app') . '/';
+               $templateBasePath = $templateInstance->getConfigInstance()->getConfigEntry('application_base_path') . $applicationInstance->getAppShortName(). '/';
 
                // Is the base path valid?
                if (empty($templateBasePath)) {
 
                // Is the base path valid?
                if (empty($templateBasePath)) {
@@ -87,7 +87,10 @@ class HtmlTemplateEngine extends BaseTemplateEngine implements CompileableTempla
                $templateInstance->setCodeTemplateExtension($templateInstance->getConfigInstance()->getConfigEntry('code_template_extension'));
 
                // Absolute output path for compiled templates
                $templateInstance->setCodeTemplateExtension($templateInstance->getConfigInstance()->getConfigEntry('code_template_extension'));
 
                // Absolute output path for compiled templates
-               $templateInstance->setCompileOutputPath($templateInstance->getConfigInstance()->getConfigEntry('base_path') . $templateInstance->getConfigInstance()->getConfigEntry('compile_output_path'));
+               $templateInstance->setCompileOutputPath(sprintf('%s%s/',
+                       $templateBasePath,
+                       $templateInstance->getConfigInstance()->getConfigEntry('compile_output_path')
+               ));
 
                // Return the prepared instance
                return $templateInstance;
 
                // Return the prepared instance
                return $templateInstance;
index 9f4cd8a921611bfff07e5e115ac0e9f82b5b9867..42660810598ec86e49916efc5b08a101a184320d 100644 (file)
@@ -98,7 +98,7 @@ class ImageTemplateEngine extends BaseTemplateEngine implements CompileableTempl
                $applicationInstance = Registry::getRegistry()->getInstance('app');
 
                // Determine base path
                $applicationInstance = Registry::getRegistry()->getInstance('app');
 
                // Determine base path
-               $templateBasePath = $templateInstance->getConfigInstance()->getConfigEntry('application_base_path') . $applicationInstance->getRequestInstance()->getRequestElement('app') . '/';
+               $templateBasePath = $templateInstance->getConfigInstance()->getConfigEntry('application_base_path') . $applicationInstance->getAppShortName(). '/';
 
                // Is the base path valid?
                if (empty($templateBasePath)) {
 
                // Is the base path valid?
                if (empty($templateBasePath)) {
@@ -123,7 +123,10 @@ class ImageTemplateEngine extends BaseTemplateEngine implements CompileableTempl
                $templateInstance->setCodeTemplateExtension($templateInstance->getConfigInstance()->getConfigEntry('code_template_extension'));
 
                // Absolute output path for compiled templates
                $templateInstance->setCodeTemplateExtension($templateInstance->getConfigInstance()->getConfigEntry('code_template_extension'));
 
                // Absolute output path for compiled templates
-               $templateInstance->setCompileOutputPath($templateInstance->getConfigInstance()->getConfigEntry('base_path') . $templateInstance->getConfigInstance()->getConfigEntry('compile_output_path'));
+               $templateInstance->setCompileOutputPath(sprintf('%s%s/',
+                       $templateBasePath,
+                       $templateInstance->getConfigInstance()->getConfigEntry('compile_output_path')
+               ));
 
                // Return the prepared instance
                return $templateInstance;
 
                // Return the prepared instance
                return $templateInstance;
@@ -474,7 +477,7 @@ class ImageTemplateEngine extends BaseTemplateEngine implements CompileableTempl
        public function getImageCacheFqfn () {
                // Get the FQFN ready
                $fqfn = sprintf('%s%s%s/%s.%s',
        public function getImageCacheFqfn () {
                // Get the FQFN ready
                $fqfn = sprintf('%s%s%s/%s.%s',
-                       $this->getConfigInstance()->getConfigEntry('base_path'),
+                       $this->getConfigInstance()->getConfigEntry('framework_base_path'),
                        $this->getGenericBasePath(),
                        'images/_cache',
                        md5(
                        $this->getGenericBasePath(),
                        'images/_cache',
                        md5(
index 7ff55f3078cae400d48799a47e54a17210aeb041..763d46028ae431b022f3b4d88856c393e3040373 100644 (file)
@@ -92,7 +92,7 @@ class MailTemplateEngine extends BaseTemplateEngine implements CompileableTempla
                $applicationInstance = Registry::getRegistry()->getInstance('app');
 
                // Determine base path
                $applicationInstance = Registry::getRegistry()->getInstance('app');
 
                // Determine base path
-               $templateBasePath = $templateInstance->getConfigInstance()->getConfigEntry('application_base_path') . $applicationInstance->getRequestInstance()->getRequestElement('app') . '/';
+               $templateBasePath = $templateInstance->getConfigInstance()->getConfigEntry('application_base_path') . $applicationInstance->getAppShortName(). '/';
 
                // Is the base path valid?
                if (empty($templateBasePath)) {
 
                // Is the base path valid?
                if (empty($templateBasePath)) {
@@ -117,7 +117,10 @@ class MailTemplateEngine extends BaseTemplateEngine implements CompileableTempla
                $templateInstance->setCodeTemplateExtension($templateInstance->getConfigInstance()->getConfigEntry('code_template_extension'));
 
                // Absolute output path for compiled templates
                $templateInstance->setCodeTemplateExtension($templateInstance->getConfigInstance()->getConfigEntry('code_template_extension'));
 
                // Absolute output path for compiled templates
-               $templateInstance->setCompileOutputPath($templateInstance->getConfigInstance()->getConfigEntry('base_path') . $templateInstance->getConfigInstance()->getConfigEntry('compile_output_path'));
+               $templateInstance->setCompileOutputPath(sprintf('%s%s/',
+                       $templateBasePath,
+                       $templateInstance->getConfigInstance()->getConfigEntry('compile_output_path')
+               ));
 
                // Return the prepared instance
                return $templateInstance;
 
                // Return the prepared instance
                return $templateInstance;
index c5601b4c647d46b1ac6c5f17ccdcb2cb3bb9d51d..316f1518b8b4f41f011ff397950581d1ce4613b7 100644 (file)
@@ -151,7 +151,7 @@ class MenuTemplateEngine extends BaseTemplateEngine implements CompileableTempla
                $applicationInstance = Registry::getRegistry()->getInstance('app');
 
                // Determine base path
                $applicationInstance = Registry::getRegistry()->getInstance('app');
 
                // Determine base path
-               $templateBasePath = $templateInstance->getConfigInstance()->getConfigEntry('application_base_path') . $applicationInstance->getRequestInstance()->getRequestElement('app') . '/';
+               $templateBasePath = $templateInstance->getConfigInstance()->getConfigEntry('application_base_path') . $applicationInstance->getAppShortName(). '/';
 
                // Is the base path valid?
                if (empty($templateBasePath)) {
 
                // Is the base path valid?
                if (empty($templateBasePath)) {
@@ -176,7 +176,10 @@ class MenuTemplateEngine extends BaseTemplateEngine implements CompileableTempla
                $templateInstance->setCodeTemplateExtension($templateInstance->getConfigInstance()->getConfigEntry('menu_template_extension'));
 
                // Absolute output path for compiled templates
                $templateInstance->setCodeTemplateExtension($templateInstance->getConfigInstance()->getConfigEntry('menu_template_extension'));
 
                // Absolute output path for compiled templates
-               $templateInstance->setCompileOutputPath($templateInstance->getConfigInstance()->getConfigEntry('base_path') . $templateInstance->getConfigInstance()->getConfigEntry('compile_output_path'));
+               $templateInstance->setCompileOutputPath(sprintf('%s%s/',
+                       $templateBasePath,
+                       $templateInstance->getConfigInstance()->getConfigEntry('compile_output_path')
+               ));
 
                // Set the menu instance
                $templateInstance->setMenuInstance($menuInstance);
 
                // Set the menu instance
                $templateInstance->setMenuInstance($menuInstance);
@@ -866,11 +869,13 @@ class MenuTemplateEngine extends BaseTemplateEngine implements CompileableTempla
         * @return      $fqfn   Full-qualified file name of the menu cache
         */
        public function getMenuCacheFqfn () {
         * @return      $fqfn   Full-qualified file name of the menu cache
         */
        public function getMenuCacheFqfn () {
+               // Get the application instance from registry
+               $applicationInstance = Registry::getRegistry()->getInstance('app');
+
                // Get the FQFN ready
                // Get the FQFN ready
-               $fqfn = sprintf('%s%s%s/%s.%s',
-                       $this->getConfigInstance()->getConfigEntry('base_path'),
-                       $this->getGenericBasePath(),
-                       'menus/_cache',
+               $fqfn = sprintf('%s%smenus/_cache/%s.%s',
+                       $this->getConfigInstance()->getConfigEntry('application_base_path'),
+                       $applicationInstance->getAppShortName(),
                        md5(
                                $this->getMenuInstance()->getMenuName() . ':' .
                                $this->__toString() . ':' .
                        md5(
                                $this->getMenuInstance()->getMenuName() . ':' .
                                $this->__toString() . ':' .
index 1e7bf82a9965dfbdd494d967a2f0ac5c919600f0..0baffa557e4c37fd2f757c2346bb1d48c53399ac 100644 (file)
@@ -62,7 +62,7 @@ class CompressorChannel extends BaseMiddleware implements Registerable {
                ) {
                        // Init base directory
                        $baseDir =
                ) {
                        // Init base directory
                        $baseDir =
-                               $compressorInstance->getConfigInstance()->getConfigEntry('base_path') .
+                               $compressorInstance->getConfigInstance()->getConfigEntry('framework_base_path') .
                                $compressorInstance->getConfigInstance()->getConfigEntry('compressor_base_path');
 
                        // Get a directory pointer
                                $compressorInstance->getConfigInstance()->getConfigEntry('compressor_base_path');
 
                        // Get a directory pointer
index 59abbe55ba875d9b5d539f27de1771b3abcfd8d2..abedae92ea5b47fcb32fe52dcd23a6823409f3df 100644 (file)
@@ -41,7 +41,7 @@ $configAppIncludes = array(
 );
 
 // Cache base path/file here
 );
 
 // Cache base path/file here
-$basePathFile = FrameworkConfiguration::getSelfInstance()->getConfigEntry('application_path') . FrameworkConfiguration::getSelfInstance()->getConfigEntry('app_name');
+$basePathFile = FrameworkConfiguration::getSelfInstance()->getConfigEntry('application_base_path') . FrameworkConfiguration::getSelfInstance()->getConfigEntry('app_name');
 
 // Is the directory there?
 if (!is_dir($basePathFile)) {
 
 // Is the directory there?
 if (!is_dir($basePathFile)) {
index e058edadaccafcfcb3990887031456c133a816d1..ecf66b48876f5635b4848a966b756595673f1fec 100644 (file)
--- a/index.php
+++ b/index.php
@@ -10,6 +10,9 @@ use CoreFramework\Localization\LanguageSystem;
 use CoreFramework\Loader\ClassLoader;
 use CoreFramework\Generic\FrameworkException;
 
 use CoreFramework\Loader\ClassLoader;
 use CoreFramework\Generic\FrameworkException;
 
+// Import SPL stuff
+use \Exception;
+
 /**
  * The main class with the entry point to the whole application. This class
  * "emulates" Java's entry point call. Additionally it covers local
 /**
  * The main class with the entry point to the whole application. This class
  * "emulates" Java's entry point call. Additionally it covers local
@@ -39,9 +42,9 @@ use CoreFramework\Generic\FrameworkException;
  */
 final class ApplicationEntryPoint {
        /**
  */
 final class ApplicationEntryPoint {
        /**
-        * Core path
+        * Framework path
         */
         */
-       private static $corePath = '';
+       private static $frameworkPath = '';
 
        /**
         * The application's emergency exit
 
        /**
         * The application's emergency exit
@@ -177,18 +180,18 @@ final class ApplicationEntryPoint {
        }
 
        /**
        }
 
        /**
-        * Determines the correct absolute path for all includes only once per run.
-        * Other calls of this method are being "cached". This is done by checking
-        * a small list of common paths where the framework can reside and check if
-        * framework/config.php can be found.
+        * Determines the correct absolute path for the framework. A set of common
+        * paths is being tested (first most common for applications, second when
+        * core tests are being executed and third/forth if the framework has been
+        * cloned there).
         *
         *
-        * @return      $corePath       Base path (core) for all includes
+        * @return      $frameworkPath  Path for framework
         */
         */
-       protected static final function detectCorePath () {
+       public static final function detectFrameworkPath () {
                // Is it not set?
                // Is it not set?
-               if (empty(self::$corePath)) {
+               if (empty(self::$frameworkPath)) {
                        // Auto-detect core path (first application-common)
                        // Auto-detect core path (first application-common)
-                       foreach (array('core', '.') as $possiblePath) {
+                       foreach (array('core', '.', '/usr/local/share/php/core', '/usr/share/php/core') as $possiblePath) {
                                // Create full path for testing
                                $realPath = realpath($possiblePath);
 
                                // Create full path for testing
                                $realPath = realpath($possiblePath);
 
@@ -201,9 +204,9 @@ final class ApplicationEntryPoint {
                                        continue;
                                } // END - if
 
                                        continue;
                                } // END - if
 
-                               // First create full-qualified file name (FQFN) to framework/config.php
+                               // First create full-qualified file name (FQFN) to framework/config.inc.php
                                $fqfn = sprintf(
                                $fqfn = sprintf(
-                                       '%s%sframework%sconfig.php',
+                                       '%s%sframework%sconfig.inc.php',
                                        $realPath,
                                        DIRECTORY_SEPARATOR,
                                        DIRECTORY_SEPARATOR,
                                        $realPath,
                                        DIRECTORY_SEPARATOR,
                                        DIRECTORY_SEPARATOR,
@@ -211,21 +214,27 @@ final class ApplicationEntryPoint {
                                );
 
                                // Debug message
                                );
 
                                // Debug message
-                               //* NOISY-DEBUG: */ printf('[%s:%d]: fqfn=%s' . PHP_EOL, __METHOD__, __LINE__, $fqfn);
+                               /* NOISY-DEBUG: */ printf('[%s:%d]: fqfn=%s' . PHP_EOL, __METHOD__, __LINE__, $fqfn);
 
                                // Is it readable?
                                if (is_readable($fqfn)) {
                                        // Found one
 
                                // Is it readable?
                                if (is_readable($fqfn)) {
                                        // Found one
-                                       self::$corePath = $realPath;
+                                       self::$frameworkPath = $realPath . '/framework/';
 
                                        // Abort here
                                        break;
                                } // END - if
                        } // END - foreach
 
                                        // Abort here
                                        break;
                                } // END - if
                        } // END - foreach
+
+                       // Able to find?
+                       if (!is_dir(self::$frameworkPath)) {
+                               // Is no directory
+                               throw new Exception('Cannot find framework.');
+                       } // END - if
                } // END - if
 
                // Return it
                } // END - if
 
                // Return it
-               return self::$corePath;
+               return self::$frameworkPath;
        }
 
        /**
        }
 
        /**
@@ -237,22 +246,11 @@ final class ApplicationEntryPoint {
         * @return      void
         */
        public static final function main () {
         * @return      void
         */
        public static final function main () {
-               // Load config file, this no longer provides $cfg
-               require(self::detectCorePath() . '/framework/config.php');
+               // Load bootstrap file
+               require(self::detectFrameworkPath() . 'bootstrap/bootstrap.inc.php');
 
                // Get a new configuration instance
                $cfg = FrameworkConfiguration::getSelfInstance();
 
                // Get a new configuration instance
                $cfg = FrameworkConfiguration::getSelfInstance();
-
-               // Load bootstrap class
-               require($cfg->getConfigEntry('base_path') . 'framework/bootstrap/class_BootstrapFramework.php');
-
-               // ----- Below is deprecated -----
-
-               // Load all include files
-               require($cfg->getConfigEntry('base_path') . 'framework/includes.php');
-
-               // Include the application selector
-               require($cfg->getConfigEntry('base_path') . 'framework/selector.php');
        }
 }
 
        }
 }
 
index 6e2c34b8003c34df9a835b1c006a6b01426e74e9..968452a51bfd8b2a9268834fbb357d1d1c7e343b 100644 (file)
@@ -8,10 +8,10 @@ print (basename(__FILE__).": Init...\n");
 require(dirname(dirname(__FILE__)) . '/framework/config.php');
 
 // Load all include files
 require(dirname(dirname(__FILE__)) . '/framework/config.php');
 
 // Load all include files
-require($cfg->getConfigEntry('base_path') . 'framework/includes.php');
+require($cfg->getConfigEntry('framework_base_path') . 'includes.php');
 
 // Load all game classes
 
 // Load all game classes
-require($cfg->getConfigEntry('base_path') . 'framework/classes.php');
+require($cfg->getConfigEntry('framework_base_path') . 'classes.php');
 
 // Set default application
 FrameworkConfiguration::getInstance()->setConfigEntry('default_application', 'shipsimu');
 
 // Set default application
 FrameworkConfiguration::getInstance()->setConfigEntry('default_application', 'shipsimu');
index 7031b2a316d23199365c8c1b28990c99b1511b90..846ec55c428f3844f6cebf20f9ab006e2ebb903a 100644 (file)
@@ -8,10 +8,10 @@ print (basename(__FILE__).": Init...\n");
 require(dirname(dirname(__FILE__)) . '/framework/config.php');
 
 // Load all include files
 require(dirname(dirname(__FILE__)) . '/framework/config.php');
 
 // Load all include files
-require($cfg->getConfigEntry('base_path') . 'framework/includes.php');
+require($cfg->getConfigEntry('framework_base_path') . 'includes.php');
 
 // Load all game classes
 
 // Load all game classes
-require($cfg->getConfigEntry('base_path') . 'framework/classes.php');
+require($cfg->getConfigEntry('framework_base_path') . 'classes.php');
 
 // Set default application
 FrameworkConfiguration::getInstance()->setConfigEntry('default_application', 'shipsimu');
 
 // Set default application
 FrameworkConfiguration::getInstance()->setConfigEntry('default_application', 'shipsimu');
index a32dfe783159d85fc9fd776afd6632cba9160ac3..80d78e47505fbe06da3e568f33f2afe8196caf3d 100644 (file)
@@ -8,10 +8,10 @@ print (basename(__FILE__).": Init...\n");
 require(dirname(dirname(__FILE__)) . '/framework/config.php');
 
 // Load all include files
 require(dirname(dirname(__FILE__)) . '/framework/config.php');
 
 // Load all include files
-require($cfg->getConfigEntry('base_path') . 'framework/includes.php');
+require($cfg->getConfigEntry('framework_base_path') . 'includes.php');
 
 // Load all game classes
 
 // Load all game classes
-require($cfg->getConfigEntry('base_path') . 'framework/classes.php');
+require($cfg->getConfigEntry('framework_base_path') . 'classes.php');
 
 // Set default application
 FrameworkConfiguration::getInstance()->setConfigEntry('default_application', 'shipsimu');
 
 // Set default application
 FrameworkConfiguration::getInstance()->setConfigEntry('default_application', 'shipsimu');
index 078f0bb765f5245885dbb0a6e59ed1560dc1b8ae..2e8e65654ce597dcc5dcba0ecf10d6584205f5ad 100644 (file)
@@ -8,10 +8,10 @@ print (basename(__FILE__).": Init...\n");
 require(dirname(dirname(__FILE__)) . '/framework/config.php');
 
 // Load all include files
 require(dirname(dirname(__FILE__)) . '/framework/config.php');
 
 // Load all include files
-require($cfg->getConfigEntry('base_path') . 'framework/includes.php');
+require($cfg->getConfigEntry('framework_base_path') . 'includes.php');
 
 // Load all game classes
 
 // Load all game classes
-require($cfg->getConfigEntry('base_path') . 'framework/classes.php');
+require($cfg->getConfigEntry('framework_base_path') . 'classes.php');
 
 // Set default application
 FrameworkConfiguration::getInstance()->setConfigEntry('default_application', 'shipsimu');
 
 // Set default application
 FrameworkConfiguration::getInstance()->setConfigEntry('default_application', 'shipsimu');
index 9a1d55cc9b618732e024e68b26295dd44924c515..b4de26a74f16a4c4b23cd2f727b24b358173c031 100644 (file)
@@ -9,23 +9,23 @@ define('TEST_MODE', true);
 require(dirname(dirname(dirname(__FILE__))) . '/framework/config.php');
 
 // Load all include files
 require(dirname(dirname(dirname(__FILE__))) . '/framework/config.php');
 
 // Load all include files
-require($cfg->getConfigEntry('base_path') . 'framework/includes.php');
+require($cfg->getConfigEntry('framework_base_path') . 'includes.php');
 
 // Load all game classes
 
 // Load all game classes
-require($cfg->getConfigEntry('base_path') . 'framework/classes.php');
+require($cfg->getConfigEntry('framework_base_path') . 'classes.php');
 
 // Load file I/O handler
 
 // Load file I/O handler
-require($cfg->getConfigEntry('base_path') . 'framework/file_io.php');
+require($cfg->getConfigEntry('framework_base_path') . 'file_io.php');
 
 // Load database layer
 
 // Load database layer
-require($cfg->getConfigEntry('base_path') . 'framework/database.php');
+require($cfg->getConfigEntry('framework_base_path') . 'database.php');
 
 // Set default application
 FrameworkConfiguration::getInstance()->setConfigEntry('default_application', 'shipsimu');
 $application = 'shipsimu';
 
 // Load more includes
 
 // Set default application
 FrameworkConfiguration::getInstance()->setConfigEntry('default_application', 'shipsimu');
 $application = 'shipsimu';
 
 // Load more includes
-require($cfg->getConfigEntry('base_path') . 'application/shipsimu/loader.php');
+require($cfg->getConfigEntry('root_base_path') . 'application/shipsimu/loader.php');
 
 // Wir tun hier so, als waere schon das Reederei-Objekt generiert und wir wollen
 // jetzt die Personalliste wiederherstellen
 
 // Wir tun hier so, als waere schon das Reederei-Objekt generiert und wir wollen
 // jetzt die Personalliste wiederherstellen
index b72865d4a73ee754d4f3209c9df07574c66c4c74..ef18401a48b518e88066ff9d8125d8b2534e4dea 100644 (file)
@@ -9,23 +9,23 @@ define('TEST_MODE', true);
 require(dirname(dirname(dirname(__FILE__))) . '/framework/config.php');
 
 // Load all include files
 require(dirname(dirname(dirname(__FILE__))) . '/framework/config.php');
 
 // Load all include files
-require($cfg->getConfigEntry('base_path') . 'framework/includes.php');
+require($cfg->getConfigEntry('framework_base_path') . 'includes.php');
 
 // Load all game classes
 
 // Load all game classes
-require($cfg->getConfigEntry('base_path') . 'framework/classes.php');
+require($cfg->getConfigEntry('framework_base_path') . 'classes.php');
 
 // Load file I/O handler
 
 // Load file I/O handler
-require($cfg->getConfigEntry('base_path') . 'framework/file_io.php');
+require($cfg->getConfigEntry('framework_base_path') . 'file_io.php');
 
 // Load database layer
 
 // Load database layer
-require($cfg->getConfigEntry('base_path') . 'framework/database.php');
+require($cfg->getConfigEntry('framework_base_path') . 'database.php');
 
 // Set default application
 FrameworkConfiguration::getInstance()->setConfigEntry('default_application', 'shipsimu');
 $application = 'shipsimu';
 
 // Load more includes
 
 // Set default application
 FrameworkConfiguration::getInstance()->setConfigEntry('default_application', 'shipsimu');
 $application = 'shipsimu';
 
 // Load more includes
-require($cfg->getConfigEntry('base_path') . 'application/shipsimu/loader.php');
+require($cfg->getConfigEntry('root_base_path') . 'application/shipsimu/loader.php');
 
 // Wir tun hier so, als waere schon das Reederei-Objekt generiert und wir wollen
 // jetzt die Personalliste wiederherstellen
 
 // Wir tun hier so, als waere schon das Reederei-Objekt generiert und wir wollen
 // jetzt die Personalliste wiederherstellen
index be1271b0a638c9b5d5a121bdf23400fb39fa860c..df2ef254b1777e3da8c27dcc288ed2ab89e89354 100644 (file)
@@ -9,23 +9,23 @@ define('TEST_MODE', true);
 require(dirname(dirname(dirname(__FILE__))) . '/framework/config.php');
 
 // Load all include files
 require(dirname(dirname(dirname(__FILE__))) . '/framework/config.php');
 
 // Load all include files
-require($cfg->getConfigEntry('base_path') . 'framework/includes.php');
+require($cfg->getConfigEntry('framework_base_path') . 'includes.php');
 
 // Load all game classes
 
 // Load all game classes
-require($cfg->getConfigEntry('base_path') . 'framework/classes.php');
+require($cfg->getConfigEntry('framework_base_path') . 'classes.php');
 
 // Load file I/O handler
 
 // Load file I/O handler
-require($cfg->getConfigEntry('base_path') . 'framework/file_io.php');
+require($cfg->getConfigEntry('framework_base_path') . 'file_io.php');
 
 // Load database layer
 
 // Load database layer
-require($cfg->getConfigEntry('base_path') . 'framework/database.php');
+require($cfg->getConfigEntry('framework_base_path') . 'database.php');
 
 // Set default application
 FrameworkConfiguration::getInstance()->setConfigEntry('default_application', 'shipsimu');
 $application = 'shipsimu';
 
 // Load more includes
 
 // Set default application
 FrameworkConfiguration::getInstance()->setConfigEntry('default_application', 'shipsimu');
 $application = 'shipsimu';
 
 // Load more includes
-require($cfg->getConfigEntry('base_path') . 'application/shipsimu/loader.php');
+require($cfg->getConfigEntry('root_base_path') . 'application/shipsimu/loader.php');
 
 // Wir tun hier so, als waere schon das Reederei-Objekt generiert und wir wollen
 // jetzt die Personalliste wiederherstellen
 
 // Wir tun hier so, als waere schon das Reederei-Objekt generiert und wir wollen
 // jetzt die Personalliste wiederherstellen