]> git.mxchange.org Git - core.git/commitdiff
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 ce3da75f5beba34ec3c6b20ab881c7ef2183e2ad..08abad5bc42e970ae7afe46733ad735c87f23a15 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 fab4e559a640c56363f79845b2d64fffaa42ce80..330cdaa0198d9d4683e959b77c133201295a459b 100644 (file)
@@ -484,6 +484,31 @@ class ClassLoader {
                } // END - while
        }
 
+       /**
+        * 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
         *
@@ -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 8ba9d8ce98f6d6f63ac33562fe388a494f09e541..be1c07d883b880dc05a19036d3b454af3c5bfc78 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 0ec24318b0a15c0b66f1ccf27f1d00a1763cfa7f..20c4c78786bdddca625d582fa5395be18cf31320 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 2f44c5e00322e4735d96e53ada41eba667c9bb53..b842ffee9b68edccc751c5126d2b19960ba20692 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 d4b105c38f7d22622a8ffbaf5043a837df920b6d..60c242db0e752b72cd0081625c964a2d4f03fb64 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 cebc325fe8c86e0b900053b4947f38c7c20ef993..752bb37524769de4fafff41517d982da0d050b80 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 f02c06f347679e53450a3a21afb3a627242bb7b5..de9ef5d77ed1f4e21276c6b5639e88eac9d2c916 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 49aeae05d2859e71df645441ab902380e8de0eaf..a279677df884228314d24d32ac95df52715bd57a 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 80c81f67491284be7d4cff10a672597ef3c886a9..5ff90ba5ca92a5320794b5a5c5ab73bb2a6cecdb 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 5545289cb2a1839929827a5eaead7f01942e5a7e..89cb207a6988dc7a5cad1d1bd03e7f81c1e278ec 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 cc150424ca0479ec0f1310928374060ad2950547..a5312b493f970acf50f1faaafcfd76ab6eccb39c 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 42515863613f0202cdca2fce0dce3d318f8c6ad5..8715a749b5147112e3f08ed61e879ea850ca8e85 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 f880985c7aca5666f80f9fb812c6e1906a9d47cd..819ebc65cb4ef88cbe5a787e6495a69f9cc08c54 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 350151943e97307a1877e024236bc4976c3fab69..82936d0ee6f8fb2ef9d2bdf04ae5f77c3c9f4432 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();
-       }
-
 }