Public Member Functions | |
| process_request (&$request) | |
| process_response ($request, $response) | |
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.
| Pluf_Middleware_ReadOnly::process_request | ( | &$ | request | ) |
| Pluf_Middleware_ReadOnly::process_response | ( | $ | request, | |
| $ | 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 | The request | |
| Pluf_HTTP_Response | The response |