process_request()
process_request(\Pluf_HTTP_Request $request) : boolean
Process the request.
Parameters
\Pluf_HTTP_Request | $request |
Returns
boolean —false
Readonly middleware.
It is intercepting all the POST requests with a message telling that the website is in read only mode.
Optionally, a message at the top of the page is added to inform that the website is in read only mode.
Add the middleware at the top of your middleware list and optionally add a message to be displayed in your configuration file.
Example:
$cfg['middleware_classes'] = array( 'Pluf_Middleware_ReadOnly', 'Pluf_Middleware_Csrf', 'Pluf_Middleware_Session', 'Pluf_Middleware_Translation', ); $cfg['read_only_mode_message'] = 'The server is in read only mode the ' .'time to be migrated on another host.' .'Thank you for your patience.';
You can put HTML in your message.
process_response(\Pluf_HTTP_Request $request, \Pluf_HTTP_Response $response) : \Pluf_HTTP_Response
Process the response of a view.
If configured, add the message to inform that the website is in read only mode.
\Pluf_HTTP_Request | $request | |
\Pluf_HTTP_Response | $response |
The response