/**
* Outputs the given data
*
- * @param $output Debug text for output
+ * @param $output Debug text for output
+ * @param $stripTags Whether HTML tags shall be stripped out
* @return void
*/
- function outputStream ($output);
+ function outputStream ($output, $stripTags = false);
}
// [EOF]
/**
* Output the code
*
+ * @param $outStream Stream to output
+ * @param $stripTags Whether HTML tags shall be stripped out
* @return void
*/
- function output ($outStream = false);
+ function output ($outStream = false, $stripTags = false);
}
// [EOF]
* Outputs a debug message whether to debug instance (should be set!) or dies with or pints the message
*
* @param $message Message we shall send out...
- * @param $doPrint Whether we shall print or die here which first is the default
+ * @param $doPrint Whether print or die here (default: print)
+ * @paran $stripTags Whether to strip tags (default: false)
* @return void
*/
- public function debugOutput ($message, $doPrint = true) {
+ public function debugOutput ($message, $doPrint = true, $stripTags = false) {
// Set debug instance to NULL
$debugInstance = NULL;
* 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
}
}
/**
- * 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);
/**
* 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);
}
/**
- * Outputs the given data directly
+ * Outputs the given data directly, ignores $stripTags
*
* @param $output The HTML output
+ * @param $stripTags Whether HTML tags shall be stripped out
* @return void
*/
- public final function outputStream ($output) {
+ public final function outputStream ($output, $stripTags = false) {
// Strip out <br />
$output = str_replace("<br />", '', $output);
print(stripslashes($output)."<br />\n");
/**
* 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
}
/**
* Output the code
*
* @param $outStream Something we shall sent to the console
+ * @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) {
print trim($outStream) . chr(10);
}
}
/**
* 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) {
print(stripslashes($outStream));
}
}
* 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)) {
// @TODO Initialization phase
} // END - if
// Use the output instance
- $this->outputInstance->outputStream($outStream);
+ $this->outputInstance->outputStream($outStream, $stripTags);
}
}