* Outputs the given data without HTML tags
*
* @param $output The HTML'ed output
+ * @param $stripTags Whether HTML tags shall be stripped out
* @return void
*/
- public final function outputStream ($output) {
- // Prepare the output
- $output = trim(html_entity_decode(strip_tags(stripslashes($output))));
+ public final function outputStream ($output, $stripTags = false) {
+ // Strip HTML tags out?
+ if ($stripTags === true) {
+ // Prepare the output without HTML tags
+ $output = trim(html_entity_decode(strip_tags(stripslashes($output))));
+ } else {
+ // Prepare the output with HTML tags
+ $output = trim(stripslashes($output));
+ }
// Are debug times enabled?
if ($this->getConfigInstance()->getConfigEntry('debug_output_timings') == 'Y') {
// Output it first
- print($this->getPrintableExecutionTime());
+ $output = $this->getPrintableExecutionTime() . $output;
} // END - if
// And print it out...
/**
* 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);
+ $this->outputStream($outStream, $stripTags);
} // END - if
}
* @throws UnsupportedOperationException If this method is called
*/
public function streamData ($data) {
- $this->debugOutput('Unhandled ' . strlen($data) . ' bytes in this stream.');
+ self::createDebugInstance(__CLASS__)->debugOutput('Unhandled ' . strlen($data) . ' bytes in this stream.');
throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
}
}