From fd38382c55735975a70e172192a074cb2cec5b3b Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Tue, 14 Jul 2015 23:31:02 +0200 Subject: [PATCH] Moved outputInstance to BaseFrameworkSystem + added getter for it. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../main/class_BaseFrameworkSystem.php | 24 +++++++++++++++++++ .../debug/class_DebugMiddleware.php | 15 ------------ 2 files changed, 24 insertions(+), 15 deletions(-) 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 -- 2.30.2