]> git.mxchange.org Git - hub.git/commitdiff
Next wave:
authorRoland Häder <roland@mxchange.org>
Thu, 18 May 2017 21:29:20 +0000 (23:29 +0200)
committerRoland Häder <roland@mxchange.org>
Fri, 21 Aug 2020 16:49:57 +0000 (18:49 +0200)
- imported (Base)ControllerResolver
- imported ManageableApplication
- created new namespaces
- fixed namespaces, is application-specific

Signed-off-by: Roland Häder <roland@mxchange.org>
application/hub/class_ApplicationHelper.php
application/hub/classes/resolver/command/console/class_HubConsoleCommandResolver.php
application/hub/classes/resolver/command/html/class_HubHtmlCommandResolver.php
application/hub/classes/resolver/controller/console/class_HubConsoleControllerResolver.php
application/hub/classes/resolver/controller/html/class_HubHtmlControllerResolver.php

index 1ef110253da8cab1b6e739d7bbc97174a1e48b24..56c00813595e43c91035d99ce8ff20fcba8e8016 100644 (file)
@@ -230,7 +230,7 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica
 
                // Get a controller resolver
                $resolverClass = sprintf(
-                       'CoreFramework\Tests\Resolver\Controller\%s',
+                       'Hub\Resolver\Controller\%s',
                        self::convertToClassName(sprintf(
                                '%s_%s_controller_resolver',
                                $this->getAppShortName(),
index 2343d40c4779ced543572e31d22a2bfad48692e7..5a4baacd4312b441850fd53f936af97d480c6427 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\Resolver\Command;
+
+// Import Framework stuff
+use CoreFramework\Manager\ManageableApplication;
+
 /**
  * A command resolver for local (non-hubbed) web commands
  *
index 95841f39591042c2ce09f411d1aa63d24409b863..cb8f662a00a3a75bbddfd5d1a5ea3cc39920c6cd 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\Resolver\Command;
+
+// Import Framework stuff
+use CoreFramework\Manager\ManageableApplication;
+
 /**
  * A command resolver for HTML commands
  *
index 2a73ee25505c894f3dcc17e780f81a4d375d5586..3cb417f2384816fcfd46cd194ab2cdf328d3fb83 100644 (file)
@@ -1,4 +1,12 @@
 <?php
+// Own namespace
+namespace Hub\Resolver\Controller;
+
+// Import framework stuff
+use CoreFramework\Manager\ManageableApplication;
+use CoreFramework\Resolver\Controller\BaseControllerResolver;
+use CoreFramework\Resolver\Controller\ControllerResolver;
+
 /**
  * A resolver for resolving controllers locally
  *
@@ -52,7 +60,7 @@ class HubConsoleControllerResolver extends BaseControllerResolver implements Con
                if (empty($controllerName)) {
                        // Then thrown an exception here
                        throw new EmptyVariableException(array($resolverInstance, 'commandName'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING);
-               } elseif ($resolverInstance->isControllerValid($controllerName) === FALSE) {
+               } elseif ($resolverInstance->isControllerValid('Hub\Controller', $controllerName) === false)  {
                        // Invalid command found
                        throw new InvalidControllerException(array($resolverInstance, $controllerName), self::EXCEPTION_INVALID_CONTROLLER);
                }
index 1376a827e503adbb67438bae5726c8a74864af43..cc54da23a8e7a7fc600510fbeaad272c90ba4d41 100644 (file)
@@ -1,4 +1,12 @@
 <?php
+// Own namespace
+namespace Hub\Resolver\Controller;
+
+// Import framework stuff
+use CoreFramework\Manager\ManageableApplication;
+use CoreFramework\Resolver\Controller\BaseControllerResolver;
+use CoreFramework\Resolver\Controller\ControllerResolver;
+
 /**
  * A resolver for resolving controllers locally
  *
@@ -52,7 +60,7 @@ class HubHtmlControllerResolver extends BaseControllerResolver implements Contro
                if (empty($controllerName)) {
                        // Then thrown an exception here
                        throw new EmptyVariableException(array($resolverInstance, 'commandName'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING);
-               } elseif ($resolverInstance->isControllerValid($controllerName) === FALSE) {
+               } elseif ($resolverInstance->isControllerValid('Hub\Controller', $controllerName) === false)  {
                        // Invalid command found
                        throw new InvalidControllerException(array($resolverInstance, $controllerName), self::EXCEPTION_INVALID_CONTROLLER);
                }