ResponseRenderer
class ResponseRenderer (View source)
Singleton class used to manage the rendering of pages in PMA
Properties
protected bool | $isAjax | Whether we are servicing an ajax request. |
|
protected bool | $isSuccess | Whether there were any errors during the processing of the request Only used for ajax responses |
|
static protected array<int,string> | $httpStatusMessages | ||
protected Response | $response |
Methods
No description
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
Append HTML code to the current output buffer
Add JSON code to the response
No description
No description
Configures response for the login page
No description
No description
No description
No description
Avoid relative path redirect problems in case user entered URL like /phpmyadmin/index.php/ which some web servers happily accept.
No description
No description
No description
No description
No description
Details
protected
__construct(Config $config, Template $template, Header $header, Footer $footer, ErrorHandler $errorHandler, DatabaseInterface $dbi, ResponseFactory $responseFactory)
No description
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
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
Response
response()
No description
void
addHeader(string $name, string $value)
No description
void
setStatusCode(int $code)
No description
bool
loginPage()
Configures response for the login page
void
setMinimalFooter()
No description
string
getSelfUrl()
No description
Scripts
getFooterScripts()
No description
never
callExit()
No description
string
fixRelativeUrlForRedirect(string $url)
Avoid relative path redirect problems in case user entered URL like /phpmyadmin/index.php/ which some web servers happily accept.
void
redirect(string $url, int $statusCode = StatusCodeInterface::STATUS_FOUND)
No description
void
redirectToRoute(string $route, array $params = [])
No description
void
addScriptFiles(array $files)
No description
Response
missingParameterError(string $param)
No description
void
render(string $templatePath, array $templateData = [])
No description