From: Roland Haeder Date: Tue, 14 Jul 2015 21:31:02 +0000 (+0200) Subject: Moved outputInstance to BaseFrameworkSystem + added getter for it. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=fd38382c55735975a70e172192a074cb2cec5b3b;p=core.git Moved outputInstance to BaseFrameworkSystem + added getter for it. Signed-off-by: Roland Häder --- diff --git a/inc/classes/main/class_BaseFrameworkSystem.php b/inc/classes/main/class_BaseFrameworkSystem.php index 26986067..e26468c2 100644 --- a/inc/classes/main/class_BaseFrameworkSystem.php +++ b/inc/classes/main/class_BaseFrameworkSystem.php @@ -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 * diff --git a/inc/classes/middleware/debug/class_DebugMiddleware.php b/inc/classes/middleware/debug/class_DebugMiddleware.php index a275de11..541bbd2b 100644 --- a/inc/classes/middleware/debug/class_DebugMiddleware.php +++ b/inc/classes/middleware/debug/class_DebugMiddleware.php @@ -24,11 +24,6 @@ * along with this program. If not, see . */ 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