]> git.mxchange.org Git - hub.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Sat, 7 Nov 2020 14:50:08 +0000 (15:50 +0100)
committerRoland Häder <roland@mxchange.org>
Sat, 7 Nov 2020 14:50:08 +0000 (15:50 +0100)
- convertToClassName() is now in StringUtils
- updated core framework

Signed-off-by: Roland Häder <roland@mxchange.org>
application/hub/class_ApplicationHelper.php
application/hub/classes/container/socket/class_SocketContainer.php
application/hub/classes/factories/node/class_NodeObjectFactory.php
application/hub/classes/package/assembler/class_PackageAssembler.php
application/hub/classes/resolver/state/class_BaseStateResolver.php
application/hub/classes/template/class_BaseXmlTemplateEngine.php
core

index 3da31cd29762d83debda9b46a416ba0ef9472189..0a430c832a323390ee54bdad673c0fac3b9c87b4 100644 (file)
@@ -13,6 +13,7 @@ use Org\Mxchange\CoreFramework\Loader\ClassLoader;
 use Org\Mxchange\CoreFramework\Manager\ManageableApplication;
 use Org\Mxchange\CoreFramework\Registry\Registerable;
 use Org\Mxchange\CoreFramework\Template\CompileableTemplate;
+use Org\Mxchange\CoreFramework\Utils\String\StringUtils;
 
 /**
  * A class holding general data about the application and some methods for
@@ -150,7 +151,7 @@ class ApplicationHelper extends BaseApplication implements ManageableApplication
                // Get a controller resolver
                $resolverClass = sprintf(
                        'Org\Shipsimu\Hub\Resolver\Controller\%s',
-                       self::convertToClassName(sprintf(
+                       StringUtils::convertToClassName(sprintf(
                                '%s_%s_controller_resolver',
                                $this->getAppShortName(),
                                FrameworkBootstrap::getRequestTypeFromSystem()
index db96217db3e10dfa3e5d8a66fa2e4a0be8c84eca..f3f403b031929ba5a2228bfac266399a0ea92feb 100644 (file)
@@ -25,6 +25,7 @@ use Org\Mxchange\CoreFramework\Socket\SocketBindingException;
 use Org\Mxchange\CoreFramework\Socket\SocketConnectionException;
 use Org\Mxchange\CoreFramework\Socket\SocketOperationException;
 use Org\Mxchange\CoreFramework\Socket\UnsupportedSocketErrorHandlerException;
+use Org\Mxchange\CoreFramework\Utils\String\StringUtils;
 use Org\Mxchange\CoreFramework\Visitor\Visitable;
 use Org\Mxchange\CoreFramework\Visitor\Visitor;
 
@@ -1057,7 +1058,7 @@ class SocketContainer extends BaseHubContainer implements StorableSocket, Visita
        protected function getSocketErrorHandlerFromCode (int $errorCode) {
                // Create a name from translated error code
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-SOCKET: errorCode=%d - CALLED!', strtoupper($this->getSocketProtocol()), $errorCode));
-               $handlerName = 'handleSocketError' . self::convertToClassName($this->translateSocketErrorCodeToName($errorCode));
+               $handlerName = 'handleSocketError' . StringUtils::convertToClassName($this->translateSocketErrorCodeToName($errorCode));
 
                // Is the call-back method there?
                if (!method_exists($this, $handlerName)) {
index 0118b1f993bbce3450a0885ae8355b42e388f79e..1d526775bd737148bff30dbc31df4aab81300c71 100644 (file)
@@ -8,6 +8,7 @@ use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
 use Org\Mxchange\CoreFramework\Request\Requestable;
 use Org\Mxchange\CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Utils\String\StringUtils;
 
 /**
  * A factory class for nodes
@@ -80,8 +81,8 @@ class NodeObjectFactory extends ObjectFactory {
                        // Now convert the node-mode in a class name
                        $className = sprintf(
                                'Org\Shipsimu\Hub\Node\%s\Hub%sNode',
-                               $factoryInstance->convertToClassName($nodeMode),
-                               $factoryInstance->convertToClassName($nodeMode)
+                               StringUtils::convertToClassName($nodeMode),
+                               StringUtils::convertToClassName($nodeMode)
                        );
 
                        // Get the node instance
index a1e3f4bd33b0fe38de2cac7e7dd14695f5470aba..256b72d6db7981c152d97d21269ad8bbe907ec8b 100644 (file)
@@ -17,6 +17,7 @@ use Org\Shipsimu\Hub\Network\Receive\Receivable;
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
 use Org\Mxchange\CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Utils\String\StringUtils;
 use Org\Mxchange\CoreFramework\Visitor\Visitable;
 use Org\Mxchange\CoreFramework\Visitor\Visitor;
 
@@ -335,7 +336,7 @@ class PackageAssembler extends BaseHubSystem implements Assembler, Registerable,
        public function chunkPackageInstance (DeliverablePackage $packageInstance) {
                // Construct call-back name from package error code
                /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('PACKAGE-ASSEMBLER: packageInstance=%s - CALLED!', $packageInstance->__toString()));
-               $this->callbacks[$packageInstance->getErrorCode()] = 'handlePackageBy' . self::convertToClassName($packageInstance->getErrorCode());
+               $this->callbacks[$packageInstance->getErrorCode()] = 'handlePackageBy' . StringUtils::convertToClassName($packageInstance->getErrorCode());
 
                // Init callable array
                $callable = [
index a3d1cae902c738f0cee8fdb30cea927cc60dac6b..e1a4dc1b66663a53000daacb48f3daac63607f8a 100644 (file)
@@ -5,6 +5,7 @@ namespace Org\Shipsimu\Hub\Resolver\State;
 // Import framework stuff
 use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
 use Org\Mxchange\CoreFramework\Resolver\BaseResolver;
+use Org\Mxchange\CoreFramework\Utils\String\StringUtils;
 
 /**
  * A generic state resolver class
@@ -103,7 +104,7 @@ abstract class BaseStateResolver extends BaseResolver {
                $stateInstance = NULL;
 
                // Create state class name
-               $className = $this->getStatePrefix() . '' . self::convertToClassName($stateName) . 'State';
+               $className = $this->getStatePrefix() . '' . StringUtils::convertToClassName($stateName) . 'State';
 
                // ... and set it
                $this->setClassName($className);
@@ -143,7 +144,7 @@ abstract class BaseStateResolver extends BaseResolver {
                } // END - if
 
                // Create class name
-               $className = $this->statePrefix . self::convertToClassName($stateName) . 'State';
+               $className = $this->statePrefix . StringUtils::convertToClassName($stateName) . 'State';
 
                // Now, let us create the full name of the state class
                $this->setClassName($className);
index 06c7715a3821ec006ca9ede7cbd8e6f224f78014..3cd57446bc0d7bd8bc0b196e086ba94b942ab6fa 100644 (file)
@@ -8,6 +8,7 @@ use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
 use Org\Mxchange\CoreFramework\Factory\Template\XmlTemplateEngineFactory;
 use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
 use Org\Mxchange\CoreFramework\Template\Engine\BaseTemplateEngine;
+use Org\Mxchange\CoreFramework\Utils\String\StringUtils;
 
 // Import SPL stuff
 use \InvalidArgumentException;
@@ -292,7 +293,7 @@ abstract class BaseXmlTemplateEngine extends BaseTemplateEngine {
         */
        public final function startElement ($resource, $element, array $attributes) {
                // Initial method name which will never be called...
-               $methodName = 'init' . self::convertToClassName($this->xmlTemplateType);
+               $methodName = 'init' . StringUtils::convertToClassName($this->xmlTemplateType);
 
                // Make the element name lower-case
                $element = strtolower($element);
@@ -301,13 +302,13 @@ abstract class BaseXmlTemplateEngine extends BaseTemplateEngine {
                //* DEBUG: */ echo "START: &gt;".$element."&lt;<br />\n";
                if (in_array($element, $this->getMainNodes())) {
                        // Okay, main node found!
-                       $methodName = 'start' . self::convertToClassName($element);
+                       $methodName = 'start' . StringUtils::convertToClassName($element);
 
                        // Set it
                        $this->setCurrMainNode($element);
                } elseif (in_array($element, $this->getSubNodes())) {
                        // Sub node found
-                       $methodName = 'start' . self::convertToClassName($element);
+                       $methodName = 'start' . StringUtils::convertToClassName($element);
                } else {
                        // Invalid node name found
                        throw new InvalidXmlNodeException(array($this, $element, $attributes), XmlParser::EXCEPTION_XML_NODE_UNKNOWN);
@@ -337,7 +338,7 @@ abstract class BaseXmlTemplateEngine extends BaseTemplateEngine {
                } // END - if
 
                // Construct method name
-               $methodName = 'finish' . self::convertToClassName($nodeName);
+               $methodName = 'finish' . StringUtils::convertToClassName($nodeName);
 
                // Call the corresponding method
                //* DEBUG: */ echo "call: ".$methodName."<br />\n";
diff --git a/core b/core
index 9128348f96854b318a9bf8884b1ee035f3f94e6c..513812814a5a17022d414727e5a4c6d0823fe5f6 160000 (submodule)
--- a/core
+++ b/core
@@ -1 +1 @@
-Subproject commit 9128348f96854b318a9bf8884b1ee035f3f94e6c
+Subproject commit 513812814a5a17022d414727e5a4c6d0823fe5f6