* @return void
*/
public final function setDebugInstance (DebugMiddleware $debugInstance) {
- GenericRegistry::getRegistry()->addInstance('debug', $debugInstance);
+ self::$debugInstance = $debugInstance;
}
/**
));
}
- /**
- * Output a partial stub message for the caller method
- *
- * @param $message An optional message to display
- * @return void
- */
- protected function partialStub (string $message = '') {
- // Init variable
- $stubMessage = 'Partial stub!';
-
- // Is an extra message given?
- if (!empty($message)) {
- // Then add it as well
- $stubMessage .= ' Message: ' . $message;
- }
-
- // Debug instance is there?
- if (!is_null($this->getDebugInstance())) {
- // Output stub message
- self::createDebugInstance(__CLASS__, __LINE__)->warningMessage($stubMessage);
- } else {
- // Trigger an error
- trigger_error($stubMessage);
- exit(255);
- }
- }
-
/**
* Outputs a debug backtrace and stops further script execution
*
}
} else {
// @TODO Finish this part!
- $this->partialStub('Developer mode inactive. Message:' . $message);
+ DebugMiddleware::getSelfInstance()->partialStub('Developer mode inactive. Message:' . $message);
}
}