本文整理匯總了PHP中HTML_Progress::_initErrorhandler方法的典型用法代碼示例。如果您正苦於以下問題:PHP HTML_Progress::_initErrorhandler方法的具體用法?PHP HTML_Progress::_initErrorhandler怎麽用?PHP HTML_Progress::_initErrorhandler使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類HTML_Progress
的用法示例。
在下文中一共展示了HTML_Progress::_initErrorhandler方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: HTML_Progress
/**
* Constructor Summary
*
* o Creates a natural horizontal progress bar that displays ten cells/units
* with no border and no progress string.
* The initial and minimum values are 0, and the maximum is 100.
* <code>
* $bar = new HTML_Progress();
* </code>
*
* o Creates a natural progress bar with the specified orientation, which can be
* either HTML_PROGRESS_BAR_HORIZONTAL or HTML_PROGRESS_BAR_VERTICAL
* By default, no border and no progress string are painted.
* The initial and minimum values are 0, and the maximum is 100.
* <code>
* $bar = new HTML_Progress($orient);
* </code>
*
* o Creates a natural horizontal progress bar with the specified minimum and
* maximum. Sets the initial value of the progress bar to the specified
* minimum, and the maximum that the progress bar can reach.
* By default, no border and no progress string are painted.
* <code>
* $bar = new HTML_Progress($min, $max);
* </code>
*
* o Creates a natural horizontal progress bar with the specified orientation,
* minimum and maximum. Sets the initial value of the progress bar to the
* specified minimum, and the maximum that the progress bar can reach.
* By default, no border and no progress string are painted.
* <code>
* $bar = new HTML_Progress($orient, $min, $max);
* </code>
*
* o Creates a natural horizontal progress that uses the specified model
* to hold the progress bar's data.
* By default, no border and no progress string are painted.
* <code>
* $bar = new HTML_Progress($model);
* </code>
*
*
* @param object $model (optional) Model that hold the progress bar's data
* @param int $orient (optional) Orientation of progress bar
* @param int $min (optional) Minimum value of progress bar
* @param int $max (optional) Maximum value of progress bar
* @param array $errorPrefs (optional) Always last argument of class constructor.
* hash of params to configure PEAR_ErrorStack and loggers
*
* @since 1.0
* @access public
* @throws HTML_PROGRESS_ERROR_INVALID_INPUT
* @see setIndeterminate(),
* setBorderPainted(), setStringPainted(), setString(),
* setDM(), setUI(), setIdent()
*/
function HTML_Progress()
{
$args = func_get_args();
$num_args = func_num_args();
if ($num_args > 0) {
$errorPrefs = func_get_arg($num_args - 1);
if (!is_array($errorPrefs)) {
$errorPrefs = array();
} else {
$num_args--;
}
HTML_Progress::_initErrorHandler($errorPrefs);
} else {
HTML_Progress::_initErrorhandler();
}
$this->_listeners = array();
// none listeners by default
$this->_DM = new HTML_Progress_DM();
// new instance of a progress DataModel
$this->_UI = new HTML_Progress_UI();
// new instance of a progress UserInterface
switch ($num_args) {
case 1:
if (is_object($args[0]) && is_a($args[0], 'html_progress_dm')) {
/* object html_progress_dm extends */
$this->_DM =& $args[0];
} elseif (is_int($args[0])) {
/* int orient */
$this->_UI->setOrientation($args[0]);
} else {
return HTML_Progress::raiseError(HTML_PROGRESS_ERROR_INVALID_INPUT, 'exception', array('var' => '$model | $orient', 'was' => gettype($args[0]) == 'object' ? get_class($args[0]) . ' object' : gettype($args[0]), 'expected' => 'html_progress_dm object | integer', 'paramnum' => 1));
}
break;
case 2:
/* int min, int max */
if (!is_int($args[0])) {
return HTML_Progress::raiseError(HTML_PROGRESS_ERROR_INVALID_INPUT, 'exception', array('var' => '$min', 'was' => $args[0], 'expected' => 'integer', 'paramnum' => 1));
} elseif (!is_int($args[1])) {
return HTML_Progress::raiseError(HTML_PROGRESS_ERROR_INVALID_INPUT, 'exception', array('var' => '$max', 'was' => $args[1], 'expected' => 'integer', 'paramnum' => 2));
} else {
$this->_DM->setMinimum($args[0]);
$this->_DM->setMaximum($args[1]);
}
break;
//.........這裏部分代碼省略.........