Continued:
authorRoland Häder <roland@mxchange.org>
Sat, 20 Jan 2018 17:49:03 +0000 (18:49 +0100)
committerRoland Häder <roland@mxchange.org>
Sat, 20 Jan 2018 17:49:03 +0000 (18:49 +0100)
- created more namespaces
- "imported" more classes/interfaces
- need to require_once, some strange (?) double-load may happen when phpunit is
  running
- sorted members a bit

Signed-off-by: Roland Häder <roland@mxchange.org>
15 files changed:
framework/bootstrap/class_FrameworkBootstrap.php
framework/loader/class_ClassLoader.php
framework/main/classes/class_BaseFrameworkSystem.php
framework/main/classes/client/http/class_HttpClient.php
framework/main/classes/database/migration/class_BaseDatabaseMigration.php
framework/main/classes/database/migration/format_upgrade/class_BaseFormatUpgrade.php
framework/main/classes/database/migration/format_upgrade/lfdb/class_LocalFileDatabaseFormatVersion01To02Upgrade.php
framework/main/classes/factories/client/class_ClientFactory.php
framework/main/classes/registry/format_upgrade/database/class_LocalFileDatabaseFormatUpgradeRegistry.php
framework/main/classes/resolver/controller/class_BaseControllerResolver.php
framework/main/interfaces/captcha/class_SolveableCaptcha.php
framework/main/interfaces/database/migration/class_MigrateableDatabase.php
framework/main/interfaces/database/migration/format_upgrade/class_UpgradeableDatabaseFormat.php
framework/main/interfaces/registry/format_upgrade/class_RegisterableFormatUpgrade.php
framework/main/middleware/io/class_FileIoHandler.php

index ce3da75..08abad5 100644 (file)
@@ -235,7 +235,7 @@ final class FrameworkBootstrap {
                } // END - if
 
                // Load it
-               require $fileInstance->getPathname();
+               require_once $fileInstance->getPathname();
 
                // Trace message
                //* NOISY-DEBUG: */ printf('[%s:%d]: EXIT!' . PHP_EOL, __METHOD__, __LINE__);
@@ -381,7 +381,7 @@ final class FrameworkBootstrap {
                // Now call all methods in one go
                foreach (array('setupApplicationData', 'initApplication', 'launchApplication') as $methodName) {
                        // Debug message
-                       //* NOISY-DEBUG: */ printf('[%s:%d]: Calling methodName=%s ...' . PHP_EOL, __METHOD__, __LINE__, $methodName);
+                       //*NOISY-DEBUG: */ printf('[%s:%d]: Calling methodName=%s ...' . PHP_EOL, __METHOD__, __LINE__, $methodName);
 
                        // Call method
                        call_user_func(array($applicationInstance, $methodName));
index fab4e55..330cdaa 100644 (file)
@@ -485,6 +485,31 @@ class ClassLoader {
        }
 
        /**
+        * Getter for total include counter
+        *
+        * @return      $total  Total loaded include files
+        */
+       public final function getTotal () {
+               return $this->total;
+       }
+
+       /**
+        * Getter for a printable list of included main/interfaces/exceptions
+        *
+        * @param       $includeList    A printable include list
+        */
+       public function getPrintableIncludeList () {
+               // Prepare the list
+               $includeList = '';
+               foreach ($this->loadedClasses as $classFile) {
+                       $includeList .= basename($classFile) . '<br />' . PHP_EOL;
+               } // END - foreach
+
+               // And return it
+               return $includeList;
+       }
+
+       /**
         * Initializes our loader class
         *
         * @param       $configInstance Configuration class instance
@@ -589,29 +614,4 @@ class ClassLoader {
                }
        }
 
-       /**
-        * Getter for total include counter
-        *
-        * @return      $total  Total loaded include files
-        */
-       public final function getTotal () {
-               return $this->total;
-       }
-
-       /**
-        * Getter for a printable list of included main/interfaces/exceptions
-        *
-        * @param       $includeList    A printable include list
-        */
-       public function getPrintableIncludeList () {
-               // Prepare the list
-               $includeList = '';
-               foreach ($this->loadedClasses as $classFile) {
-                       $includeList .= basename($classFile) . '<br />' . PHP_EOL;
-               } // END - foreach
-
-               // And return it
-               return $includeList;
-       }
-
 }
index 8ba9d8c..be1c07d 100644 (file)
@@ -1775,7 +1775,7 @@ Loaded includes:
         */
        public final static function createDebugInstance ($className, $lineNumber = NULL) {
                // Is the instance set?
-               if (!Registry::getRegistry()->instanceExists('debug')) {
+               if (!GenericRegistry::getRegistry()->instanceExists('debug')) {
                        // Init debug instance
                        $debugInstance = NULL;
 
index 0ec2431..20c4c78 100644 (file)
@@ -1,4 +1,11 @@
 <?php
+// Own namespace
+namespace Org\Mxchange\CoreFramework\Client\Http;
+
+// Import framework stuff
+use Org\Mxchange\CoreFramework\Client\BaseClient;
+use Org\Mxchange\CoreFramework\Client\Client;
+
 /**
  * A HTTP client class
  *
index 2f44c5e..b842ffe 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Org\Mxchange\CoreFramework\Migration\Database;
+
+// Import framework stuff
+use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
+
 /**
  * A general database migration class
  *
index d4b105c..60c242d 100644 (file)
@@ -1,4 +1,11 @@
 <?php
+// Own namespace
+namespace Org\Mxchange\CoreFramework\Upgrade\Format;
+
+// Import framework stuff
+use Org\Mxchange\CoreFramework\Migration\Database\BaseDatabaseMigration;
+use Org\Mxchange\CoreFramework\Migration\Database\MigrateableDatabase;
+
 /**
  * A general format upgrade class
  *
index cebc325..752bb37 100644 (file)
@@ -1,4 +1,11 @@
 <?php
+// Own namespace
+namespace Org\Mxchange\CoreFramework\Upgrade\Format\Database\Lfdb;
+
+// Import framework stuff
+use Org\Mxchange\CoreFramework\Upgrade\Format\BaseFormatUpgrade;
+use Org\Mxchange\CoreFramework\Upgrade\Format\Database\UpgradeableDatabaseFormat;
+
 /**
  * A format-upgrade class for LocalFileDatabase format version 01 to 02
  *
index f02c06f..de9ef5d 100644 (file)
@@ -2,6 +2,9 @@
 // Own namespace
 namespace Org\Mxchange\CoreFramework\Factory\Client;
 
+// Import framework stuff
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+
 /**
  * An object factory for clients
  *
index 49aeae0..a279677 100644 (file)
@@ -1,6 +1,12 @@
 <?php
 // Own namespace
 namespace Org\Mxchange\CoreFramework\Registry\Upgrade\Format\Lfdb;
+
+// Import framework stuff
+use Org\Mxchange\CoreFramework\Registry\BaseRegistry;
+use Org\Mxchange\CoreFramework\Upgrade\Format\Database\UpgradeableDatabaseFormat;
+use Org\Mxchange\CoreFramework\Upgrade\Format\RegisterableFormatUpgrade;
+
 /**
  * A LocalFileDatabase database-format-upgrade registry
  *
@@ -55,7 +61,16 @@ class LocalFileDatabaseFormatUpgradeRegistry extends BaseRegistry implements Reg
                // Return the instance
                return self::$registryInstance;
        }
-}
 
-// [EOF]
-?>
+       /**
+        * Registers given format-upgrade class with this registry
+        *
+        * @param       $upgradeInstance        An instance of a UpgradeableDatabaseFormat class
+        * @return      void
+        * @todo        0% done
+        */
+       public function registerFormatUpgrader (UpgradeableDatabaseFormat $upgradeInstance) {
+               $this->partialStub();
+       }
+
+}
index 80c81f6..5ff90ba 100644 (file)
@@ -113,7 +113,7 @@ abstract class BaseControllerResolver extends BaseResolver {
                        $resolverConfigEntry,
                        array(
                                $controllerName,
-                               Registry::getRegistry()->getInstance('application')
+                               GenericRegistry::getRegistry()->getInstance('application')
                        )
                );
                $controllerInstance = ObjectFactory::createObjectByName(
index 5545289..89cb207 100644 (file)
@@ -3,7 +3,6 @@
 namespace Org\Mxchange\CoreFramework\Helper\Captcha;
 
 // Import framework stuff
-use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
 use Org\Mxchange\CoreFramework\Helper\Helper;
 
 /**
index cc15042..a5312b4 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Org\Mxchange\CoreFramework\Migration\Database;
+
+// Import framework stuff
+use Org\Mxchange\CoreFramework\Database\FrameworkDatabase;
+
 /**
  * A database migration interface
  *
index 4251586..8715a74 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Org\Mxchange\CoreFramework\Upgrade\Format\Database;
+
+// Import framework stuff
+use Org\Mxchange\CoreFramework\Migration\Database\MigrateableDatabase;
+
 /**
  * An interface for database format upgrade classes
  *
index f880985..819ebc6 100644 (file)
@@ -2,6 +2,10 @@
 // Own namespace
 namespace Org\Mxchange\CoreFramework\Upgrade\Format;
 
+// Import framework stuff
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
+use Org\Mxchange\CoreFramework\Upgrade\Format\Database\UpgradeableDatabaseFormat;
+
 /**
  * An interface for format-upgrade registries
  *
index 3501519..82936d0 100644 (file)
@@ -222,24 +222,4 @@ class FileIoHandler extends BaseMiddleware implements IoHandler {
                $this->partialStub();
        }
 
-       /**
-        * Seek to given offset (default) or other possibilities as fseek() gives.
-        *
-        * @param       $offset         Offset to seek to (or used as "base" for other seeks)
-        * @param       $whence         Added to offset (default: only use offset to seek to)
-        * @return      $status         Status of file seek: 0 = success, -1 = failed
-        */
-       public function seek ($offset, $whence = SEEK_SET) {
-               $this->partialStub('offset=' . $offset . ',whence=' . $whence);
-       }
-
-       /**
-        * Size of file stack
-        *
-        * @return      $size   Size (in bytes) of file
-        */
-       public function size () {
-               $this->partialStub();
-       }
-
 }