HTML_Progress
[ class tree: HTML_Progress ] [ index: HTML_Progress ] [ all elements ]
Prev Next
HTML_Progress::setValue
sets the current progress meter value

Synopsis

require_once 'HTML/Progress.php';

void HTML_Progress::setValue( integer $val)

Description

This method is used to set the current value in the mathematical model of the progress meter.

Parameter

    integer $val
  • the new progress meter value.

Throws

Possible PEAR_Error values

Error level Error code Error message Solution
exception HTML_PROGRESS_ERROR_INVALID_INPUT invalid input, parameter #1 "$val" was expecting "integer" Fixed the cast of parameter
error HTML_PROGRESS_ERROR_INVALID_INPUT invalid input, parameter #1 "$val" was expecting "greater than min" Give an integer between min. and max. values
error HTML_PROGRESS_ERROR_INVALID_INPUT invalid input, parameter #1 "$val" was expecting "less than max" Give an integer between min. and max. values

Note

( HTML_Progress >= 1.0 )

This function can not be called statically.

This method is also a wrapper for HTML_Progress_DM::setValue.

See

HTML_Progress::getValue, HTML_Progress::incValue

Example

  1. <?php
  2. require_once 'HTML/Progress.php';
  3.  
  4. $bar = new HTML_Progress();
  5.  
  6. $bar->setValue(45);
  7. printf('direct way: value = %d <br/>', $bar->getValue());
  8.  
  9. $dm =& $bar->getDM();
  10. $dm->setValue(45);
  11. printf('another way: value = %d <br/>', $dm->getValue());
  12. ?>

Prev Up Next
HTML_Progress::getValue Reference Guide HTML_Progress::incValue

Documentation generated on Sun, 12 Sep 2004 20:23:17 +0200 by phpDocumentor 1.3.0RC3