I'm using Zend_Controller_Plugin_ErrorHandler to handle 404 errors.
My default route is:
<?php
...
$route = new Zend_Controller_Router_Route(
':lang/:module/:controller/:action/*',
array(
'action' => 'index',
'controller'=>'index',
'module'=>'default',
'lang'=>$lang));
...
?>
This works fine for where an invalid controller is specified, but it doesn't
handle missing modules.
I see that this class is meant to, "Handle exceptions that bubble up based
on missing controllers, actions, or application errors, and forward to an
error handler", and that the following constants are utilised:
<?php
...
const EXCEPTION_NO_CONTROLLER = 'EXCEPTION_NO_CONTROLLER';
const EXCEPTION_NO_ACTION = 'EXCEPTION_NO_ACTION';
const EXCEPTION_OTHER = 'EXCEPTION_OTHER';
...
?>
Has anybody had experience of making this also handle missing modules?
Regards,
Ian
--
View this message in context: http://www.nabble.com/Handle-missing-modules-with-Zend_Controller_Plugin_ErrorHandler-tp24423186p24423186.html
Sent from the Zend MVC mailing list archive at Nabble.com.
没有评论:
发表评论