*
* @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
*
* 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 {
/**
// 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;
}
* @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);