* @version 0.0.0
* @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
+ * @link http://www.ship-simu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class DebugMiddleware extends BaseMiddleware {
+class DebugMiddleware extends BaseMiddleware implements Registerable {
/**
* The concrete output instance
*/
* browser or debug lines for a log file, etc. to the registered debug
* output instance.
*
+ * @param $outStream Data we shall "stream" out to the world
* @return void
*/
public final function output ($outStream) {
} elseif (!is_object($this->outputInstance)) {
// The debug output instance is not an object
throw new NoObjectException($this->ouputInstance, self::EXCEPTION_IS_NO_OBJECT);
- } elseif (!method_exists($this->outputInstance, 'outputStream')) {
+ } elseif (!$this->outputInstance instanceof Debugger) {
// The required method outputStream() is missing
throw new MissingMethodException(array($this->outputInstance, 'outputStream'), self::EXCEPTION_MISSING_METHOD);
}
if (empty($outStream)) {
// Initialization phase
return;
- }
+ } // END - if
// Use the output instance
$this->outputInstance->outputStream($outStream);