ResponseRenderer
class ResponseRenderer (View source)
Singleton class used to manage the rendering of pages in PMA
Properties
protected | $header | Header instance |
|
protected | $footer | PhpMyAdmin\Footer instance |
|
protected | $isAjax | Whether we are servicing an ajax request. |
|
protected | $isDisabled | Whether response object is disabled |
|
protected | $isSuccess | Whether there were any errors during the processing of the request Only used for ajax responses |
|
static protected array<int,string> | $httpStatusMessages |
Methods
Set the ajax flag to indicate whether we are servicing an ajax request
Returns the singleton object
Set the status of an ajax response, whether it is a success or an error
Returns true or false depending on whether we are servicing an ajax request
Disables the rendering of the header and the footer in responses
Append HTML code to the current output buffer
Add JSON code to the response
Sends an HTML response to the browser
Wrapper around PHP's header() function.
Wrapper around PHP's headers_sent() function.
Wrapper around PHP's http_response_code() function.
Sets http response code.
Generate header for 303
Configures response for the login page
No description
No description
No description
Details
void
setAjax(bool $isAjax)
Set the ajax flag to indicate whether we are servicing an ajax request
static ResponseRenderer
getInstance()
Returns the singleton object
void
setRequestStatus(bool $state)
Set the status of an ajax response, whether it is a success or an error
bool
isAjax()
Returns true or false depending on whether we are servicing an ajax request
void
disable()
Disables the rendering of the header and the footer in responses
Header
getHeader()
Returns a PhpMyAdmin\Header object
void
addHTML(string $content)
Append HTML code to the current output buffer
void
addJSON(string|int|array $json, mixed $value = null)
Add JSON code to the response
void
response()
Sends an HTML response to the browser
void
header(string $text)
Wrapper around PHP's header() function.
bool
headersSent()
Wrapper around PHP's headers_sent() function.
void
httpResponseCode(int $responseCode)
Wrapper around PHP's http_response_code() function.
void
setHttpResponseCode(int $responseCode)
Sets http response code.
void
generateHeader303(string $location)
Generate header for 303
bool
loginPage()
Configures response for the login page
void
setMinimalFooter()
No description
string
getSelfUrl()
No description
Scripts
getFooterScripts()
No description