HTML_Progress
[ class tree: HTML_Progress ] [ index: HTML_Progress ] [ all elements ]
Prev Next
HTML_Progress::setUI
sets the new instance of HTML_Progress_UI object

Synopsis

require_once 'HTML/Progress.php';

void HTML_Progress::setUI( string $ui)

Description

This method is used to set the new instance of HTML_Progress_UI object used to manage graphical properties.

$ui is the name of a class (that must exists) which inherit from HTML_Progress_UI.

Parameter

    string $ui
  • a classname that will replace the default HTML_Progress_UI object.

Throws

Possible PEAR_Error values

Error level Error code Error message Solution
error HTML_PROGRESS_ERROR_INVALID_INPUT invalid input, parameter #1 "$ui" was expecting "class defined" Defines the new class
error HTML_PROGRESS_ERROR_INVALID_INPUT invalid input, parameter #1 "$ui" was expecting "HTML_Progress_UI extends" Fixed the inheritance of the new class

Note

( HTML_Progress >= 1.0 )

This function can not be called statically.

See

HTML_Progress::getUI

Example

  1. <?php
  2. require_once 'HTML/Progress.php';
  3.  
  4. class Progress_ITDynamic extends HTML_Progress_UI
  5. {
  6. function Progress_ITDynamic()
  7. {
  8. parent::HTML_Progress_UI();
  9. $this->setCellCount(20);
  10. $this->setProgressAttributes('background-color=#EEE');
  11. $this->setStringAttributes('background-color=#EEE color=navy');
  12. $this->setCellAttributes('inactive-color=#FFF active-color=#444444');
  13. }
  14. }
  15.  
  16. $bar = new HTML_Progress();
  17. $bar->setUI('Progress_ITDynamic');
  18. $ui =& $bar->getUI();
  19.  
  20. print_r($ui);
  21. ?>

Prev Up Next
HTML_Progress::getUI Reference Guide HTML_Progress::setModel

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