]> git.mxchange.org Git - core.git/blobdiff - inc/main/middleware/debug/class_DebugMiddleware.php
renamed lib-local.php -> lib-lfdb.php because it really loads the "legendary"
[core.git] / inc / main / middleware / debug / class_DebugMiddleware.php
index 07b5ee151150448767029a48859952c5f38c2958..5416df5d6f99bb2614a241748b4096164fd98746 100644 (file)
@@ -1,4 +1,14 @@
 <?php
+// Own namespace
+namespace CoreFramework\Middleware\Debug;
+
+// Import framework stuff
+use CoreFramework\Factory\ObjectFactory;
+use CoreFramework\Generic\NullPointerException;
+use CoreFramework\Middleware\BaseMiddleware;
+use CoreFramework\Registry\Registerable;
+use CoreFramework\Stream\Output\OutputStreamer;
+
 /**
  * The middlware debug output system. A *real* or concrete output class shall
  * become registered with this middleware because the back-fall class will
@@ -117,12 +127,13 @@ class DebugMiddleware extends BaseMiddleware implements Registerable {
                if (empty($outStream)) {
                        // @TODO Initialization phase
                        return;
-               } // END - if
+               } elseif (is_null($this->getOutputInstance())) {
+                       // Should not be NULL
+                       throw new NullPointerException($this, self::EXCEPTION_IS_NULL_POINTER);
+               }
 
                // Use the output instance
                $this->getOutputInstance()->outputStream($outStream, $stripTags);
        }
-}
 
-// [EOF]
-?>
+}