PEAR Progress2 logo

HTML_Progress2 : The Definitive Guide

Configuring a Handler

A error handler's configuration is determined by the arguments used in its construction. Here's an overview of these parameters.

require_once 'HTML/Progress2.php';

$errorConf = array('error_handler' => 'myErrorHandler',
                   'push_callback' => 'myError',
                   // ... more options
                  );
$meter = new HTML_Progress2($errorConf);
   

Table 13.1. Error Handler configuration parameters

Option Type Description
error_handler callback A valid callback (function) to manage errors raised by the HTML_Progress2::raiseError() method. Default is: HTML_Progress2::_errorHandler
push_callback callback A valid callback (function) that decides to following action. Default return: PEAR_ERROR_DIE if exception, NULL otherwise.
message_callback callback A valid callback (function) to control message generation. Default is: HTML_Progress2_Error::_msgCallback
context_callback callback A valid callback (function) to control error context generation. Default is: HTML_Progress2_Error::getBacktrace
handler mixed any handler-specific settings

HTML_Progress2 : The Definitive Guide v 1.0.0 : September 23, 2005