HTML_Progress::setMaximum

HTML_Progress

Prev |  | Next
HTML_Progress::setMaximum sets the new progress meter maximum value ## Synopsis require_once 'HTML/Progress.php'; void HTML_Progress::setMaximum( integer $max) ## Description This method is used to set the maximal value in the mathematical model of the progress meter. ## Parameter integer $max the new progress meter maximum value. ## Throws

Possible PEAR_Error values

Error level | Error code | Error message | Solution
exception | HTML_PROGRESS_ERROR_INVALID_INPUT | invalid input, parameter #1 "$max" was expecting "integer" | Fixed the cast of parameter
error | HTML_PROGRESS_ERROR_INVALID_INPUT | invalid input, parameter #1 "$max" was expecting "positive" | Give an integer greater than zero
error | HTML_PROGRESS_ERROR_INVALID_INPUT | invalid input, parameter #1 "$max" was expecting "greater than min" | Give an integer greater than min. value
## Note ( HTML_Progress >= 1.0 )
| This function can not be called statically.
| If the maximum value is less than current value, then the current value is set to this maximum.
| This method is also a wrapper for HTML_Progress_DM::setMaximum.
## See HTML_Progress::getMaximum ## Example

    <?php
    require_once 'HTML/Progress.php';

    $bar = new HTML_Progress();

    $bar->setMaximum(80);
    printf('direct way: maximum = %d <br/>', $bar->getMaximum());

    $dm =& $bar->getDM();
    $dm->setMaximum(80);
    printf('another way: maximum = %d <br/>', $dm->getMaximum());
    ?>
Prev | Up | Next
HTML_Progress::getMaximum | Reference Guide | HTML_Progress::getMinimum
Documentation generated on Sun, 12 Sep 2004 20:23:16 +0200 by phpDocumentor 1.3.0RC3