Pluf_Middleware_ReadOnly Class Reference

List of all members.

Public Member Functions

 process_request (&$request)
 process_response ($request, $response)


Detailed Description

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.


Member Function Documentation

Pluf_Middleware_ReadOnly::process_request ( &$  request  ) 

Process the request.

Parameters:
Pluf_HTTP_Request The request
Returns:
bool false

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.

Parameters:
Pluf_HTTP_Request The request
Pluf_HTTP_Response The response
Returns:
Pluf_HTTP_Response The response


The documentation for this class was generated from the following file:

Generated on Wed Feb 3 15:44:52 2010 for Pluf by  doxygen