Docs For Class HTML_Progress

HTML_Progress

# Class: HTML_Progress Source Location: /Progress.php
### Class Overview
| ### Methods HTML_Progress addListener apiVersion display getAnimSpeed getDM getError getIdent getIncrement getListeners getMaximum getMinimum getPercentComplete getScript getString getStyle getUI getValue hasErrors hide incValue isBorderPainted isIndeterminate isStringPainted process raiseError removeListener run setAnimSpeed setBorderPainted setDM setIdent setIncrement setIndeterminate setMaximum setMinimum setModel setProgressHandler setString setStringPainted setUI setValue sleep toArray toHtml
### Class Details [line 207] [ Top ] ### Class Methods ### constructor HTML_Progress [line 382]
`HTML_Progress HTML_Progress( object $model, int $orient, int $min, int $max, array $errorPrefs)`
- Constructor Summary 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.
         $bar = new HTML_Progress();
- 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.
         $bar = new HTML_Progress($orient);
- 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.
         $bar = new HTML_Progress($min, $max);
- 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.
         $bar = new HTML_Progress($orient, $min, $max);
- 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.
         $bar = new HTML_Progress($model);
#### Tags:
see: | HTML_Progress::setIndeterminate(), HTML_Progress::setBorderPainted(), HTML_Progress::setStringPainted(), HTML_Progress::setString(), HTML_Progress::setDM(), HTML_Progress::setUI(), HTML_Progress::setIdent()
throws: | HTML_PROGRESS_ERROR_INVALID_INPUT
access: | public
since: | 1.0
#### Parameters:
object | $model | (optional) Model that hold the progress bar's data
int | $orient | (optional) Orientation of progress bar
int | $min | (optional) Minimum value of progress bar
int | $max | (optional) Maximum value of progress bar
array | $errorPrefs | (optional) Always last argument of class constructor. hash of params to configure PEAR_ErrorStack and loggers
[ Top ] ### method addListener [line 1503]
`boolean addListener( object $observer)`
Adds a HTML_Progress_Observer instance to the list of observers that are listening for messages emitted by this HTML_Progress instance. #### Tags:
return: | True if the observer is successfully attached.
tutorial: | HTML_Progress::addListener
see: | HTML_Progress::getListeners(), HTML_Progress::removeListener()
access: | public
since: | 1.0
#### Parameters:
object | $observer | The HTML_Progress_Observer instance to attach as a listener.
[ Top ] ### method apiVersion [line 491]
`float apiVersion( )`
Returns the current API version #### Tags:
access: | public
since: | 0.1
[ Top ] ### method display [line 1291]
`void display( )`
Renders the new value of progress bar. #### Tags:
access: | public
since: | 0.2
[ Top ] ### method getAnimSpeed [line 1055]
`integer getAnimSpeed( )`
Returns delay execution of the progress bar #### Tags:
tutorial: | HTML_Progress::getAnimSpeed
see: | HTML_Progress::setAnimSpeed()
access: | public
since: | 1.2.0RC1
[ Top ] ### method getDM [line 669]
`object &getDM( )`
Returns the data model used by this progress bar. #### Tags:
see: | HTML_Progress::setDM()
access: | public
since: | 1.0
[ Top ] ### method getError [line 2250]
`false|array getError( )`
Pop an error off of the HTML_Progress stack #### Tags:
see: | HTML_Progress::hasErrors(), HTML_Progress::raiseError()
static: |
access: | public
since: | 1.2.0RC3
[ Top ] ### method getIdent [line 1453]
`string getIdent( )`
Returns the current identification string. #### Tags:
return: | current Progress instance's identification string
see: | HTML_Progress::setIdent()
access: | public
since: | 1.0
[ Top ] ### method getIncrement [line 800]
`integer getIncrement( )`
Returns the progress bar's increment value stored in the progress bar's data model. The default value is +1. #### Tags:
tutorial: | HTML_Progress::getIncrement
see: | HTML_Progress::setIncrement(), HTML_Progress_DM::getIncrement()
access: | public
since: | 1.0
[ Top ] ### method getListeners [line 1485]
`array getListeners( )`
Returns an array of all the listeners added to this progress bar. #### Tags:
tutorial: | HTML_Progress::getListeners
see: | HTML_Progress::addListener(), HTML_Progress::removeListener()
access: | public
since: | 1.0
[ Top ] ### method getMaximum [line 759]
`integer getMaximum( )`
Returns the progress bar's maximum value stored in the progress bar's data model. The default value is 100. #### Tags:
tutorial: | HTML_Progress::getMaximum
see: | HTML_Progress::setMaximum(), HTML_Progress_DM::getMaximum()
access: | public
since: | 1.0
[ Top ] ### method getMinimum [line 718]
`integer getMinimum( )`
Returns the progress bar's minimum value stored in the progress bar's data model. The default value is 0. #### Tags:
tutorial: | HTML_Progress::getMinimum
see: | HTML_Progress::setMinimum(), HTML_Progress_DM::getMinimum()
access: | public
since: | 1.0
[ Top ] ### method getPercentComplete [line 893]
`float getPercentComplete( )`
Returns the percent complete for the progress bar. Note that this number is between 0.00 and 1.00. #### Tags:
tutorial: | HTML_Progress::getPercentComplete
see: | HTML_Progress::getValue(), HTML_Progress::getMaximum(), HTML_Progress_DM::getPercentComplete()
access: | public
since: | 1.0
[ Top ] ### method getScript [line 1128]
`string getScript( )`
Get the javascript code to manage progress bar. #### Tags:
return: | JavaScript URL or inline code to manage progress bar
tutorial: | HTML_Progress_UI::getScript
see: | HTML_Progress_UI::getScript()
access: | public
since: | 1.0
[ Top ] ### method getString [line 632]
`string getString( )`
Returns the current value of the progress string. By default, the progress bar displays the value returned by getPercentComplete() method formatted as a percent such as 33%. #### Tags:
tutorial: | HTML_Progress::getString
see: | HTML_Progress::setString(), HTML_Progress::isStringPainted()
access: | public
since: | 1.0
[ Top ] ### method getStyle [line 1107]
`string getStyle( )`
Get the cascading style sheet to put inline on HTML document #### Tags:
tutorial: | HTML_Progress_UI::getStyle
see: | HTML_Progress_UI::getStyle()
access: | public
since: | 1.0
[ Top ] ### method getUI [line 906]
`object &getUI( )`
Returns the look-and-feel object that renders the progress bar. #### Tags:
see: | HTML_Progress::setUI()
access: | public
since: | 1.0
[ Top ] ### method getValue [line 835]
`integer getValue( )`
Returns the progress bar's current value, which is stored in the progress bar's data model. The value is always between the minimum and maximum values, inclusive. By default, the value is initialized to be equal to the minimum value. #### Tags:
tutorial: | HTML_Progress::getValue
see: | HTML_Progress::setValue(), HTML_Progress::incValue(), HTML_Progress_DM::getValue()
access: | public
since: | 1.0
[ Top ] ### method hasErrors [line 2236]
`integer hasErrors( )`
Determine whether there are errors into the HTML_Progress stack #### Tags:
see: | HTML_Progress::getError(), HTML_Progress::raiseError()
static: |
access: | public
since: | 1.2.0RC3
[ Top ] ### method hide [line 1337]
`void hide( )`
Hides the progress bar. #### Tags:
access: | public
since: | 1.2.0RC3
[ Top ] ### method incValue [line 876]
`void incValue( )`
Updates the progress bar's current value by adding increment value. All change listeners are notified. #### Tags:
tutorial: | HTML_Progress::incValue
see: | HTML_Progress::getValue(), HTML_Progress::setValue(), HTML_Progress_DM::incValue()
access: | public
since: | 1.0
[ Top ] ### method isBorderPainted [line 548]
`boolean isBorderPainted( )`
Determines whether the progress bar border is painted or not. The default is false. #### Tags:
tutorial: | HTML_Progress::isBorderPainted
see: | HTML_Progress::setBorderPainted()
access: | public
since: | 1.0
[ Top ] ### method isIndeterminate [line 505]
`boolean isIndeterminate( )`
Returns mode of the progress bar (determinate or not). #### Tags:
tutorial: | HTML_Progress::isIndeterminate
see: | HTML_Progress::setIndeterminate()
access: | public
since: | 1.0
[ Top ] ### method isStringPainted [line 591]
`boolean isStringPainted( )`
Determines whether the progress bar string is painted or not. The default is false. The progress bar displays the value returned by getPercentComplete() method formatted as a percent such as 33%. #### Tags:
tutorial: | HTML_Progress::isStringPainted
see: | HTML_Progress::setStringPainted(), HTML_Progress::setString()
access: | public
since: | 1.0
[ Top ] ### method process [line 1409]
`void process( )`
Performs the progress actions #### Tags:
see: | HTML_Progress::sleep()
access: | public
since: | 1.2.0RC3
[ Top ] ### method raiseError [line 2167]
`NULL|PEAR_Error raiseError( integer $code, string $level, array $params)`
Add an error to the stack #### Tags:
return: | PEAR_Error instance, with context info if PHP 4.3.0+
see: | HTML_Progress::hasErrors(), HTML_Progress::getError()
static: |
access: | public
since: | 1.2.0RC1
#### Parameters:
integer | $code | Error code.
string | $level | The error level of the message.
array | $params | Associative array of error parameters
[ Top ] ### method removeListener [line 1525]
`boolean removeListener( object $observer)`
Removes a HTML_Progress_Observer instance from the list of observers. #### Tags:
return: | True if the observer is successfully detached.
tutorial: | HTML_Progress::removeListener
see: | HTML_Progress::getListeners(), HTML_Progress::addListener()
access: | public
since: | 1.0
#### Parameters:
object | $observer | The HTML_Progress_Observer instance to detach from the list of listeners.
[ Top ] ### method run [line 1429]
`void run( )`
Runs the progress bar (both modes: indeterminate and determinate), and execute all actions defined in user callback identified by method setProgressHandler. #### Tags:
see: | HTML_Progress::process(), HTML_Progress::setProgressHandler()
access: | public
since: | 1.2.0RC3
[ Top ] ### method setAnimSpeed [line 1072]
`void setAnimSpeed( integer $delay)`
Set the delays progress bar execution for the given number of miliseconds. #### Tags:
tutorial: | HTML_Progress::setAnimSpeed
see: | HTML_Progress::getAnimSpeed()
throws: | HTML_PROGRESS_ERROR_INVALID_INPUT
access: | public
since: | 1.1
#### Parameters:
integer | $delay | Delay in milisecond.
[ Top ] ### method setBorderPainted [line 566]
`void setBorderPainted( boolean $paint)`
Sets the value of $_paintBorder property, which determines whether the progress bar should paint its border. The default is false. #### Tags:
tutorial: | HTML_Progress::setBorderPainted
see: | HTML_Progress::isBorderPainted()
throws: | HTML_PROGRESS_ERROR_INVALID_INPUT
access: | public
since: | 1.0
#### Parameters:
boolean | $paint | whether the progress bar should paint its border
[ Top ] ### method setDM [line 685]
`void setDM( string $model)`
Sets the data model used by this progress bar. #### Tags:
see: | HTML_Progress::getDM()
throws: | HTML_PROGRESS_ERROR_INVALID_INPUT
access: | public
since: | 1.0
#### Parameters:
string | $model | class name of a html_progress_dm extends object
[ Top ] ### method setIdent [line 1467]
`void setIdent( [mixed $ident = null])`
Sets this Progress instance's identification string. #### Tags:
see: | HTML_Progress::getIdent()
access: | public
since: | 1.0
#### Parameters:
mixed | $ident | (optional) the new identification string.
[ Top ] ### method setIncrement [line 817]
`void setIncrement( integer $inc)`
Sets the progress bar's increment value stored in the progress bar's data model. #### Tags:
tutorial: | HTML_Progress::setIncrement
see: | HTML_Progress::getIncrement(), HTML_Progress_DM::setIncrement()
access: | public
since: | 1.0
#### Parameters:
integer | $inc | progress bar's increment value
[ Top ] ### method setIndeterminate [line 526]
`void setIndeterminate( boolean $continuous)`
Sets the $_indeterminate property of the progress bar, which determines whether the progress bar is in determinate or indeterminate mode. An indeterminate progress bar continuously displays animation indicating that an operation of unknown length is occuring. By default, this property is false. #### Tags:
tutorial: | HTML_Progress::setIndeterminate
see: | HTML_Progress::isIndeterminate()
throws: | HTML_PROGRESS_ERROR_INVALID_INPUT
access: | public
since: | 1.0
#### Parameters:
boolean | $continuous | whether countinuously displays animation
[ Top ] ### method setMaximum [line 778]
`void setMaximum( integer $max)`
Sets the progress bar's maximum value stored in the progress bar's data model. If the maximum value is different from previous maximum, all change listeners are notified. #### Tags:
tutorial: | HTML_Progress::setMaximum
see: | HTML_Progress::getMaximum(), HTML_Progress_DM::setMaximum()
access: | public
since: | 1.0
#### Parameters:
integer | $max | progress bar's maximal value
[ Top ] ### method setMinimum [line 737]
`void setMinimum( integer $min)`
Sets the progress bar's minimum value stored in the progress bar's data model. If the minimum value is different from previous minimum, all change listeners are notified. #### Tags:
tutorial: | HTML_Progress::setMinimum
see: | HTML_Progress::getMinimum(), HTML_Progress_DM::setMinimum()
access: | public
since: | 1.0
#### Parameters:
integer | $min | progress bar's minimal value
[ Top ] ### method setModel [line 957]
`void setModel( string $file, string $type)`
Sets the look-and-feel model that renders the progress bar. #### Tags:
tutorial: | HTML_Progress::setModel
see: | HTML_Progress::setUI()
throws: | HTML_PROGRESS_ERROR_INVALID_INPUT
access: | public
since: | 1.0
#### Parameters:
string | $file | file name of model properties
string | $type | type of external ressource (phpArray, iniFile, XML ...)
[ Top ] ### method setProgressHandler [line 1389]
`void setProgressHandler( mixed $handler)`
Sets the user callback function that execute all actions pending progress #### Tags:
see: | HTML_Progress::process()
throws: | HTML_PROGRESS_ERROR_INVALID_CALLBACK
access: | public
since: | 1.2.0RC3
#### Parameters:
mixed | $handler | Name of function or a class-method.
[ Top ] ### method setString [line 656]
`void setString( string $str)`
Sets the current value of the progress string. By default, this string is null. If you have provided a custom progress string and want to revert to the built-in-behavior, set the string back to null. The progress string is painted only if the isStringPainted() method returns true. #### Tags:
tutorial: | HTML_Progress::setString
see: | HTML_Progress::getString(), HTML_Progress::isStringPainted(), HTML_Progress::setStringPainted()
access: | public
since: | 1.0
#### Parameters:
string | $str | progress string
[ Top ] ### method setStringPainted [line 609]
`void setStringPainted( boolean $paint)`
Sets the value of $_paintString property, which determines whether the progress bar should render a progress string. The default is false. #### Tags:
tutorial: | HTML_Progress::setStringPainted
see: | HTML_Progress::isStringPainted(), HTML_Progress::setString()
throws: | HTML_PROGRESS_ERROR_INVALID_INPUT
access: | public
since: | 1.0
#### Parameters:
boolean | $paint | whether the progress bar should render a string
[ Top ] ### method setUI [line 922]
`void setUI( string $ui)`
Sets the look-and-feel object that renders the progress bar. #### Tags:
see: | HTML_Progress::getUI()
throws: | HTML_PROGRESS_ERROR_INVALID_INPUT
access: | public
since: | 1.0
#### Parameters:
string | $ui | class name of a html_progress_ui extends object
[ Top ] ### method setValue [line 854]
`void setValue( integer $val)`
Sets the progress bar's current value stored in the progress bar's data model. If the new value is different from previous value, all change listeners are notified. #### Tags:
tutorial: | HTML_Progress::setValue
see: | HTML_Progress::getValue(), HTML_Progress::incValue(), HTML_Progress_DM::setValue()
access: | public
since: | 1.0
#### Parameters:
integer | $val | progress bar's current value
[ Top ] ### method sleep [line 1366]
`void sleep( )`
Default user callback when none are defined. Delay execution of progress meter for the given number of milliseconds. NOTE: The function http://www.php.net/manual/en/function.usleep.php did not work on Windows systems until PHP 5.0.0 #### Tags:
see: | HTML_Progress::getAnimSpeed(), HTML_Progress::setAnimSpeed(), HTML_Progress::process()
access: | public
since: | 1.2.0RC3
[ Top ] ### method toArray [line 1142]
`array toArray( )`
Returns the progress bar structure in an array. #### Tags:
return: | of progress bar properties
access: | public
since: | 1.0
[ Top ] ### method toHtml [line 1180]
`string toHtml( )`
Returns the progress structure as HTML. #### Tags:
return: | HTML Progress bar
access: | public
since: | 0.2
[ Top ] Documentation generated on Sun, 12 Sep 2004 20:23:42 +0200 by phpDocumentor 1.3.0RC3