X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fclasses%2Fmain%2Fdebug%2Fclass_DebugErrorLogOutput.php;h=2baf7917cd398858847e1814b1a5bb4623682843;hb=6703da39c439aa4772df4c1b31aca50b577e1406;hp=3fa1f719d5c34cf2957bd488f4b51971f350b4ed;hpb=fc5010729854b1f9c9bc60249460d092ea6694b6;p=core.git diff --git a/inc/classes/main/debug/class_DebugErrorLogOutput.php b/inc/classes/main/debug/class_DebugErrorLogOutput.php index 3fa1f719..2baf7917 100644 --- a/inc/classes/main/debug/class_DebugErrorLogOutput.php +++ b/inc/classes/main/debug/class_DebugErrorLogOutput.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Core Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * @@ -46,12 +46,13 @@ class DebugErrorLogOutput extends BaseFrameworkSystem implements Debugger, Outpu } /** - * Outputs the given data without HTML tags + * Outputs the given data without HTML tags, ignores $stripTags * * @param $output The HTML'ed output + * @param $stripTags Whether HTML tags shall be stripped out * @return void */ - public final function outputStream ($output) { + public final function outputStream ($output, $stripTags = false) { // Split multiple lines into and array to put them out line-by-line $errorLines = explode(chr(10), $output); @@ -71,14 +72,28 @@ class DebugErrorLogOutput extends BaseFrameworkSystem implements Debugger, Outpu /** * Output the code * + * @param $outStream Stream to output + * @param $stripTags Whether HTML tags shall be stripped out * @return void */ - public final function output ($outStream = false) { + public final function output ($outStream = false, $stripTags = false) { // Empty output will be silently ignored if ($outStream !== false) { $this->outputStream($outStream); } } + + /** + * Streams the data and maybe does something to it + * + * @param $data The data (string mostly) to "stream" + * @return $data The data (string mostly) to "stream" + * @throws UnsupportedOperationException If this method is called + */ + public function streamData ($data) { + self::createDebugInstance(__CLASS__)->debugOutput('Unhandled ' . strlen($data) . ' bytes in this stream.'); + throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION); + } } // [EOF]