// Use debug output handler
//* NOISY-DEBUG: */ printf('[%s:%d]: Invoking this->output(%s,%d) ...' . PHP_EOL, __METHOD__, __LINE__, $message, intval($stripTags));
- $this->output($message, $stripTags);
+ $this->output(sprintf('TRACE: %s', $message), $stripTags);
// Trace message
//* NOISY-DEBUG: */ printf('[%s:%d]: EXIT!' . PHP_EOL, __METHOD__, __LINE__);
// Use debug output handler
//* NOISY-DEBUG: */ printf('[%s:%d]: Invoking this->output(%s,%d) ...' . PHP_EOL, __METHOD__, __LINE__, $message, intval($stripTags));
- $this->output($message, $stripTags);
+ $this->output(sprintf('DEBUG: %s', $message), $stripTags);
+
+ // Trace message
+ //* NOISY-DEBUG: */ printf('[%s:%d]: EXIT!' . PHP_EOL, __METHOD__, __LINE__);
+ }
+
+ /**
+ * Outputs an informational message whether to debug instance (should be set!) or
+ * dies with or ptints the message. Do NEVER EVER rewrite the exit() call to
+ * ApplicationEntryPoint::app_exit(), this would cause an endless loop.
+ *
+ * @param $message Message we shall send out...
+ * @param $doPrint Whether print or die here (default: print)
+ * @paran $stripTags Whether to strip tags (default: false)
+ * @return void
+ * @throws InvalidArgumentException If a parameter has an invalid value
+ * @throws NullPointerException If this->outputInstance is NULL
+ * @todo Remove $doPrint parameter
+ */
+ public function infoMessage (string $message, bool $doPrint = true, bool $stripTags = false) {
+ // Check parameter
+ //* NOISY-DEBUG: */ printf('[%s:%d]: message=%s,doPrint=%d,stripTags=%d - CALLED!' . PHP_EOL, __METHOD__, __LINE__, $message, intval($doPrint), intval($stripTags));
+ if (empty($message)) {
+ // Throw IAE
+ throw new InvalidArgumentException('Parameter "message" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
+ } elseif (is_null($this->getOutputInstance())) {
+ // Should not be NULL
+ throw new NullPointerException($this, self::EXCEPTION_IS_NULL_POINTER);
+ }
+
+ // Use debug output handler
+ //* NOISY-DEBUG: */ printf('[%s:%d]: Invoking this->output(%s,%d) ...' . PHP_EOL, __METHOD__, __LINE__, $message, intval($stripTags));
+ $this->output(sprintf('INFO: %s', $message), $stripTags);
// Trace message
//* NOISY-DEBUG: */ printf('[%s:%d]: EXIT!' . PHP_EOL, __METHOD__, __LINE__);
// Use debug output handler
//* NOISY-DEBUG: */ printf('[%s:%d]: Invoking this->output(%s,%d) ...' . PHP_EOL, __METHOD__, __LINE__, $message, intval($stripTags));
- $this->output($message, $stripTags);
+ $this->output(sprintf('WARNING: %s', $message), $stripTags);
// Trace message
//* NOISY-DEBUG: */ printf('[%s:%d]: EXIT!' . PHP_EOL, __METHOD__, __LINE__);
}
/**
- * Outputs a debug message whether to debug instance (should be set!) or
+ * Outputs a deprecated message whether to debug instance (should be set!) or
* dies with or ptints the message. Do NEVER EVER rewrite the exit() call to
* ApplicationEntryPoint::app_exit(), this would cause an endless loop.
*
* @throws InvalidArgumentException If a parameter has an invalid value
* @throws NullPointerException If this->outputInstance is NULL
* @todo Remove $doPrint parameter
- * @deprecated Rewrite to "new" methods above
+ * @todo When all old method invocations are fixed, renamed this do deprecatedMessage
*/
public function debugOutput (string $message, bool $doPrint = true, bool $stripTags = false) {
// Check parameter
throw new NullPointerException($this, self::EXCEPTION_IS_NULL_POINTER);
}
- // Invoke new version
- $this->debugMessage($message, $doPrint, $stripTags);
+ // Invoke Inner method
+ $this->outputMessage(sprintf('DEPRECATED: %s', $message), $doPrint, $stripTags);
// Trace message
//* NOISY-DEBUG: */ printf('[%s:%d]: EXIT!' . PHP_EOL, __METHOD__, __LINE__);