// Import framework stuff
use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
+use Org\Mxchange\CoreFramework\Helper\Application\ApplicationHelper;
use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
* @param $status New response status
* @return void
*/
- public final function setResponseStatus ($status) {
- $this->responseStatus = (string) $status;
+ public final function setResponseStatus (string $status) {
+ $this->responseStatus = $status;
}
/**
* @param $value Value of header element
* @return void
*/
- public final function addHeader ($name, $value) {
+ public final function addHeader (string $name, $value) {
$this->responseHeaders[$name] = $value;
}
* @param $output Output we shall sent in the HTTP response
* @return void
*/
- public final function writeToBody ($output) {
+ public final function writeToBody (string $output) {
$this->responseBody .= $output;
}
* @param $responseType Response type
* @return void
*/
- protected final function setResponseType ($responseType) {
+ protected final function setResponseType (string $responseType) {
$this->responseType = $responseType;
}
* @param $messageId The message id we shall add
* @return void
*/
- public final function addFatalMessage ($messageId) {
+ public final function addFatalMessage (string $messageId) {
// Adds the resolved message id to the fatal message list
$this->addFatalMessagePlain(FrameworkBootstrap::getLanguageInstance()->getMessage($messageId));
}
* @param $message The plain message we shall add
* @return void
*/
- public final function addFatalMessagePlain ($message) {
+ public final function addFatalMessagePlain (string $message) {
// Adds the resolved message id to the fatal message list
$this->pushValueToGenericArrayKey('fatal_messages', 'generic', 'message', $message);
}
* @throws ResponseHeadersAlreadySentException Thrown if headers are
* already sent
*/
- public function flushBuffer ($force = false) {
+ public function flushBuffer (bool $force = false) {
// Get application instance
- $applicationInstance = GenericRegistry::getRegistry()->getInstance('application');
+ $applicationInstance = ApplicationHelper::getSelfInstance();
// Headers already sent?
if ((headers_sent()) && ($force === false)) {
*/
public function determineDefaultCommand () {
// Get application instance
- $applicationInstance = GenericRegistry::getRegistry()->getInstance('application');
+ $applicationInstance = ApplicationHelper::getSelfInstance();
// Generate config key
$configKey = sprintf('default_%s_%s_command',