]> git.mxchange.org Git - core.git/commitdiff
Moved outputInstance to BaseFrameworkSystem + added getter for it.
authorRoland Haeder <roland@mxchange.org>
Tue, 14 Jul 2015 21:31:02 +0000 (23:31 +0200)
committerRoland Haeder <roland@mxchange.org>
Tue, 14 Jul 2015 21:31:02 +0000 (23:31 +0200)
Signed-off-by: Roland Häder <roland@mxchange.org>
inc/classes/main/class_BaseFrameworkSystem.php
inc/classes/middleware/debug/class_DebugMiddleware.php

index 26986067f1f67a1200c242b1e65fed45cdc140a1..e26468c294579141f98d40990952f672e2c9e1c3 100644 (file)
@@ -218,6 +218,11 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
         */
        private $communicatorInstance = NULL;
 
+       /**
+        * The concrete output instance
+        */
+       private $outputInstance = NULL;
+
        /**
         * State instance
         */
@@ -1563,6 +1568,25 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
                return $this->stateInstance;
        }
 
+       /**
+        * Setter for output instance
+        *
+        * @param       $outputInstance The debug output instance
+        * @return      void
+        */
+       public final function setOutputInstance (OutputStreamer $outputInstance) {
+               $this->outputInstance = $outputInstance;
+       }
+
+       /**
+        * Getter for output instance
+        *
+        * @return      $outputInstance The debug output instance
+        */
+       public final function getOutputInstance () {
+               return $this->outputInstance;
+       }
+
        /**
         * Setter for command name
         *
index a275de113a3b9c01ecf3a74a1af2c983d729e341..541bbd2b218d7f00d4df40f88780de8bd1f0bbfc 100644 (file)
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 class DebugMiddleware extends BaseMiddleware implements Registerable {
-       /**
-        * The concrete output instance
-        */
-       private $outputInstance = NULL;
-
        /**
         * An instance of this class
         */
@@ -107,16 +102,6 @@ class DebugMiddleware extends BaseMiddleware implements Registerable {
                return self::$selfInstance;
        }
 
-       /**
-        * Setter for output instance
-        *
-        * @param       $outputInstance The debug output instance
-        * @return      void
-        */
-       public final function setOutputInstance (OutputStreamer $outputInstance) {
-               $this->outputInstance = $outputInstance;
-       }
-
        /**
         * This method shall send debug output which can be HTML code for the
         * browser or debug lines for a log file, etc. to the registered debug