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

Class: HTML_Progress2

Source Location: /HTML_Progress2-2.1.0/Progress2.php

Class Overview

HTML_Common
   |
   --HTML_Progress2

HTML loading bar with only PHP and JS interface.


Author(s):

Version:

  • Release: 2.1.0

Copyright:

  • 2005-2006 The PHP Group

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 141]
HTML loading bar with only PHP and JS interface.

The HTML_Progress2 class allow you to add a loading bar to any of your xhtml document. You should have a browser that accept DHTML feature.

Here is a basic example:

  1.  <?php
  2.  require_once 'HTML/Progress2.php';
  3.  
  4.  $pb = new HTML_Progress2();
  5.  $pb->setAnimSpeed(50);
  6.  ?>
  7.  <html>
  8.  <head>
  9.  <?php
  10.  echo $pb->getStyle(false);
  11.  echo $pb->getScript(false);
  12.  ?>
  13.  </head>
  14.  <body>
  15.  <?php
  16.  $pb->display();
  17.  $pb->run();
  18.  ?>
  19.  </body>
  20.  </html>



[ Top ]


Class Variables

$animSpeed =

[line 216]

Delay in milisecond before each progress cells display.

1000 ms === sleep(1) <strong>usleep()</strong> function does not run on Windows platform.


Type:   integer


[ Top ]

$border = array()

[line 414]

Progress bar border properties

  1.  $border = array(
  2.     'class' => 'progressBorder%s',    # css class selector
  3.     'width' => 0,                     # width size in pixel
  4.     'style' => 'solid',               # style (solid, dashed, dotted ...)
  5.     'color' => '#000000'              # color
  6.  );


Type:   array


[ Top ]

$cell = array()

[line 443]

Progress bar cells properties

  1.  $cell = array(
  2.     'id' => 'pcel%01s',                    # cell identifier mask
  3.     'class' => 'cell%s',                   # css class selector
  4.     'active-color' => '#006600',           # active color
  5.     'inactive-color' => '#CCCCCC',         # inactive color
  6.     'font-family' => 'Courier, Verdana',   # font family
  7.     'font-size' => 8,                      # font size
  8.     'color' => '#000000',                  # foreground color
  9.     'background-color' => '#FFFFFF',       # background color
  10.     'background-image' => 'none',          # cell background image
  11.     'background-repeat' => 'no-repeat',    # cell background image repeat option
  12.     'background-position' => 'top left',   # cell background image start position
  13.     'width' => 15,                         # cell width
  14.     'height' => 20,                        # cell height
  15.     'spacing' => 2                         # cell spacing
  16.  );


Type:   array


[ Top ]

$cellCount =

[line 316]

The cell count of the progress bar. The default is 10.

Type:   integer


[ Top ]

$dispatcher =

[line 193]

Stores the event dispatcher which handles notifications
  • Since: 2.0.0RC2
  • Access: protected

Type:   array


[ Top ]

$fillWay =

[line 306]

Whether the progress bar is filled in 'natural' or 'reverse' way.

The default fill way is 'natural'.

  • 'way' = bar fill way
    • with Progress Bar Horizontal, natural way is : left to right
      reverse way is : right to left
    • with Progress Bar Vertical, natural way is : down to up
      reverse way is : up to down
    • with Progress Circle or Polygonal, natural way is : clockwise
      reverse way is : anticlockwise


Type:   string


[ Top ]

$frame = array()

[line 395]

Progress bar frame properties

  1.  $frame = array(
  2.     'show' => false,      # frame show (true/false)
  3.     'left' => 200,        # position from left
  4.     'top' => 100,         # position from top
  5.     'width' => 320,       # width
  6.     'height' => 90,       # height
  7.     'color' => '#C0C0C0'# color
  8.     'border-width' => 2,                                   # border width
  9.     'border-style' => 'solid',                             # border style
  10.                                                            # (solid, dashed, dotted ...)
  11.     'border-color' => '#DFDFDF #404040 #404040 #DFDFDF'    # border color (3dfx)
  12.  );


Type:   array


[ Top ]

$ident =

[line 184]

The label that uniquely identifies this progress object.

Type:   string


[ Top ]

$increment =

[line 259]

The progress bar's increment value.

The default is +1.


Type:   integer


[ Top ]

$indeterminate =

[line 163]

Whether the progress bar is in determinate or indeterminate mode.

The default is false. An indeterminate progress bar continuously displays animation indicating that an operation of unknown length is occuring.


Type:   boolean


[ Top ]

$label = array()

[line 473]

Progress bar labels properties

  1.  $label = array(
  2.     'name' => array(                  # label name
  3.       'type' => 'text',               # label type
  4.                                       # (text,button,step,percent,crossbar)
  5.       'value' => '&nbsp;',            # label value
  6.       'left' => ($left),              # label position from left
  7.       'top' => ($top - 16),           # label position from top
  8.       'width' => 0,                   # label width
  9.       'height' => 0,                  # label height
  10.       'align' => 'left',              # label align
  11.       'background-color' => 'transparent',          # label background color
  12.       'font-family' => 'Verdana, Tahoma, Arial',    # label font family
  13.       'font-size' => 11,                            # label font size
  14.       'font-weight' => 'normal',                    # label font weight
  15.       'color' => '#000000',                         # label font color
  16.       'class' => 'progressPercentLabel%s'           # css class selector
  17.  );


Type:   array


[ Top ]

$maximum =

[line 248]

The progress bar's maximum value.

The default is 100.


Type:   integer


[ Top ]

$minimum =

[line 237]

The progress bar's minimum value.

The default is 0.


Type:   integer


[ Top ]

$orientation =

[line 280]

Whether the progress bar is horizontal, vertical, polygonal or circle.

The default is horizontal.


Type:   integer


[ Top ]

$script =

[line 483]

External Javascript file to override internal default code

Type:   string


[ Top ]

$value =

[line 269]

The progress bar's current value.

Type:   integer


[ Top ]



Method Detail

__construct (Constructor)   [line 585]

HTML_Progress2 __construct( [array $errorPrefs = array()], [int $orient = HTML_PROGRESS2_BAR_HORIZONTAL], [int $min = 0], [int $max = 100], [mixed $percentLabel = 'pct1'])

Constructor (ZE2) Summary

Creates a natural horizontal progress bar that displays ten separated cells with no border and only percent label. The initial and minimum values are 0, and the maximum is 100.


Parameters:

array   $errorPrefs   —  (optional) Hash of params to configure error handler
int   $orient   —  (optional) Orientation of progress bar
int   $min   —  (optional) Minimum value of progress bar
int   $max   —  (optional) Maximum value of progress bar
mixed   $percentLabel   —  (optional) Progress bar percent label id.

[ Top ]

HTML_Progress2 (Constructor)   [line 559]

HTML_Progress2 HTML_Progress2( [ $errorPrefs = array()], [ $orient = HTML_PROGRESS2_BAR_HORIZONTAL], [ $min = 0], [ $max = 100], [ $percentLabel = 'pct1'])

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

Parameters:

   $errorPrefs   — 
   $orient   — 
   $min   — 
   $max   — 
   $percentLabel   — 

[ Top ]

addLabel   [line 1850]

void addLabel( string $type, string $name, [string $value = '&nbsp;'])

Add a new label to the progress meter.

Defines a new label identifier choosen between five categories:

  • HTML_PROGRESS2_LABEL_TEXT constant if you want a simple text zone
  • HTML_PROGRESS2_LABEL_BUTTON constant if you want a form button
  • HTML_PROGRESS2_LABEL_STEP constant if you want a step resume progress
  • HTML_PROGRESS2_LABEL_PERCENT constant if you want current progress value
  • HTML_PROGRESS2_LABEL_CROSSBAR constant if you want a little javascript animation


Parameters:

string   $type   —  Label type (text,button,step,percent,crossbar)
string   $name   —  Label name
string   $value   —  (optional) default label value

[ Top ]

addListener   [line 2984]

void addListener( mixed $callback, [string $nName = EVENT_DISPATCHER_GLOBAL])

Attachs a new observer.

Adds a new observer to the Event Dispatcher that will listen for all messages emitted by this HTML_Progress2 instance.


Parameters:

mixed   $callback   —  PHP callback that will act as listener
string   $nName   —  Expected notification name, serves as a filter

[ Top ]

apiVersion   [line 697]

string apiVersion( )

Returns the current API version.

This function return a "PHP-standardized" version number string. This is useful if you would like to write programs working only on some versions of HTML_Progress2. See also php version_compare() function.


[ Top ]

display   [line 2790]

void display( )

Renders the new value of progress meter.

This method should be used only to display initial state of the progress meter. Next steps to refresh display must use either moveStep() or moveNext() methods.

  • Since: 2.0.0
  • Access: public

[ Top ]

drawCircleSegments   [line 2252]

array drawCircleSegments( [string $dir = '.'], [string $fileMask = 'c%s.png'])

Draw all circle segment pictures.

This function build/prepare all circle segment PNG pictures that will be send to browser output. Requires PEAR::Image_Color and PHP:gd extension.


Parameters:

string   $dir   —  (optional) Directory where pictures should be created
string   $fileMask   —  (optional) sprintf format for pictures filename

[ Top ]

getAnimSpeed   [line 2328]

integer getAnimSpeed( )

Returns delay execution of the progress meter.

Given a delay in process of the progress meter is only necessary if you need demonstration or also smooth animation. The default value is zero (no delay).


[ Top ]

getBorderAttributes   [line 1594]

mixed getBorderAttributes( [bool $asString = false])

Returns progress bar's border attributes values.

Get all border attributes in a associative array with key-value couple (by default). Get the attributes as string is also possible.


Parameters:

bool   $asString   —  (optional) whether to return the attributes as string

[ Top ]

getCellAttributes   [line 1369]

mixed getCellAttributes( [bool $asString = false])

Returns cell attributes values.

Get all cell attributes in a associative array with key-value couple (by default). Get the attributes as string is also possible.


Parameters:

bool   $asString   —  (optional) whether to return the attributes as string

[ Top ]

getCellCoordinates   [line 1483]

array getCellCoordinates( )

Returns coordinates of each cell for a polygonal progress meter.

Get array of all cell coordinates (x,y) that define a polygonal progress meter. For example, a 3x3 square as: (0,0) for top left corner, (2,0) for top right corner, (2,2) for bottom right corner, and (0,2) for bottom left corner.


[ Top ]

getCellCount   [line 1315]

integer getCellCount( )

Returns count of cell in the progress meter.

Get the number of cell defined to a progress meter. It must be positive. The default value is 10.


[ Top ]

getError   [line 3829]

false|array|PEAR_Error getError( )

Pop an error off of the HTML_Progress2 stack.

Get all error data (code, message, level, context) from an object (PEAR_Error, ...) or a simple php array.


[ Top ]

getFillWay   [line 1265]

string getFillWay( )

Returns fill option of the progress meter.

Get 'natural' or 'reverse', depending of the fill way of progress meter. For horizontal progress bar, natural way is from left to right, and reverse way is from right to left. For vertical progress bar, natural way is from down to up, and reverse way is from up to down. The default fill way is 'natural'.


[ Top ]

getFrameAttributes   [line 1655]

mixed getFrameAttributes( [bool $asString = false])

Returns frame attributes values.

Get all frame attributes in a associative array with key-value couple (by default). Get the attributes as string is also possible.


Parameters:

bool   $asString   —  (optional) whether to return the attributes as string

[ Top ]

getIdent   [line 2940]

string getIdent( )

Returns the progress meter identifier.

Each progress meter has its own identifier. That allows to display more than only once meter at same time on same page.


[ Top ]

getIncrement   [line 942]

integer getIncrement( )

Returns the progress meter increment value.

Get step of progress property of a progress meter. The default value is +1.


[ Top ]

getLabelAttributes   [line 1753]

mixed getLabelAttributes( string $name, [bool $asString = false])

Returns attributes values of an existing label.

Get all attributes of an existing label identified by $name argument. This identifier must be the same as the one given to addLabel() method. Return attributes values in a associative array with key-value couple (by default). Get the attributes as string is also possible.


Parameters:

string   $name   —  progress label id.
bool   $asString   —  (optional) whether to return the attributes as string

[ Top ]

getMaximum   [line 874]

integer getMaximum( )

Returns the progress meter maximum value.

Get the maximum value at which the progress meter will stop. The default value is 100 and can't be less than minimum.


[ Top ]

getMinimum   [line 806]

integer getMinimum( )

Returns the progress meter minimum value.

Get the minimum value at which the progress meter will start. The default value is zero and can't be negative.


[ Top ]

getOrientation   [line 1189]

integer getOrientation( )

Returns orientation of the progress bar.

There are only two distinct orientations for a progress bar: horizontal and vertical, identified by two constants: HTML_PROGRESS2_BAR_HORIZONTAL and HTML_PROGRESS2_BAR_VERTICAL. While circle and other polygonal progress meter are identified by two other constants: HTML_PROGRESS2_CIRCLE and HTML_PROGRESS2_POLYGONAL. The default orientation is horizontal.


[ Top ]

getPercentComplete   [line 1151]

float getPercentComplete( [boolean $float = true])

Returns the percent complete of the progress meter.

Note that this number is between 0.00 and 1.00 when $float = true. And this number is between 0 and 100 when $float = false.


Parameters:

boolean   $float   —  (optional) float or integer format

[ Top ]

getProgressAttributes   [line 2030]

mixed getProgressAttributes( [bool $asString = false])

Returns the progress background attributes values.

Get all background attributes in a associative array with key-value couple (by default). Get the attributes as string is also possible.


Parameters:

bool   $asString   —  (optional) whether to return the attributes as string

[ Top ]

getScript   [line 2096]

string getScript( [boolean $raw = true])

Returns javascript progress meter handler.

Get the javascript URL or inline code that will handle the progress meter refresh.


Parameters:

boolean   $raw   —  (optional) html output with script tags or just raw data

[ Top ]

getStyle   [line 2386]

string getStyle( [boolean $raw = true])

Returns the cascading style sheet (CSS).

Get the CSS required to display the progress meter in a HTML document.

  • Since: 2.0.0
  • Throws: HTML_PROGRESS2_ERROR_INVALID_INPUT
  • Access: public

Parameters:

boolean   $raw   —  (optional) html output with script tags or just raw data

[ Top ]

getValue   [line 992]

integer getValue( )

Returns the progress meter current value.

Get the current value of the progress meter that is always between the minimum and maximum values, inclusive. The default value is equal to minimum.


[ Top ]

hasErrors   [line 3813]

integer hasErrors( )

Determine whether there are errors into the HTML_Progress2 stack.

This function gave you ability to be aware of API errors presence in user scripts.


[ Top ]

hide   [line 2806]

void hide( )

Hides the progress meter.

Once the process is over this method provides a solution to remove/hide the progress meter of the browser screen.

  • Since: 2.0.0
  • Access: public

[ Top ]

incValue   [line 1055]

void incValue( )

Updates the internal progress meter current value.

The new current value is equal to previous value increase by increment value. All listeners are notified. See also moveNext() method if you want a refresh display too.


[ Top ]

isBorderPainted   [line 763]

boolean isBorderPainted( )

Determines whether the progress bar border is painted or not.

By default, each progress bar (horizontal, vertical) has no border. This function gave ability to know if you've already set a border (return TRUE), or not (return FALSE).


[ Top ]

isIndeterminate   [line 720]

boolean isIndeterminate( )

Returns mode of the progress meter.

There are two types of progress meters: determinate and undeterminate.

Determinate progress meters are used when you know the length of time that an operation will take. The progress meter will fill up and, once full, the operation should be finished.

Undeterminate progress meters are used when you do not know the length of time of an operation. The progress meter will have an animation such a sliding box.


[ Top ]

moveNext   [line 1125]

void moveNext( )

Changes new value of the progress meter by increment increase.

Move current value to the next value of the progress meter defined by its increment. If result value is different than previous, then all listeners are notified.


[ Top ]

moveStep   [line 1080]

void moveStep( integer $step)

Changes new value of the progress meter by step increase.

Move current value to the next step of the progress meter defined by its increment. If result value is different than previous, then all listeners are notified. Caution: a step is always between 1 and (maximum / taskcount) rounded fractions up.


Parameters:

integer   $step   —  new step value

[ Top ]

process   [line 2884]

mixed process( )

Performs the progress user process.

This function call the user-specified progress function, defined by setProgressHandler() method. Default callback is the HTML_Progress2::sleep() method.


[ Top ]

raiseError   [line 3791]

mixed raiseError( )

A basic wrapper around the default PEAR_Error object.

This method throws any internal API error that could be raised due to a wrong programming. It will use your error handler system defined at class construction (by first argument).

  • See: _errorHandler()
  • Since: 2.0.0
  • Access: public

[ Top ]

removeLabel   [line 1995]

void removeLabel( string $name)

Removes a label to the progress meter.

The label identifier must exists or it cannot be remove. This is the same identifier as the one given to addLabel() method.


Parameters:

string   $name   —  Label name

[ Top ]

removeListener   [line 3022]

bool removeListener( mixed $callback, [string $nName = EVENT_DISPATCHER_GLOBAL])

Removes a registered observer.

Detachs a previously registered observer and remove the Event Dispatcher if there is no more observer registered.

  • Return: True if observer was removed, false otherwise
  • See: HTML_Progress2::addListener()
  • Throws: HTML_PROGRESS2_ERROR_INVALID_CALLBACK, HTML_PROGRESS2_ERROR_INVALID_INPUT
  • Since: 2.0.0
  • Access: public

Parameters:

mixed   $callback   —  PHP callback that act as listener
string   $nName   —  Expected notification name, serves as a filter

[ Top ]

run   [line 2908]

void run( )

Runs the progress meter.

This function accept both modes: indeterminate and determinate, and execute all actions defined in the user callback identified by setProgressHandler() method.

All observers are also notified of main changes (start, stop meter).


[ Top ]

setAnimSpeed   [line 2348]

void setAnimSpeed( integer $delay)

Sets delay execution of the progress meter.

The delay (in milisecond) cannot exceed 1000 (1 second), that is enough to smooth an animation. User process should slow down animation and in most case the default value (zero) will be efficient.


Parameters:

integer   $delay   —  Delay in milisecond.

[ Top ]

setBorderAttributes   [line 1634]

void setBorderAttributes( mixed $attributes)

Sets the progress bar's border attributes.

Defines all border attributes (color, size, ...) a progress bar (only horizontal or vertical) can handle.

Defaults are:

  • class = progressBorder%s
  • width = 0
  • style = solid
  • color = #000000


Parameters:

mixed   $attributes   —  Associative array or string of HTML tag attributes

[ Top ]

setBorderPainted   [line 782]

void setBorderPainted( boolean $paint)

Decides to paint or not a border to the progress bar.

This function gave ability to set ($paint = TRUE) or remove ($paint = FALSE) a border to the current progress bar.


Parameters:

boolean   $paint   —  whether the progress bar should paint its border

[ Top ]

setCellAttributes   [line 1428]

void setCellAttributes( mixed $attributes, [int $cell = null])

Sets cell attributes values.

Sets cell attributes for all cells (default) or a specific an existing cell.

Defaults are:

  • id = pcel%01s
  • class = cell
  • spacing = 2
  • active-color = #006600
  • inactive-color = #CCCCCC
  • font-family = Courier, Verdana
  • font-size = lowest value from cell width, cell height, and font size
  • color = #000000
  • background-color = #FFFFFF
  • background-image = none
  • background-repeat = no-repeat
  • background-position = top left
  • Horizontal Bar :
    • width = 15
    • height = 20
  • Vertical Bar :
    • width = 20
    • height = 15


Parameters:

mixed   $attributes   —  Associative array or string of HTML tag attributes
int   $cell   —  (optional) Cell index

[ Top ]

setCellCoordinates   [line 1504]

void setCellCoordinates( integer $xgrid, integer $ygrid, [array $coord = array()])

Sets coordinates of each cell for a polygonal progress meter.

A polygonal progress meter is defined by its size (width, height) and its cells coordinates (array of couple x,y screen coordinates).


Parameters:

integer   $xgrid   —  The grid width in cell size
integer   $ygrid   —  The grid height in cell size
array   $coord   —  (optional) Coordinates (x,y) in the grid, of each cell

[ Top ]

setCellCount   [line 1334]

void setCellCount( integer $cells)

Sets count of cell in the progress meter.

Defines the number of cell to a progress meter. It must be positive. The default value is 10.


Parameters:

integer   $cells   —  Cell count on progress meter

[ Top ]

setFillWay   [line 1284]

void setFillWay( string $way)

Sets fill option of the progress meter.

Sets the progress meter fill option: must be 'natural' or 'reverse'. The default fill way is 'natural'.


Parameters:

string   $way   —  fill direction (natural or reverse)

[ Top ]

setFrameAttributes   [line 1700]

void setFrameAttributes( [null|array $attributes = array()])

Sets the progress meter frame attributes.

Allows to build a customisable frame (color, size) around the progress meter.

Defaults are:

  • show = true
  • left = 200
  • top = 100
  • width = 320
  • height = 90
  • color = #C0C0C0
  • border-width = 2
  • border-style = solid
  • border-color = #DFDFDF #404040 #404040 #DFDFDF

  • Since: 2.0.0
  • Throws: HTML_PROGRESS2_ERROR_INVALID_INPUT, HTML_PROGRESS2_ERROR_INVALID_OPTION
  • Access: public

Parameters:

null|array   $attributes   —  (optional) hash of style parameters

[ Top ]

setIdent   [line 2959]

void setIdent( [mixed $ident = null])

Sets the progress meter identifier.

Each progress meter has its own identifier. That allows to display more than only once meter at same time on same page. If no identification string is given, then the default identifier will be six first characters of md5 hash value of the current unix timestamp.


Parameters:

mixed   $ident   —  (optional) the new identification string.

[ Top ]

setIncrement   [line 961]

void setIncrement( integer $inc)

Sets the progress meter increment value.

Defines step of progress property of a progress meter. Allows to ajust default value (+1).


Parameters:

integer   $inc   —  progress meter's increment value

[ Top ]

setIndeterminate   [line 739]

void setIndeterminate( boolean $continuous)

Sets the mode of progress meter.

Default progress meters are in determinate mode ($continuous = TRUE), but can be switched anytime in indeterminate mode ($continuous = FALSE).


Parameters:

boolean   $continuous   —  whether countinuously displays animation

[ Top ]

setLabelAttributes   [line 1809]

void setLabelAttributes( string $name, mixed $attributes)

Sets attributes values of an existing label.

Defines attributes (font, color, size, alignement ...) of an existing label. Whether an attribute is not specified, previous or default value is used instead.

Defaults are:

  • class = progressPercentLabel%s
  • width = 50
  • height = 0
  • font-size = 11
  • font-family = Verdana, Tahoma, Arial
  • font-weight = normal
  • color = #000000
  • background-color = transparent
  • align = right
  • valign = right


Parameters:

string   $name   —  progress label id.
mixed   $attributes   —  Associative array or string of HTML tag attributes

[ Top ]

setMaximum   [line 895]

void setMaximum( integer $max)

Sets the progress meter maximum value.

Set the maximum value at which the progress meter will stop. The default value is 100 and can't be less than minimum. If the new maximum is different than previous value, all listeners are notified.


Parameters:

integer   $max   —  progress meter's maximal value

[ Top ]

setMinimum   [line 827]

void setMinimum( integer $min)

Sets the progress meter minimum value.

Set the minimum value at which the progress meter will start. The default value is zero and can't be negative. If the new minimum is different than previous value, all listeners are notified.


Parameters:

integer   $min   —  progress meter's minimal value

[ Top ]

setOrientation   [line 1212]

void setOrientation( integer $orient)

Sets orientation of the progress bar.

There are only two distinct orientations for a progress bar: horizontal and vertical, identified by two constants: HTML_PROGRESS2_BAR_HORIZONTAL and HTML_PROGRESS2_BAR_VERTICAL. While circle and other polygonal progress meter are identified by two other constants: HTML_PROGRESS2_CIRCLE and HTML_PROGRESS2_POLYGONAL. The default orientation is horizontal.


Parameters:

integer   $orient   —  Orientation (horizontal or vertical)

[ Top ]

setProgressAttributes   [line 2077]

void setProgressAttributes( mixed $attributes)

Sets the progress background attributes values.

Background attributes are color and size, with default values:

  • background-color = #FFFFFF
  • background-image = none
  • background-repeat = no-repeat
  • background-position = top left
  • Horizontal Bar :
    • width = (cell_count * (cell_width + cell_spacing)) + cell_spacing
    • height = cell_height + (2 * cell_spacing)
  • Vertical Bar :
    • width = cell_width + (2 * cell_spacing)
    • height = (cell_count * (cell_height + cell_spacing)) + cell_spacing


Parameters:

mixed   $attributes   —  Associative array or string of HTML tag attributes

[ Top ]

setProgressHandler   [line 2861]

void setProgressHandler( mixed $handler)

Sets the user progress callback function.

The process() function will call the user-callback defined here by this setProgressHandler() method.

The user-supplied progress function must return either positive for a step progression, using moveStep() method, or NULL for a standard progression, using moveNext() method.


Parameters:

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

[ Top ]

setScript   [line 2210]

void setScript( string $url)

Sets the javascript progress meter handler.

Defines the javascript source (URL or inline code) that will handle the progress meter refresh.


Parameters:

string   $url   —  URL to the linked Progress JavaScript

[ Top ]

setValue   [line 1012]

void setValue( integer $val)

Sets the progress meter current value.

Set the current value of the progress meter that is always between the minimum and maximum values, inclusive. If the new value is different from previous, then all listeners are notified.


Parameters:

integer   $val   —  progress meter's current value

[ Top ]

sleep   [line 2830]

void sleep( )

Delay execution.

The HTML_Progress2::sleep() function delays program execution for the given number of milliseconds. This is the default user callback when none are defined.

NOTE: The function http://www.php.net/manual/en/function.usleep.php did not work on Windows systems until PHP 5.0.0


[ Top ]

toArray   [line 2501]

array toArray( )

Returns the progress meter structure into an array.

Get all progress meter properties, couple key-value, into a php array. This structure is read-only, a dump-like information.

  • Since: 2.0.0
  • Access: public

[ Top ]

toHtml   [line 2535]

string toHtml( )

Returns the progress meter structure as HTML.

Get html code required to display the progress meter in any html document.

  • Since: 2.0.0
  • Access: public

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:42:49 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.