]> git.mxchange.org Git - core.git/commitdiff
Moved some class fields and their setter/getter to BaseFrameworkSystem.
authorRoland Haeder <roland@mxchange.org>
Sun, 5 Apr 2015 21:38:05 +0000 (23:38 +0200)
committerRoland Haeder <roland@mxchange.org>
Sun, 5 Apr 2015 21:38:05 +0000 (23:38 +0200)
Signed-off-by: Roland Häder <roland@mxchange.org>
inc/classes/main/class_BaseFrameworkSystem.php
inc/classes/main/commands/class_BaseCommand.php
inc/classes/main/resolver/command/class_BaseCommandResolver.php
inc/classes/main/resolver/controller/class_BaseControllerResolver.php

index a294e8ee99a645c1a4db7a6834b205b7103e19c1..a542b371ffa4c59016377c640b0f7dd4a63950bb 100644 (file)
@@ -243,6 +243,16 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
         */
        private $genericArray = array();
 
+       /**
+        * Command name
+        */
+       private $commandName = '';
+
+       /**
+        * Controller name
+        */
+       private $controllerName = '';
+
        /***********************
         * Exception codes.... *
         ***********************/
@@ -1433,6 +1443,44 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
                return $this->listenerInstance;
        }
 
+       /**
+        * Setter for command name
+        *
+        * @param       $commandName    Last validated command name
+        * @return      void
+        */
+       protected final function setCommandName ($commandName) {
+               $this->commandName = $commandName;
+       }
+
+       /**
+        * Getter for command name
+        *
+        * @return      $commandName    Last validated command name
+        */
+       protected final function getCommandName () {
+               return $this->commandName;
+       }
+
+       /**
+        * Setter for controller name
+        *
+        * @param       $controllerName Last validated controller name
+        * @return      void
+        */
+       protected final function setControllerName ($controllerName) {
+               $this->controllerName = $controllerName;
+       }
+
+       /**
+        * Getter for controller name
+        *
+        * @return      $controllerName Last validated controller name
+        */
+       protected final function getControllerName () {
+               return $this->controllerName;
+       }
+
        /**
         * Checks whether an object equals this object. You should overwrite this
         * method to implement own equality checks
index 05fd5ce656aadd56d4862e5b3114f01496dd306c..efb9d16dd0411ff4ac84bafaf5274c560bce0a5a 100644 (file)
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 class BaseCommand extends BaseFrameworkSystem {
-       /**
-        * The controller we need for this command
-        */
-       private $controllerName = '';
-
        /**
         * Protected constructor
         *
@@ -37,25 +32,6 @@ class BaseCommand extends BaseFrameworkSystem {
                // Call parent constructor
                parent::__construct($className);
        }
-
-       /**
-        * Setter for controller name
-        *
-        * @param       $controllerName         Name of the controller assigned with this command
-        * @return      void
-        */
-       public final function setControllerName ($controllerName) {
-               $this->controllerName = (string) $controllerName;
-       }
-
-       /**
-        * Getter for controller name
-        *
-        * @return      $controllerName         Name of the controller assigned with this command
-        */
-       public final function getControllerName () {
-               return $this->controllerName;
-       }
 }
 
 // [EOF]
index 0994bf168f5385f0899ec765edbcdb447b50945e..283f5558a469bc152fc95d779cdc808e18b35a07 100644 (file)
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 class BaseCommandResolver extends BaseResolver {
-       /**
-        * Validated command name
-        */
-       private $commandName = '';
-
        /**
         * Protected constructor
         *
@@ -38,25 +33,6 @@ class BaseCommandResolver extends BaseResolver {
                parent::__construct($className);
        }
 
-       /**
-        * Setter for command name
-        *
-        * @param       $commandName    Last validated command name
-        * @return      void
-        */
-       protected final function setCommandName ($commandName) {
-               $this->commandName = $commandName;
-       }
-
-       /**
-        * Getter for command name
-        *
-        * @return      $commandName    Last validated command name
-        */
-       protected final function getCommandName () {
-               return $this->commandName;
-       }
-
        /**
         * "Loads" a given command and instances it if not yet cached
         *
index 03560545d3c3178e081de2aa1affe3ff0962d319..14db8c3e25ca02aa54a77093023c0aeade06897c 100644 (file)
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 class BaseControllerResolver extends BaseResolver {
-       /**
-        * Validated controller name
-        */
-       private $controllerName = '';
-
        /**
         * Protected constructor
         *
@@ -38,25 +33,6 @@ class BaseControllerResolver extends BaseResolver {
                parent::__construct($className);
        }
 
-       /**
-        * Setter for controller name
-        *
-        * @param       $controllerName         Last validated controller name
-        * @return      void
-        */
-       protected final function setControllerName ($controllerName) {
-               $this->controllerName = $controllerName;
-       }
-
-       /**
-        * Getter for controller name
-        *
-        * @return      $controllerName Last validated controller name
-        */
-       public final function getControllerName () {
-               return $this->controllerName;
-       }
-
        /**
         * "Loads" a given controller and instances it if not yet cached. If the
         * controller was not found one of the default controllers will be used