]> git.mxchange.org Git - shipsimu.git/blobdiff - application/selector/class_ApplicationHelper.php
Updated to latest 'core' + convertToClassName() and convertDashesToUnderscores()...
[shipsimu.git] / application / selector / class_ApplicationHelper.php
index c94407f83d46375bd67957062f8d0a523e5bcd62..204800fa0989a380bd091bf2684522ff4badb73b 100644 (file)
@@ -157,7 +157,7 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica
                $responseType = self::getResponseTypeFromSystem();
 
                // Create a new request object
-               $requestInstance = ObjectFactory::createObjectByName($this->convertToClassName($response) . 'Request');
+               $requestInstance = ObjectFactory::createObjectByName(self::convertToClassName($response) . 'Request');
 
                // Remember request instance here
                $this->setRequestInstance($requestInstance);
@@ -170,26 +170,26 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica
                } // END - if
 
                // ... and a new response object
-               $responseClass = sprintf('%sResponse', $this->convertToClassName($response));
+               $responseClass = sprintf('%sResponse', self::convertToClassName($response));
                $responseInstance = ObjectFactory::createObjectByName($responseClass, array($this));
 
                // Remember response instance here
                $this->setResponseInstance($responseInstance);
 
                // Get the parameter from the request
-               $commandName = $requestInstance->getRequestElement('page');
+               $commandName = $requestInstance->getRequestElement('command');
 
                // If it is null then get default command
                if (is_null($commandName)) {
                        // Get default command
-                       $commandName = $responseInstance->getDefaultCommand();
+                       $commandName = $responseInstance->determineDefaultCommand();
 
                        // Set it in request
-                       $requestInstance->setRequestElement('page', $commandName);
+                       $requestInstance->setRequestElement('command', $commandName);
                } // END - if
 
                // Get a controller resolver
-               $resolverClass = $this->convertToClassName($this->getAppShortName() . '_' . $responseType . '_controller_resolver');
+               $resolverClass = self::convertToClassName($this->getAppShortName() . '_' . $responseType . '_controller_resolver');
                $resolverInstance = ObjectFactory::createObjectByName($resolverClass, array($commandName, $this));
 
                // Get a controller instance as well