Zend Framework  1.12
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
Zend_Controller_Plugin_ErrorHandler Class Reference

Public Member Functions

 __construct (Array $options=array())
 Constructor.
 
 setErrorHandler (Array $options=array())
 setErrorHandler() - setup the error handling options
 
 setErrorHandlerModule ($module)
 Set the module name for the error handler.
 
 getErrorHandlerModule ()
 Retrieve the current error handler module.
 
 setErrorHandlerController ($controller)
 Set the controller name for the error handler.
 
 getErrorHandlerController ()
 Retrieve the current error handler controller.
 
 setErrorHandlerAction ($action)
 Set the action name for the error handler.
 
 getErrorHandlerAction ()
 Retrieve the current error handler action.
 
 routeShutdown (Zend_Controller_Request_Abstract $request)
 Route shutdown hook – Ccheck for router exceptions.
 
 preDispatch (Zend_Controller_Request_Abstract $request)
 Pre dispatch hook – check for exceptions and dispatch error handler if necessary.
 
 postDispatch (Zend_Controller_Request_Abstract $request)
 Post dispatch hook – check for exceptions and dispatch error handler if necessary.
 
- Public Member Functions inherited from Zend_Controller_Plugin_Abstract
 setRequest (Zend_Controller_Request_Abstract $request)
 Set request object.
 
 getRequest ()
 Get request object.
 
 setResponse (Zend_Controller_Response_Abstract $response)
 Set response object.
 
 getResponse ()
 Get response object.
 
 routeStartup (Zend_Controller_Request_Abstract $request)
 Called before Zend_Controller_Front begins evaluating the request against its routes.
 
 routeShutdown (Zend_Controller_Request_Abstract $request)
 Called after Zend_Controller_Router exits.
 
 dispatchLoopStartup (Zend_Controller_Request_Abstract $request)
 Called before Zend_Controller_Front enters its dispatch loop.
 
 preDispatch (Zend_Controller_Request_Abstract $request)
 Called before an action is dispatched by Zend_Controller_Dispatcher.
 
 postDispatch (Zend_Controller_Request_Abstract $request)
 Called after an action is dispatched by Zend_Controller_Dispatcher.
 
 dispatchLoopShutdown ()
 Called before Zend_Controller_Front exits its dispatch loop.
 

Public Attributes

const EXCEPTION_NO_CONTROLLER = 'EXCEPTION_NO_CONTROLLER'
 Const - No controller exception; controller does not exist.
 
const EXCEPTION_NO_ACTION = 'EXCEPTION_NO_ACTION'
 Const - No action exception; controller exists, but action does not.
 
const EXCEPTION_NO_ROUTE = 'EXCEPTION_NO_ROUTE'
 Const - No route exception; no routing was possible.
 
const EXCEPTION_OTHER = 'EXCEPTION_OTHER'
 Const - Other Exception; exceptions thrown by application controllers.
 

Protected Member Functions

 _handleError (Zend_Controller_Request_Abstract $request)
 Handle errors and exceptions.
 

Protected Attributes

 $_errorModule
 
 $_errorController = 'error'
 
 $_errorAction = 'error'
 
 $_isInsideErrorHandlerLoop = false
 
 $_exceptionCountAtFirstEncounter = 0
 
- Protected Attributes inherited from Zend_Controller_Plugin_Abstract
 $_request
 
 $_response
 

Constructor & Destructor Documentation

__construct ( Array  $options = array())

Constructor.

Options may include:

  • module
  • controller
  • action
Parameters
Array$options
Returns
void

Member Function Documentation

_handleError ( Zend_Controller_Request_Abstract  $request)
protected

Handle errors and exceptions.

If the 'noErrorHandler' front controller flag has been set, returns early.

Parameters
Zend_Controller_Request_Abstract$request
Returns
void
getErrorHandlerAction ( )

Retrieve the current error handler action.

Returns
string
getErrorHandlerController ( )

Retrieve the current error handler controller.

Returns
string
getErrorHandlerModule ( )

Retrieve the current error handler module.

Returns
string
postDispatch ( Zend_Controller_Request_Abstract  $request)

Post dispatch hook – check for exceptions and dispatch error handler if necessary.

Parameters
Zend_Controller_Request_Abstract$request
preDispatch ( Zend_Controller_Request_Abstract  $request)

Pre dispatch hook – check for exceptions and dispatch error handler if necessary.

Parameters
Zend_Controller_Request_Abstract$request
routeShutdown ( Zend_Controller_Request_Abstract  $request)

Route shutdown hook – Ccheck for router exceptions.

Parameters
Zend_Controller_Request_Abstract$request
setErrorHandler ( Array  $options = array())

setErrorHandler() - setup the error handling options

Parameters
array$options
Returns
Zend_Controller_Plugin_ErrorHandler
setErrorHandlerAction (   $action)

Set the action name for the error handler.

Parameters
string$action
Returns
Zend_Controller_Plugin_ErrorHandler
setErrorHandlerController (   $controller)

Set the controller name for the error handler.

Parameters
string$controller
Returns
Zend_Controller_Plugin_ErrorHandler
setErrorHandlerModule (   $module)

Set the module name for the error handler.

Parameters
string$module
Returns
Zend_Controller_Plugin_ErrorHandler

Member Data Documentation

$_errorAction = 'error'
protected
$_errorController = 'error'
protected
$_errorModule
protected
$_exceptionCountAtFirstEncounter = 0
protected
$_isInsideErrorHandlerLoop = false
protected
const EXCEPTION_NO_ACTION = 'EXCEPTION_NO_ACTION'

Const - No action exception; controller exists, but action does not.

const EXCEPTION_NO_CONTROLLER = 'EXCEPTION_NO_CONTROLLER'

Const - No controller exception; controller does not exist.

const EXCEPTION_NO_ROUTE = 'EXCEPTION_NO_ROUTE'

Const - No route exception; no routing was possible.

const EXCEPTION_OTHER = 'EXCEPTION_OTHER'

Const - Other Exception; exceptions thrown by application controllers.