Docs For Class HTML_Progress_Monitor

HTML_Progress

# Class: HTML_Progress_Monitor Source Location: /Progress/monitor.php
### Class Overview
| ### Variables $buttonCancel $buttonStart $windowname | ### Methods HTML_Progress_Monitor accept callProgressHandler getProgressElement getScript getStyle isCanceled isStarted notify run setCaption setProgressElement setProgressHandler toHtml
### Class Details [line 35] [ Top ] ### Class Variables #### $buttonCancel = [line 55] Attributes of monitor form. #### Tags:
access: | public
since: | 1.1
Type: | string
[ Top ] #### $buttonStart = [line 54] Attributes of monitor form. #### Tags:
access: | public
since: | 1.1
Type: | string
[ Top ] #### $windowname = [line 53] Attributes of monitor form. #### Tags:
access: | public
since: | 1.1
Type: | string
[ Top ] ### Class Methods ### constructor HTML_Progress_Monitor [line 117]
`HTML_Progress_Monitor HTML_Progress_Monitor( [string $formName = 'ProgressMonitor'], [array $attributes = array()], [array $errorPrefs = array()])`
- Constructor Summary Creates a standard progress bar into a dialog box (QuickForm). Form name, buttons 'start', 'cancel' labels and style, and title of dialog box may also be changed.
         $monitor = new HTML_Progress_Monitor();
- Creates a progress bar into a dialog box, with only a new form name.
         $monitor = new HTML_Progress_Monitor($formName);
- Creates a progress bar into a dialog box, with a new form name, new buttons name and style, and also a different title box.
         $monitor = new HTML_Progress_Monitor($formName, $attributes);
#### Tags:
throws: | HTML_PROGRESS_ERROR_INVALID_INPUT
access: | public
since: | 1.0
#### Parameters:
string | $formName | (optional) Name of monitor dialog box (QuickForm)
array | $attributes | (optional) List of renderer options
array | $errorPrefs | (optional) Hash of params to configure error handler
[ Top ] ### method accept [line 378]
`void accept( object &$renderer)`
Accepts a renderer #### Tags:
access: | public
since: | 1.1
#### Parameters:
object | $renderer | An HTML_QuickForm_Renderer object
[ Top ] ### method callProgressHandler [line 242]
`void callProgressHandler( integer $arg)`
Calls a user-defined progress handler function. #### Tags:
see: | HTML_Progress_Monitor::setProgressHandler(), HTML_Progress_Monitor::notify()
access: | public
since: | 1.1
#### Parameters:
integer | $arg | Current value of the progress bar.
[ Top ] ### method getProgressElement [line 327]
`object &getProgressElement( )`
Returns a reference to the progress bar object used with the monitor. #### Tags:
see: | HTML_Progress_Monitor::setProgressElement()
access: | public
since: | 1.1
[ Top ] ### method getScript [line 351]
`string getScript( )`
Returns progress javascript. #### Tags:
access: | public
since: | 1.0
[ Top ] ### method getStyle [line 339]
`string getStyle( )`
Returns progress styles (StyleSheet). #### Tags:
access: | public
since: | 1.0
[ Top ] ### method isCanceled [line 271]
`bool isCanceled( )`
Returns TRUE if progress was canceled by user, FALSE otherwise. #### Tags:
access: | public
since: | 1.0
[ Top ] ### method isStarted [line 258]
`bool isStarted( )`
Returns TRUE if progress was started by user, FALSE otherwise. #### Tags:
access: | public
since: | 1.1
[ Top ] ### method notify [line 178]
`void notify( mixed $event)`
Listens all progress events from this monitor. #### Tags:
see: | HTML_Progress::process()
throws: | HTML_PROGRESS_ERROR_INVALID_INPUT
access: | public
since: | 1.0
#### Parameters:
mixed | $event | A hash describing the progress event.
[ Top ] ### method run [line 284]
`void run( )`
Display Monitor and catch user action (cancel button). #### Tags:
access: | public
since: | 1.0
[ Top ] ### method setCaption [line 410]
`void setCaption( [string $caption = ' '], [array $args = array()])`
Display a caption on action in progress. The idea of a simple utility function for replacing variables with values in an message template, come from sprintfErrorMessage function of Error_Raise package by Greg Beaver. This simple str_replace-based function can be used to have an order-independent sprintf, so messages can be passed in with different grammar ordering, or other possibilities without changing the source code. Variables should simply be surrounded by % as in %varname% #### Tags:
access: | public
since: | 1.1
#### Parameters:
string | $caption | (optional) message template
array | $args | (optional) associative array of template var -> message text
[ Top ] ### method setProgressElement [line 302]
`void setProgressElement( object $bar)`
Attach a progress bar to this monitor. #### Tags:
see: | HTML_Progress_Monitor::getProgressElement()
throws: | HTML_PROGRESS_ERROR_INVALID_INPUT
access: | public
since: | 1.1
#### Parameters:
object | $bar | a html_progress instance
[ Top ] ### method setProgressHandler [line 217]
`void setProgressHandler( mixed $handler)`
Sets a user-defined progress handler function. #### Tags:
see: | HTML_Progress::setProgressHandler()
throws: | HTML_PROGRESS_ERROR_INVALID_CALLBACK
access: | public
since: | 1.1
#### Parameters:
mixed | $handler | Name of function or a class-method.
[ Top ] ### method toHtml [line 364]
`string toHtml( )`
Returns Monitor forms as a Html string. #### Tags:
access: | public
since: | 1.0
[ Top ] Documentation generated on Sun, 12 Sep 2004 20:23:41 +0200 by phpDocumentor 1.3.0RC3