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

Class: HTML_Progress2_Monitor

Source Location: /HTML_Progress2-2.0.0RC1/Progress2/Monitor.php

Class Overview


The HTML_Progress2_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 48]
The HTML_Progress2_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

$autorun =

[line 69]

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

Type:   string


[ Top ]

$buttonCancel =

[line 68]

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

Type:   string


[ Top ]

$buttonStart =

[line 67]

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

Type:   string


[ Top ]

$caption = array()

[line 79]

Monitor status (text label of progress bar).
  • Since: 2.0.0
  • Access: public

Type:   array


[ Top ]

$windowname =

[line 66]

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

Type:   string


[ Top ]



Method Detail

__construct (Constructor)   [line 152]

HTML_Progress2_Monitor __construct( [string $formName = 'ProgressMonitor'], [array $attributes = array()], [array $errorPrefs = array()])

Constructor (ZE2) 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_Progress2_Monitor();
  • Creates a progress bar into a dialog box, with only a new form name.
    1.    $monitor = new HTML_Progress2_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_Progress2_Monitor($formName$attributes);

  • Since: 2.0.0
  • Throws: HTML_PROGRESS2_ERROR_INVALID_INPUT
  • Access: protected

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 ]

HTML_Progress2_Monitor (Constructor)   [line 116]

HTML_Progress2_Monitor HTML_Progress2_Monitor( [ $formName = 'ProgressMonitor'], [ $attributes = array()], [ $errorPrefs = array()])

Constructor (ZE1)
  • Since: 2.0.0
  • Access: public

Parameters:

   $formName   — 
   $attributes   — 
   $errorPrefs   — 

[ Top ]

accept   [line 429]

void accept( &$renderer, object $renderer)

Accepts a renderer
  • Tutorial: monitor.accept.pkg
  • Since: 2.0.0
  • Access: public

Parameters:

object   $renderer   —  An HTML_QuickForm_Renderer object
   &$renderer   — 

[ Top ]

getProgressElement   [line 375]

object &getProgressElement( )

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

[ Top ]

getScript   [line 401]

string getScript( )

Returns progress javascript.
  • Tutorial: monitor.getscript.pkg
  • Since: 2.0.0
  • Access: public

[ Top ]

getStyle   [line 388]

string getStyle( )

Returns progress styles (StyleSheet).
  • Tutorial: monitor.getstyle.pkg
  • Since: 2.0.0
  • Access: public

[ Top ]

isCanceled   [line 301]

bool isCanceled( )

Returns TRUE if progress was canceled by user, FALSE otherwise.
  • Tutorial: monitor.iscanceled.pkg
  • Since: 2.0.0
  • Access: public

[ Top ]

isStarted   [line 287]

bool isStarted( )

Returns TRUE if progress was started by user, FALSE otherwise.
  • Tutorial: monitor.isstarted.pkg
  • Since: 2.0.0
  • Access: public

[ Top ]

notify   [line 224]

void notify( mixed $event)

Listens all progress events from this monitor.
  • Tutorial: monitor.notify.pkg
  • See: HTML_Progress2::process()
  • Throws: HTML_PROGRESS2_ERROR_INVALID_INPUT
  • Since: 2.0.0
  • Access: public

Parameters:

mixed   $event   —  A hash describing the progress event.

[ Top ]

run   [line 315]

void run( )

Display Monitor and catch user action (cancel button).
  • Tutorial: monitor.run.pkg
  • Since: 2.0.0
  • Access: public

[ Top ]

setCaption   [line 462]

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%

  • Tutorial: monitor.setcaption.pkg
  • Since: 2.0.0
  • Access: public

Parameters:

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

[ Top ]

setProgressElement   [line 335]

void setProgressElement( object $bar)

Attach a progress bar to this monitor.

Parameters:

object   $bar   —  a html_progress2 instance

[ Top ]

setProgressHandler   [line 264]

void setProgressHandler( mixed $handler)

Sets a user-defined progress handler function.
  • Tutorial: monitor.setprogresshandler.pkg
  • Throws: HTML_PROGRESS2_ERROR_INVALID_CALLBACK
  • Since: 2.0.0
  • Access: public

Parameters:

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

[ Top ]

toHtml   [line 414]

string toHtml( )

Returns Monitor forms as a Html string.
  • Tutorial: monitor.tohtml.pkg
  • Since: 2.0.0
  • Access: public

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:18:22 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright Š PHP Group 2004.