From: Roland Häder Date: Sat, 20 Jan 2018 17:49:03 +0000 (+0100) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=bed81d8edc3673951a1ee57f38f5a1a07c417b69;p=core.git Continued: - 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 --- diff --git a/framework/bootstrap/class_FrameworkBootstrap.php b/framework/bootstrap/class_FrameworkBootstrap.php index ce3da75f..08abad5b 100644 --- a/framework/bootstrap/class_FrameworkBootstrap.php +++ b/framework/bootstrap/class_FrameworkBootstrap.php @@ -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)); diff --git a/framework/loader/class_ClassLoader.php b/framework/loader/class_ClassLoader.php index fab4e559..330cdaa0 100644 --- a/framework/loader/class_ClassLoader.php +++ b/framework/loader/class_ClassLoader.php @@ -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) . '
' . 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) . '
' . PHP_EOL; - } // END - foreach - - // And return it - return $includeList; - } - } diff --git a/framework/main/classes/class_BaseFrameworkSystem.php b/framework/main/classes/class_BaseFrameworkSystem.php index 8ba9d8ce..be1c07d8 100644 --- a/framework/main/classes/class_BaseFrameworkSystem.php +++ b/framework/main/classes/class_BaseFrameworkSystem.php @@ -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; diff --git a/framework/main/classes/client/http/class_HttpClient.php b/framework/main/classes/client/http/class_HttpClient.php index 0ec24318..20c4c787 100644 --- a/framework/main/classes/client/http/class_HttpClient.php +++ b/framework/main/classes/client/http/class_HttpClient.php @@ -1,4 +1,11 @@ + /** + * 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(); + } + +} diff --git a/framework/main/classes/resolver/controller/class_BaseControllerResolver.php b/framework/main/classes/resolver/controller/class_BaseControllerResolver.php index 80c81f67..5ff90ba5 100644 --- a/framework/main/classes/resolver/controller/class_BaseControllerResolver.php +++ b/framework/main/classes/resolver/controller/class_BaseControllerResolver.php @@ -113,7 +113,7 @@ abstract class BaseControllerResolver extends BaseResolver { $resolverConfigEntry, array( $controllerName, - Registry::getRegistry()->getInstance('application') + GenericRegistry::getRegistry()->getInstance('application') ) ); $controllerInstance = ObjectFactory::createObjectByName( diff --git a/framework/main/interfaces/captcha/class_SolveableCaptcha.php b/framework/main/interfaces/captcha/class_SolveableCaptcha.php index 5545289c..89cb207a 100644 --- a/framework/main/interfaces/captcha/class_SolveableCaptcha.php +++ b/framework/main/interfaces/captcha/class_SolveableCaptcha.php @@ -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; /** diff --git a/framework/main/interfaces/database/migration/class_MigrateableDatabase.php b/framework/main/interfaces/database/migration/class_MigrateableDatabase.php index cc150424..a5312b49 100644 --- a/framework/main/interfaces/database/migration/class_MigrateableDatabase.php +++ b/framework/main/interfaces/database/migration/class_MigrateableDatabase.php @@ -1,4 +1,10 @@ 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(); - } - }