HTML_Progress::setUI

HTML_Progress

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

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

    class Progress_ITDynamic extends HTML_Progress_UI
    {
        function Progress_ITDynamic()
        {
            parent::HTML_Progress_UI();

            $this->setCellCount(20);
            $this->setProgressAttributes('background-color=#EEE');
            $this->setStringAttributes('background-color=#EEE color=navy');
            $this->setCellAttributes('inactive-color=#FFF active-color=#444444');
        }
    }

    $bar = new HTML_Progress();
    $bar->setUI('Progress_ITDynamic');
    $ui =& $bar->getUI();

    print_r($ui);
    ?>
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