]> git.mxchange.org Git - mailer.git/blobdiff - inc/classes/middleware/debug/class_DebugMiddleware.php
Code syncronized with shipsimu code base
[mailer.git] / inc / classes / middleware / debug / class_DebugMiddleware.php
index 1f5e6e0e64ca44ab7e00a486b7820f136f88320e..8ee7e08375efffb416b7efe98c3d13ea235b8134 100644 (file)
@@ -6,7 +6,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright(c) 2007, 2008 Roland Haeder, this is free software
+ * @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
  *
@@ -21,7 +21,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 class DebugMiddleware extends BaseMiddleware implements Registerable {
        /**
@@ -43,12 +43,6 @@ class DebugMiddleware extends BaseMiddleware implements Registerable {
                // Call parent constructor
                parent::__construct(__CLASS__);
 
-               // Set description
-               $this->setObjectDescription("Debug-Ausgabe-Instance");
-
-               // Create an unique ID
-               $this->generateUniqueId();
-
                // Set own instance
                self::$thisInstance = $this;
        }
@@ -110,23 +104,11 @@ class DebugMiddleware extends BaseMiddleware implements Registerable {
         * @return      void
         */
        public final function output ($outStream) {
-               // Check if the output instance is valid
-               if (is_null($this->outputInstance)) {
-                       // Debug output instance was not set
-                       throw new NullPointerException($this, self::EXCEPTION_IS_NULL_POINTER);
-               } 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')) {
-                       // The required method outputStream() is missing
-                       throw new MissingMethodException(array($this->outputInstance, 'outputStream'), self::EXCEPTION_MISSING_METHOD);
-               }
-
                // Is the output stream set
                if (empty($outStream)) {
                        // Initialization phase
                        return;
-               }
+               } // END - if
 
                // Use the output instance
                $this->outputInstance->outputStream($outStream);