From: Roland Häder Date: Mon, 3 Mar 2008 21:10:58 +0000 (+0000) Subject: interfaces OutputStreamer implemented in all debuggers X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a614592758896a73b1af984cb4f88c35cf06c437;p=hub.git interfaces OutputStreamer implemented in all debuggers --- diff --git a/inc/classes/main/debug/class_DebugConsoleOutput.php b/inc/classes/main/debug/class_DebugConsoleOutput.php index 46205f48b..8cc9cfb1d 100644 --- a/inc/classes/main/debug/class_DebugConsoleOutput.php +++ b/inc/classes/main/debug/class_DebugConsoleOutput.php @@ -21,7 +21,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class DebugConsoleOutput extends BaseFrameworkSystem implements Debugger { +class DebugConsoleOutput extends BaseFrameworkSystem implements Debugger, OutputStreamer { /** * Private constructor * @@ -60,6 +60,29 @@ class DebugConsoleOutput extends BaseFrameworkSystem implements Debugger { public final function outputStream ($output) { print html_entity_decode(strip_tags($output)); } + + /** + * Assigns a variable for output + * + * @param $var The variable we shall assign + * @param $value The value to store in the variable + * @return void + */ + function assignVariable ($var, $value) { + // Empty stub! + trigger_error(__METHOD__.": Stub!"); + } + + /** + * Output the code + * + * @return void + */ + function output ($outStream=false) { + if ($outStream !== false) { + $this->outputStream($outStream); + } + } } // [EOF] diff --git a/inc/classes/main/debug/class_DebugErrorLogOutput.php b/inc/classes/main/debug/class_DebugErrorLogOutput.php index 2897e948f..2afc3737b 100644 --- a/inc/classes/main/debug/class_DebugErrorLogOutput.php +++ b/inc/classes/main/debug/class_DebugErrorLogOutput.php @@ -21,7 +21,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class DebugErrorLogOutput extends BaseFrameworkSystem implements Debugger { +class DebugErrorLogOutput extends BaseFrameworkSystem implements Debugger, OutputStreamer { /** * Private constructor * @@ -69,6 +69,29 @@ class DebugErrorLogOutput extends BaseFrameworkSystem implements Debugger { } } } + + /** + * Assigns a variable for output + * + * @param $var The variable we shall assign + * @param $value The value to store in the variable + * @return void + */ + function assignVariable ($var, $value) { + // Empty stub! + trigger_error(__METHOD__.": Stub!"); + } + + /** + * Output the code + * + * @return void + */ + function output ($outStream=false) { + if ($outStream !== false) { + $this->outputStream($outStream); + } + } } // [EOF] diff --git a/inc/classes/main/debug/class_DebugWebOutput.php b/inc/classes/main/debug/class_DebugWebOutput.php index f79bec012..d913ce6e2 100644 --- a/inc/classes/main/debug/class_DebugWebOutput.php +++ b/inc/classes/main/debug/class_DebugWebOutput.php @@ -21,7 +21,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class DebugWebOutput extends BaseFrameworkSystem implements Debugger { +class DebugWebOutput extends BaseFrameworkSystem implements Debugger, OutputStreamer { /** * Private constructor * @@ -60,6 +60,29 @@ class DebugWebOutput extends BaseFrameworkSystem implements Debugger { public final function outputStream ($output) { trigger_error($output); } + + /** + * Assigns a variable for output + * + * @param $var The variable we shall assign + * @param $value The value to store in the variable + * @return void + */ + function assignVariable ($var, $value) { + // Empty stub! + trigger_error(__METHOD__.": Stub!"); + } + + /** + * Output the code + * + * @return void + */ + function output ($outStream=false) { + if ($outStream !== false) { + $this->outputStream($outStream); + } + } } // [EOF]