本文整理汇总了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;
//.........这里部分代码省略.........