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

Class: HTML_Progress_Monitor

Source Location: /HTML_Progress-1.2.6/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: 1.2.6

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.



[ Top ]


Class Variables

$buttonCancel =

[line 69]

Attributes of monitor form.
  • Since: 1.1
  • Access: public

Type:   string


[ Top ]

$buttonStart =

[line 68]

Attributes of monitor form.
  • Since: 1.1
  • Access: public

Type:   string


[ Top ]

$windowname =

[line 67]

Attributes of monitor form.
  • Since: 1.1
  • Access: public

Type:   string


[ Top ]



Method Detail

HTML_Progress_Monitor (Constructor)   [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);

  • Since: 1.0
  • Throws: HTML_PROGRESS_ERROR_INVALID_INPUT
  • Access: public

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 ]

accept   [line 366]

void accept( &$renderer, object $renderer)

Accepts a renderer
  • Since: 1.1
  • Access: public

Parameters:

object   $renderer   —  An HTML_QuickForm_Renderer object
   &$renderer   — 

[ Top ]

callProgressHandler   [line 221]

void callProgressHandler( integer $arg)

Calls a user-defined progress handler function.
  • Deprecated:
  • Since: 1.1
  • Access: public

Parameters:

integer   $arg   —  Current value of the progress bar.

[ Top ]

getProgressElement   [line 301]

object &getProgressElement( )

Returns a reference to the progress bar object used with the monitor.

[ Top ]

getScript   [line 325]

string getScript( )

Returns progress javascript.
  • Since: 1.0
  • Access: public

[ Top ]

getStyle   [line 313]

string getStyle( )

Returns progress styles (StyleSheet).
  • Since: 1.0
  • Access: public

[ Top ]

isCanceled   [line 246]

bool isCanceled( )

Returns TRUE if progress was canceled by user, FALSE otherwise.
  • Since: 1.0
  • Access: public

[ Top ]

isStarted   [line 233]

bool isStarted( )

Returns TRUE if progress was started by user, FALSE otherwise.
  • Since: 1.1
  • Access: public

[ Top ]

notify   [line 184]

void notify( mixed $event)

Listens all progress events from this monitor.

Parameters:

mixed   $event   —  A hash describing the progress event.

[ Top ]

run   [line 259]

void run( )

Display Monitor and catch user action (cancel button).
  • Since: 1.0
  • Access: public

[ Top ]

setCaption   [line 398]

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%

  • Since: 1.1
  • Access: public

Parameters:

string   $caption   —  (optional) message template
array   $args   —  (optional) associative array of template var -> message text

[ Top ]

setProgressElement   [line 277]

void setProgressElement( object $bar)

Attach a progress bar to this monitor.

Parameters:

object   $bar   —  a html_progress instance

[ Top ]

setProgressHandler   [line 199]

void setProgressHandler( mixed $handler)

Sets a user-defined progress handler function.

Parameters:

mixed   $handler   —  Name of function or a class-method.

[ Top ]

toHtml   [line 352]

string toHtml( )

Returns Monitor forms as a Html string.
  • Since: 1.0
  • Access: public

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:24:46 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.