Instead of adding preDispatch in all controllers you can register a plugin to Zend_Controller_Front and handle timeout in it.
in bootstrap:
Quote:
...
$front = Zend_Controller_Front::getInstance();
$front->setControllerDirectory('controllers');
$front->registerPlugin(new TimeoutHandlerPlugin());
$front->dispatch();
...
|
timeout handler plugin:
Quote:
class TimeoutHandlerPlugin extends Zend_Controller_Plugin_Abstract
{
public function preDispatch(Zend_Controller_Request_Abstract $request) {
// reset the timer here
}
}
|
Cheers,
Ravi