]> git.mxchange.org Git - mailer.git/blobdiff - application/mailer/class_ApplicationHelper.php
Global fix for generating right class name for controller resolver (to make that...
[mailer.git] / application / mailer / class_ApplicationHelper.php
index ed334f936c063906fd94aab2501ca87c95a12ee4..8d528a3cc4768c6d1be3a6c7ecd645d4c733f31e 100644 (file)
@@ -43,17 +43,17 @@ class ApplicationHelper extends BaseApplication implements ManageableApplication
        /**
         * The version number of this application
         */
        /**
         * The version number of this application
         */
-       private $appVersion = "";
+       private $appVersion = '';
 
        /**
         * The human-readable name for this application
         */
 
        /**
         * The human-readable name for this application
         */
-       private $appName = "";
+       private $appName = '';
 
        /**
         * The short uni*-like name for this application
         */
 
        /**
         * The short uni*-like name for this application
         */
-       private $shortName = "";
+       private $shortName = '';
 
        /**
         * An instance of a controller
 
        /**
         * An instance of a controller
@@ -80,7 +80,7 @@ class ApplicationHelper extends BaseApplication implements ManageableApplication
         *
         * @return      $selfInstance   An instance of this class
         */
         *
         * @return      $selfInstance   An instance of this class
         */
-       public static final function getInstance () {
+       public static final function getSelfInstance () {
                // Is the instance there?
                if (is_null(self::$selfInstance)) {
                        self::$selfInstance = new ApplicationHelper();
                // Is the instance there?
                if (is_null(self::$selfInstance)) {
                        self::$selfInstance = new ApplicationHelper();
@@ -160,7 +160,7 @@ class ApplicationHelper extends BaseApplication implements ManageableApplication
         */
        public function buildMasterTemplateName () {
                // Get short name and add suffix
         */
        public function buildMasterTemplateName () {
                // Get short name and add suffix
-               $masterTemplateName = str_replace("-", "", $this->getAppShortName()) . "_main";
+               $masterTemplateName = str_replace('-', '', $this->getAppShortName()) . '_main';
 
                // Return it
                return $masterTemplateName;
 
                // Return it
                return $masterTemplateName;
@@ -211,8 +211,8 @@ class ApplicationHelper extends BaseApplication implements ManageableApplication
                        $requestInstance->setRequestElement('page', $commandName);
                } // END - if
 
                        $requestInstance->setRequestElement('page', $commandName);
                } // END - if
 
-               // Get a resolver
-               $resolverClass = sprintf("%sControllerResolver", $this->convertToClassName($responseType));
+               // Get a controller resolver
+               $resolverClass = $this->convertToClassName($this->getAppShortName() . '_' . $responseType . '_controller_resolver');
                $resolverInstance = ObjectFactory::createObjectByName($resolverClass, array($commandName, $this));
 
                // Get a controller instance as well
                $resolverInstance = ObjectFactory::createObjectByName($resolverClass, array($commandName, $this));
 
                // Get a controller instance as well