X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fclasses%2Fmiddleware%2Fdebug%2Fclass_DebugMiddleware.php;h=09066190c3fc538cce9c0474a9b9ffa1403dcbec;hb=b4683952aea678cf8e45d95989176073961de136;hp=743972c807a18f21442b9f880c48f257f24299ac;hpb=7a41f3cbb6640f18a4205ef367de6bf050020ed6;p=core.git diff --git a/inc/classes/middleware/debug/class_DebugMiddleware.php b/inc/classes/middleware/debug/class_DebugMiddleware.php index 743972c8..09066190 100644 --- a/inc/classes/middleware/debug/class_DebugMiddleware.php +++ b/inc/classes/middleware/debug/class_DebugMiddleware.php @@ -4,11 +4,11 @@ * become registered with this middleware because the back-fall class will * become deprecated soon. * - * @author Roland Haeder + * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007 - 2009 Roland Haeder, this is free software + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2013 Core Developer Team * @license GNU GPL 3.0 or any newer version - * @link http://www.ship-simu.org + * @link http://www.shipsimu.org * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -27,12 +27,12 @@ class DebugMiddleware extends BaseMiddleware implements Registerable { /** * The concrete output instance */ - private $outputInstance = null; + private $outputInstance = NULL; /** * An instance of this class */ - private static $thisInstance = null; + private static $selfInstance = NULL; /** * Protected constructor @@ -44,7 +44,10 @@ class DebugMiddleware extends BaseMiddleware implements Registerable { parent::__construct(__CLASS__); // Set own instance - self::$thisInstance = $this; + self::$selfInstance = $this; + + // Set it so all can use it + $this->setDebugInstance($this); } /** @@ -56,7 +59,7 @@ class DebugMiddleware extends BaseMiddleware implements Registerable { * registering the *real* debug output * @return $debugInstance An instance of this middleware class */ - public final static function createDebugMiddleware ($debuggerClass) { + public static final function createDebugMiddleware ($debuggerClass) { // Create an instance if this middleware $debugInstance = new DebugMiddleware(); @@ -79,10 +82,10 @@ class DebugMiddleware extends BaseMiddleware implements Registerable { /** * Getter for an instance of this class * - * @return $thisInstance An instance of this class + * @return $selfInstance An instance of this class */ - public final static function getInstance() { - return self::$thisInstance; + public static final function getSelfInstance() { + return self::$selfInstance; } /** @@ -101,17 +104,18 @@ class DebugMiddleware extends BaseMiddleware implements Registerable { * output instance. * * @param $outStream Data we shall 'stream' out to the world + * @param $stripTags Whether HTML tags shall be stripped out * @return void */ - public final function output ($outStream) { + public final function output ($outStream, $stripTags = FALSE) { // Is the output stream set if (empty($outStream)) { - // Initialization phase + // @TODO Initialization phase return; } // END - if // Use the output instance - $this->outputInstance->outputStream($outStream); + $this->outputInstance->outputStream($outStream, $stripTags); } }