Continued:
authorRoland Haeder <roland@mxchange.org>
Sun, 2 Apr 2017 18:44:02 +0000 (20:44 +0200)
committerRoland Haeder <roland@mxchange.org>
Sun, 2 Apr 2017 18:44:02 +0000 (20:44 +0200)
- renamed BootstrapFramework -> FrameworkBootstrap as there are also similar
  classes around, like FrameworkConfiguration
- require/include are no functions, don't use parentheses here (including old
  tests, I know)
- continued with rewriting bootstrap: more methods in FrameworkBootstrap and
  lesser include files in framework/ path

Signed-off-by: Roland Häder <roland@mxchange.org>
17 files changed:
application/tests/init.php
framework/bootstrap/bootstrap.inc.php
framework/bootstrap/class_BootstrapFramework.php [deleted file]
framework/bootstrap/class_FrameworkBootstrap.php [new file with mode: 0644]
framework/config.inc.php
framework/database.php
framework/includes.php
framework/loader/class_ClassLoader.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 29dfc167c42d60030a425832d0f71f0a22165607..6266e1c81f5306cfbb42dde20b0fedf9cdbb5cc0 100644 (file)
@@ -35,9 +35,11 @@ $cfg = FrameworkConfiguration::getSelfInstance();
 // Initialize output system
 ApplicationHelper::createDebugInstance('ApplicationHelper');
 
-// This application needs a database connection then we have to simply include
-// the framework/database.php script
-require($cfg->getConfigEntry('framework_base_path') . 'database.php');
+/*
+ * This application needs a database connection then we have to simply include
+ * the framework/database.php script
+ */
+require $cfg->getConfigEntry('framework_base_path') . 'database.php';
 
 // Register core tests
 ClassLoader::registerTestsPath('framework/main/tests');
index 4c2ebd4286644e5ddc0c7419c8cf95ddb2803ddd..848e6898ffd80a234166cf3d4737123a81229986 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 // Import framework stuff
-use CoreFramework\Bootstrap\BootstrapFramework;
+use CoreFramework\Bootstrap\FrameworkBootstrap;
 
 /**
  * Start including this file to bootstrap into the framework
@@ -26,7 +26,7 @@ use CoreFramework\Bootstrap\BootstrapFramework;
  */
 
 // Load very basic classes, required to bootstrap
-require(__DIR__ . '/class_BootstrapFramework.php');
+require __DIR__ . '/class_FrameworkBootstrap.php';
 
 // Bootstrap framework
-BootstrapFramework::doBootstrap();
+FrameworkBootstrap::doBootstrap();
diff --git a/framework/bootstrap/class_BootstrapFramework.php b/framework/bootstrap/class_BootstrapFramework.php
deleted file mode 100644 (file)
index 565f3c8..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-<?php
-// Own namespace
-namespace CoreFramework\Bootstrap;
-
-// Import framework stuff
-use CoreFramework\EntryPoint\ApplicationEntryPoint;
-
-/**
- * A framework-bootstrap class which helps the frameworks to bootstrap ... ;-)
- *
- * @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/>.
- */
-final class BootstrapFramework {
-       /**
-        * Private constructor, no instance is needed from this class as only
-        * static methods exist.
-        */
-       private function __construct () {
-               // Prevent making instances from this "utilities" class
-       }
-
-       /**
-        * 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/bootstrap/class_FrameworkBootstrap.php b/framework/bootstrap/class_FrameworkBootstrap.php
new file mode 100644 (file)
index 0000000..6f53a01
--- /dev/null
@@ -0,0 +1,69 @@
+<?php
+// Own namespace
+namespace CoreFramework\Bootstrap;
+
+// Import framework stuff
+use CoreFramework\EntryPoint\ApplicationEntryPoint;
+
+/**
+ * A framework-bootstrap class which helps the frameworks to bootstrap ... ;-)
+ *
+ * @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/>.
+ */
+final class FrameworkBootstrap {
+       /**
+        * Private constructor, no instance is needed from this class as only
+        * static methods exist.
+        */
+       private function __construct () {
+               // Prevent making instances from this "utilities" class
+       }
+
+       /**
+        * 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';
+       }
+
+       /**
+        * Checks all parameters, like $_GET, $_POST, $_COOKIE and also "emulated"
+        * from command-line. Accepted CLI parameters are in following forms:
+        *
+        * --foo=bar - parameter 'foo' gets value "bar" (string)
+        * --enable-foo=true - parameter 'enableFoo' gets value true (boolean)
+        * --baz=123 - parameter 'baz' get value 123 (interger)
+        *
+        * The same also works without 2 dashes as it was possible before:
+        *
+        * app=tests - launches application 'tests' (parameter 'app' gets string value "tests")
+        */
+       public static function checkParameters () {
+       }
+
+}
index 1ea3397401b7f766c7664900bdd26140930d749c..e0498c680b644ecc18cfe81317f014c58b833ddb 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 // Import framework stuff
 use CoreFramework\Configuration\FrameworkConfiguration;
-use CoreFramework\Bootstrap\BootstrapFramework;
+use CoreFramework\Bootstrap\FrameworkBootstrap;
 use CoreFramework\EntryPoint\ApplicationEntryPoint;
 
 /**
@@ -33,7 +33,7 @@ use CoreFramework\EntryPoint\ApplicationEntryPoint;
 $cfg = FrameworkConfiguration::getSelfInstance();
 
 // CFG: ROOT-BASE-PATH
-$cfg->setConfigEntry('root_base_path', BootstrapFramework::detectRootPath() . '/');
+$cfg->setConfigEntry('root_base_path', ApplicationEntryPoint::getRootPath() . '/');
 
 // CFG: CORE-BASE-PATH
 $cfg->setConfigEntry('framework_base_path', ApplicationEntryPoint::detectFrameworkPath());
@@ -82,7 +82,7 @@ $cfg->setConfigEntry('language_base_path', 'language/');
 $cfg->setConfigEntry('compressor_base_path', 'main/classes/compressor/');
 
 // CFG: APPLICATION-BASE-PATH
-$cfg->setConfigEntry('application_base_path', FrameworkBootstrap::detectApplicationBasePath());
+$cfg->setConfigEntry('application_base_path', $cfg->getConfigEntry('root_base_path') . 'application/');
 
 // CFG: COMPILE-OUTPUT-PATH
 $cfg->setConfigEntry('compile_output_path', 'templates/_compiled/');
index 2a13ed54263d5085c94bbfde1e67c932b4c84121..fe39b3b0598b1daebe12ccabd809e862a523903f 100644 (file)
@@ -44,7 +44,7 @@ $fqfn = sprintf(
 // Load the database layer include
 if (BaseFrameworkSystem::isReadableFile($fqfn)) {
        // Load the layer
-       require($fqfn);
+       require $fqfn;
 } else {
        // Layer is missing!
        ApplicationEntryPoint::app_exit(sprintf('[Main:] Database layer is missing! (%s) -&gt; R.I.P.',
index 3764ca733f1e8646da0c41363f0baa2efb2f1996..ceaab36d3f475e30fcdf8ca146092ddf64e315ae 100644 (file)
@@ -29,7 +29,7 @@ use CoreFramework\Loader\ClassLoader;
  */
 
 // Include the class loader function
-require(FrameworkConfiguration::getSelfInstance()->getConfigEntry('framework_base_path') . '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?
index bc37b2ad05579cc79c992a33d66c0d9219c1fd2d..939d3559db61dc439ffdd572eb669278849ee228 100644 (file)
@@ -519,7 +519,7 @@ class ClassLoader {
                // Does the class cache exist?
                if (BaseFrameworkSystem::isReadableFile($this->listCacheFQFN)) {
                        // Then include it
-                       require($this->classCacheFQFN);
+                       require $this->classCacheFQFN;
 
                        // Mark the class cache as loaded
                        $this->classesCached = TRUE;
@@ -559,7 +559,7 @@ class ClassLoader {
                if ((isset($this->foundClasses[$fileName])) && (!isset($this->loadedClasses[$this->foundClasses[$fileName]]))) {
                        // File is found and not loaded so load it only once
                        //* NOISY-DEBUG: */ printf('[%s:%d] LOAD: %s - START' . PHP_EOL, __METHOD__, __LINE__, $fileName);
-                       require($this->foundClasses[$fileName]);
+                       require $this->foundClasses[$fileName];
                        //* NOISY-DEBUG: */ printf('[%s:%d] LOAD: %s - END' . PHP_EOL, __METHOD__, __LINE__, $fileName);
 
                        // Count this loaded class/interface/exception
@@ -596,7 +596,7 @@ class ClassLoader {
                        if (substr($fileName, 0, strlen($this->prefix)) == $this->prefix) {
                                // Then include it
                                //* NOISY-DEBUG: */ printf('[%s:%d] LOAD: %s - START' . PHP_EOL, __METHOD__, __LINE__, $fileName);
-                               require($fqfn);
+                               require $fqfn;
                                //* NOISY-DEBUG: */ printf('[%s:%d] LOAD: %s - END' . PHP_EOL, __METHOD__, __LINE__, $fileName);
 
                                // Remove it from the list
index abedae92ea5b47fcb32fe52dcd23a6823409f3df..7f88c168d1cb7bba483ede648b236d2a4f0fd461 100644 (file)
@@ -65,7 +65,7 @@ foreach ($configAppIncludes as $appInc) {
        if (BaseFrameworkSystem::isReadableFile($appFqFn)) {
                // Load it
                //* DEBUG: */ print basename(__FILE__)."[".__LINE__."]: Loading ".basename($appFqFn)." - START\n";
-               require($appFqFn);
+               require $appFqFn;
                //* DEBUG: */ print basename(__FILE__)."[".__LINE__."]: Loading ".basename($appFqFn)." - END\n";
        } elseif (FrameworkConfiguration::getSelfInstance()->getConfigEntry('verbose_level') > 0) {
                // File is missing
index ecf66b48876f5635b4848a966b756595673f1fec..c0671792f6534f571bac0bfcdd99cb5e8c8f028b 100644 (file)
--- a/index.php
+++ b/index.php
@@ -3,6 +3,7 @@
 namespace CoreFramework\EntryPoint;
 
 // Import framework stuff
+use CoreFramework\Bootstrap\FrameworkBootstrap;
 use CoreFramework\Configuration\FrameworkConfiguration;
 use CoreFramework\Factory\ObjectFactory;
 use CoreFramework\Helper\Application\ApplicationHelper;
@@ -82,7 +83,7 @@ final class ApplicationEntryPoint {
                } // END - if
 
                // Get some instances
-               $tpl = FrameworkConfiguration::getSelfInstance()->getConfigEntry('html_template_class');
+               $tpl = $configInstance->getConfigEntry('html_template_class');
                $languageInstance = LanguageSystem::getSelfInstance();
 
                // Initialize template instance here to avoid warnings in IDE
@@ -98,7 +99,7 @@ final class ApplicationEntryPoint {
                                // Get the template instance from our object factory
                                $templateInstance = ObjectFactory::createObjectByName($tpl);
                        } catch (FrameworkException $e) {
-                               exit(sprintf("[Main:] Could not initialize template engine for reason: <span class=\"exception_reason\">%s</span>",
+                               exit(sprintf('[Main:] Could not initialize template engine for reason: <span class="exception_reason">%s</span>',
                                        $e->getMessage()
                                ));
                        }
@@ -119,7 +120,7 @@ final class ApplicationEntryPoint {
                                } // END - if
 
                                // Add the traceback path to the final output
-                               $backtrace .= sprintf("<span class=\"backtrace_file\">%s</span>:%d, <span class=\"backtrace_function\">%s(%d)</span><br />\n",
+                               $backtrace .= sprintf('<span class="backtrace_file">%s</span>:%d, <span class="backtrace_function">%s(%d)</span><br />' . PHP_EOL,
                                        basename($trace['file']),
                                        $trace['line'],
                                        $trace['function'],
@@ -214,7 +215,7 @@ final class ApplicationEntryPoint {
                                );
 
                                // 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)) {
@@ -237,6 +238,16 @@ final class ApplicationEntryPoint {
                return self::$frameworkPath;
        }
 
+       /**
+        * Getter for root path
+        *
+        * @return      $rootPath       Root path
+        */
+       public static function getRootPath () {
+               // Get __DIR__, really simple and no detection
+               return __DIR__;
+       }
+
        /**
         * The framework's main entry point. This class isolates some local
         * variables which shall not become visible to outside because of security
@@ -247,10 +258,13 @@ final class ApplicationEntryPoint {
         */
        public static final function main () {
                // Load bootstrap file
-               require(self::detectFrameworkPath() . 'bootstrap/bootstrap.inc.php');
+               require self::detectFrameworkPath() . 'bootstrap/bootstrap.inc.php';
 
-               // Get a new configuration instance
-               $cfg = FrameworkConfiguration::getSelfInstance();
+               /*
+                * Initial bootstrap is done, continue with checking parameters and
+                * look for 'app'.
+                */
+               FrameworkBootstrap::checkParameters();
        }
 }
 
index 968452a51bfd8b2a9268834fbb357d1d1c7e343b..127c7a29b8f52c2d3835d8f903091e1f24858990 100644 (file)
@@ -5,13 +5,13 @@ print (basename(__FILE__).": Init...\n");
 @chdir("..");
 
 // Load config file
-require(dirname(dirname(__FILE__)) . '/framework/config.php');
+require dirname(dirname(__FILE__)) . '/framework/config.php';
 
 // Load all include files
-require($cfg->getConfigEntry('framework_base_path') . 'includes.php');
+require $cfg->getConfigEntry('framework_base_path') . 'includes.php';
 
 // Load all game classes
-require($cfg->getConfigEntry('framework_base_path') . 'classes.php');
+require $cfg->getConfigEntry('framework_base_path') . 'classes.php';
 
 // Set default application
 FrameworkConfiguration::getInstance()->setConfigEntry('default_application', 'shipsimu');
@@ -20,7 +20,7 @@ FrameworkConfiguration::getInstance()->setConfigEntry('default_application', 'sh
 define('TEST_MODE', true);
 
 // Load the PHPUnit framework
-require('PHPUnit/Framework.php');
+require 'PHPUnit/Framework.php';
 
 print (basename(__FILE__).": Init completed.\n\n");
 
index 846ec55c428f3844f6cebf20f9ab006e2ebb903a..89b18a3f815c48ce5fb3116caa1769dab6207ed6 100644 (file)
@@ -5,13 +5,13 @@ print (basename(__FILE__).": Init...\n");
 @chdir("..");
 
 // Load config file
-require(dirname(dirname(__FILE__)) . '/framework/config.php');
+require dirname(dirname(__FILE__)) . '/framework/config.php';
 
 // Load all include files
-require($cfg->getConfigEntry('framework_base_path') . 'includes.php');
+require $cfg->getConfigEntry('framework_base_path') . 'includes.php';
 
 // Load all game classes
-require($cfg->getConfigEntry('framework_base_path') . 'classes.php');
+require $cfg->getConfigEntry('framework_base_path') . 'classes.php';
 
 // Set default application
 FrameworkConfiguration::getInstance()->setConfigEntry('default_application', 'shipsimu');
@@ -20,7 +20,7 @@ FrameworkConfiguration::getInstance()->setConfigEntry('default_application', 'sh
 define('TEST_MODE', true);
 
 // Load the PHPUnit framework
-require('PHPUnit/Framework.php');
+require 'PHPUnit/Framework.php';
 
 print (basename(__FILE__).": Init completed.\n\n");
 
index 80d78e47505fbe06da3e568f33f2afe8196caf3d..81a9da8a69a64a76e9eb01510876ec1ea92c8d01 100644 (file)
@@ -5,13 +5,13 @@ print (basename(__FILE__).": Init...\n");
 @chdir("..");
 
 // Load config file
-require(dirname(dirname(__FILE__)) . '/framework/config.php');
+require dirname(dirname(__FILE__)) . '/framework/config.php';
 
 // Load all include files
-require($cfg->getConfigEntry('framework_base_path') . 'includes.php');
+require $cfg->getConfigEntry('framework_base_path') . 'includes.php';
 
 // Load all game classes
-require($cfg->getConfigEntry('framework_base_path') . 'classes.php');
+require $cfg->getConfigEntry('framework_base_path') . 'classes.php';
 
 // Set default application
 FrameworkConfiguration::getInstance()->setConfigEntry('default_application', 'shipsimu');
@@ -20,7 +20,7 @@ FrameworkConfiguration::getInstance()->setConfigEntry('default_application', 'sh
 define('TEST_MODE', true);
 
 // Load the PHPUnit framework
-require('PHPUnit/Framework.php');
+require 'PHPUnit/Framework.php';
 
 print (basename(__FILE__).": Init completed.\n\n");
 
index 2e8e65654ce597dcc5dcba0ecf10d6584205f5ad..6783f7f709462eb5c47e2211021bbe5787d7caef 100644 (file)
@@ -5,13 +5,13 @@ print (basename(__FILE__).": Init...\n");
 @chdir("..");
 
 // Load config file
-require(dirname(dirname(__FILE__)) . '/framework/config.php');
+require dirname(dirname(__FILE__)) . '/framework/config.php';
 
 // Load all include files
-require($cfg->getConfigEntry('framework_base_path') . 'includes.php');
+require $cfg->getConfigEntry('framework_base_path') . 'includes.php';
 
 // Load all game classes
-require($cfg->getConfigEntry('framework_base_path') . 'classes.php');
+require $cfg->getConfigEntry('framework_base_path') . 'classes.php';
 
 // Set default application
 FrameworkConfiguration::getInstance()->setConfigEntry('default_application', 'shipsimu');
@@ -20,7 +20,7 @@ FrameworkConfiguration::getInstance()->setConfigEntry('default_application', 'sh
 define('TEST_MODE', true);
 
 // Load the PHPUnit framework
-require('PHPUnit/Framework.php');
+require 'PHPUnit/Framework.php';
 
 print (basename(__FILE__).": Init completed.\n\n");
 die("You need to remove this line (".__LINE__.") and implement this test!\n");
index b4de26a74f16a4c4b23cd2f727b24b358173c031..5ddac0471b69723e0b4f3ed4d5876e9b69d98d66 100644 (file)
@@ -6,26 +6,26 @@
 define('TEST_MODE', true);
 
 // Load config file
-require(dirname(dirname(dirname(__FILE__))) . '/framework/config.php');
+require dirname(dirname(dirname(__FILE__))) . '/framework/config.php';
 
 // Load all include files
-require($cfg->getConfigEntry('framework_base_path') . 'includes.php');
+require $cfg->getConfigEntry('framework_base_path') . 'includes.php';
 
 // Load all game classes
-require($cfg->getConfigEntry('framework_base_path') . 'classes.php');
+require $cfg->getConfigEntry('framework_base_path') . 'classes.php';
 
 // Load file I/O handler
-require($cfg->getConfigEntry('framework_base_path') . 'file_io.php');
+require $cfg->getConfigEntry('framework_base_path') . 'file_io.php';
 
 // Load database layer
-require($cfg->getConfigEntry('framework_base_path') . 'database.php');
+require $cfg->getConfigEntry('framework_base_path') . 'database.php';
 
 // Set default application
 FrameworkConfiguration::getInstance()->setConfigEntry('default_application', 'shipsimu');
 $application = 'shipsimu';
 
 // Load more includes
-require($cfg->getConfigEntry('root_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
index ef18401a48b518e88066ff9d8125d8b2534e4dea..ae0fc99c100c8772040875ca66a184fb5056792b 100644 (file)
@@ -6,26 +6,26 @@
 define('TEST_MODE', true);
 
 // Load config file
-require(dirname(dirname(dirname(__FILE__))) . '/framework/config.php');
+require dirname(dirname(dirname(__FILE__))) . '/framework/config.php';
 
 // Load all include files
-require($cfg->getConfigEntry('framework_base_path') . 'includes.php');
+require $cfg->getConfigEntry('framework_base_path') . 'includes.php';
 
 // Load all game classes
-require($cfg->getConfigEntry('framework_base_path') . 'classes.php');
+require $cfg->getConfigEntry('framework_base_path') . 'classes.php';
 
 // Load file I/O handler
-require($cfg->getConfigEntry('framework_base_path') . 'file_io.php');
+require $cfg->getConfigEntry('framework_base_path') . 'file_io.php';
 
 // Load database layer
-require($cfg->getConfigEntry('framework_base_path') . 'database.php');
+require $cfg->getConfigEntry('framework_base_path') . 'database.php';
 
 // Set default application
 FrameworkConfiguration::getInstance()->setConfigEntry('default_application', 'shipsimu');
 $application = 'shipsimu';
 
 // Load more includes
-require($cfg->getConfigEntry('root_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
index df2ef254b1777e3da8c27dcc288ed2ab89e89354..cd1f48cd461a8d47910355c4d9513e6366ce9cf6 100644 (file)
@@ -6,26 +6,26 @@
 define('TEST_MODE', true);
 
 // Load config file
-require(dirname(dirname(dirname(__FILE__))) . '/framework/config.php');
+require dirname(dirname(dirname(__FILE__))) . '/framework/config.php';
 
 // Load all include files
-require($cfg->getConfigEntry('framework_base_path') . 'includes.php');
+require $cfg->getConfigEntry('framework_base_path') . 'includes.php';
 
 // Load all game classes
-require($cfg->getConfigEntry('framework_base_path') . 'classes.php');
+require $cfg->getConfigEntry('framework_base_path') . 'classes.php';
 
 // Load file I/O handler
-require($cfg->getConfigEntry('framework_base_path') . 'file_io.php');
+require $cfg->getConfigEntry('framework_base_path') . 'file_io.php';
 
 // Load database layer
-require($cfg->getConfigEntry('framework_base_path') . 'database.php');
+require $cfg->getConfigEntry('framework_base_path') . 'database.php';
 
 // Set default application
 FrameworkConfiguration::getInstance()->setConfigEntry('default_application', 'shipsimu');
 $application = 'shipsimu';
 
 // Load more includes
-require($cfg->getConfigEntry('root_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