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

Class: HTML_Progress_Monitor

Source Location: /HTML_Progress-1.2.0RC3/Progress/monitor.php

Class Overview




Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 35]


[ Top ]


Class Variables

$buttonCancel =

[line 55]

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

Type:   string


[ Top ]

$buttonStart =

[line 54]

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

Type:   string


[ Top ]

$windowname =

[line 53]

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

Type:   string


[ Top ]



Method Detail

HTML_Progress_Monitor (Constructor)   [line 125]

HTML_Progress_Monitor HTML_Progress_Monitor( [string $formName = 'ProgressMonitor'], [array $attributes = 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

[ Top ]

accept   [line 429]

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

void callProgressHandler( integer $arg)

Calls a user-defined progress handler function.
  • See: setProgressHandler(), notify()
  • Since: 1.1
  • Access: public

Parameters:

integer   $arg   —  Current value of the progress bar.

[ Top ]

getProgressElement   [line 367]

object &getProgressElement( )

Returns a reference to the progress bar object used with the monitor.
  • See: setProgressElement()
  • Since: 1.1
  • Access: public

[ Top ]

getScript   [line 391]

string getScript( )

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

[ Top ]

getStyle   [line 379]

string getStyle( )

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

[ Top ]

isCanceled   [line 311]

bool isCanceled( )

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

[ Top ]

isStarted   [line 298]

bool isStarted( )

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

[ Top ]

notify   [line 218]

void notify( mixed $event)

Listens all progress events from this monitor.
  • See: HTML_Progress::process()
  • Throws: HTML_PROGRESS_ERROR_INVALID_INPUT
  • Since: 1.0
  • Access: public

Parameters:

mixed   $event   —  A hash describing the progress event.

[ Top ]

run   [line 324]

void run( )

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

[ Top ]

setAnimSpeed   [line 197]

void setAnimSpeed( integer $delay)

Set the sleep delay in milisecond before each progress cells display.
  • Deprecated: use HTML_Progress::setAnimSpeed()
  • Throws: HTML_PROGRESS_DEPRECATED
  • Since: 1.1
  • Access: public

Parameters:

integer   $delay   —  Delay in milisecond.

[ Top ]

setCaption   [line 461]

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

void setProgressElement( object $bar)

Attach a progress bar to this monitor.
  • See: getProgressElement()
  • Throws: HTML_PROGRESS_ERROR_INVALID_INPUT
  • Since: 1.1
  • Access: public

Parameters:

object   $bar   —  a html_progress instance

[ Top ]

setProgressHandler   [line 257]

void setProgressHandler( mixed $handler)

Sets a user-defined progress handler function.
  • See: HTML_Progress::setProgressHandler()
  • Throws: HTML_PROGRESS_ERROR_INVALID_CALLBACK
  • Since: 1.1
  • Access: public

Parameters:

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

[ Top ]

toHtml   [line 415]

string toHtml( )

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

[ Top ]


Documentation generated on Mon, 11 Mar 2019 13:52:38 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.