HTML_Progress
[ class tree: HTML_Progress ] [ index: HTML_Progress ] [ all elements ]

Class: HTML_Progress_Monitor

Source Location: /Progress/monitor.php

Class Overview


The HTML_Progress_Monitor class allow an easy way to display progress in a dialog. The user can cancel the task.


Author(s):

Version:

  • Release: @package_version@

Copyright:

  • 1997-2005 The PHP Group

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 49]
The HTML_Progress_Monitor class allow an easy way to display progress in a dialog. The user can cancel the task.

PHP versions 4 and 5

LICENSE: This source file is subject to version 3.0 of the PHP license that is available through the world-wide-web at the following URI: http://www.php.net/license/3_0.txt. If you did not receive a copy of the PHP License and are unable to obtain it through the web, please send a note to license@php.net so we can mail you a copy immediately.




Tags:

link:  http://pear.php.net/package/HTML_Progress
version:  Release: @package_version@
license:  PHP License 3.0
copyright:  1997-2005 The PHP Group
author:  Laurent Laville <mailto:pear@laurent-laville.org>


[ Top ]


Class Variables

$buttonCancel =

[line 69]

Attributes of monitor form.



Tags:

access:  public
since:  1.1

Type:   string


[ Top ]

$buttonStart =

[line 68]

Attributes of monitor form.



Tags:

access:  public
since:  1.1

Type:   string


[ Top ]

$windowname =

[line 67]

Attributes of monitor form.



Tags:

access:  public
since:  1.1

Type:   string


[ Top ]



Class Methods


constructor HTML_Progress_Monitor [line 121]

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.

    1 $monitor = new HTML_Progress_Monitor();
  • Creates a progress bar into a dialog box, with only a new form name.

    1 $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.

    1 $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 352]

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 221]

void callProgressHandler( integer $arg)

Calls a user-defined progress handler function.



Tags:

deprecated:  
access:  public
since:  1.1


Parameters:

integer   $arg   Current value of the progress bar.

[ Top ]

method getProgressElement [line 301]

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 325]

string getScript( )

Returns progress javascript.



Tags:

access:  public
since:  1.0


[ Top ]

method getStyle [line 313]

string getStyle( )

Returns progress styles (StyleSheet).



Tags:

access:  public
since:  1.0


[ Top ]

method isCanceled [line 246]

bool isCanceled( )

Returns TRUE if progress was canceled by user, FALSE otherwise.



Tags:

access:  public
since:  1.0


[ Top ]

method isStarted [line 233]

bool isStarted( )

Returns TRUE if progress was started by user, FALSE otherwise.



Tags:

access:  public
since:  1.1


[ Top ]

method notify [line 184]

void notify( mixed $event)

Listens all progress events from this monitor.



Tags:

deprecated:  
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 259]

void run( )

Display Monitor and catch user action (cancel button).



Tags:

access:  public
since:  1.0


[ Top ]

method setCaption [line 384]

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 277]

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 199]

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 338]

string toHtml( )

Returns Monitor forms as a Html string.



Tags:

access:  public
since:  1.0


[ Top ]


Documentation generated on Sun, 25 Sep 2005 17:25:34 +0200 by phpDocumentor 1.2.3