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

Class: HTML_Progress

Source Location: /HTML_Progress-1.2.6/Progress.php

Class Overview


HTML loading bar with only PHP and JS interface.


Author(s):

Version:

  • Release: 1.2.6

Copyright:

  • 1997-2005 The PHP Group

Methods


Inherited Variables

Inherited Methods


Class Details

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

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



[ Top ]


Method Detail

HTML_Progress (Constructor)   [line 388]

HTML_Progress HTML_Progress( object $model, int $orient, int $min, int $max, array $errorPrefs)

Constructor Summary

  • Creates a natural horizontal progress bar that displays ten cells/units with no border and no progress string. The initial and minimum values are 0, and the maximum is 100.
    1.    $bar = new HTML_Progress();
  • Creates a natural progress bar with the specified orientation, which can be either HTML_PROGRESS_BAR_HORIZONTAL or HTML_PROGRESS_BAR_VERTICAL By default, no border and no progress string are painted. The initial and minimum values are 0, and the maximum is 100.
    1.    $bar = new HTML_Progress($orient);
  • Creates a natural horizontal progress bar with the specified minimum and maximum. Sets the initial value of the progress bar to the specified minimum, and the maximum that the progress bar can reach. By default, no border and no progress string are painted.
    1.    $bar = new HTML_Progress($min$max);
  • Creates a natural horizontal progress bar with the specified orientation, minimum and maximum. Sets the initial value of the progress bar to the specified minimum, and the maximum that the progress bar can reach. By default, no border and no progress string are painted.
    1.    $bar = new HTML_Progress($orient$min$max);
  • Creates a natural horizontal progress that uses the specified model to hold the progress bar's data. By default, no border and no progress string are painted.
    1.    $bar = new HTML_Progress($model);


Parameters:

object   $model   —  (optional) Model that hold the progress bar's data
int   $orient   —  (optional) Orientation of progress bar
int   $min   —  (optional) Minimum value of progress bar
int   $max   —  (optional) Maximum value of progress bar
array   $errorPrefs   —  (optional) Always last argument of class constructor. hash of params to configure PEAR_ErrorStack and loggers

[ Top ]

addListener   [line 1488]

boolean addListener( object $observer)

Adds a HTML_Progress_Observer instance to the list of observers that are listening for messages emitted by this HTML_Progress instance.

Parameters:

object   $observer   —  The HTML_Progress_Observer instance to attach as a listener.

[ Top ]

apiVersion   [line 497]

float apiVersion( )

Returns the current API version
  • Since: 0.1
  • Access: public

[ Top ]

display   [line 1278]

void display( )

Renders the new value of progress bar.
  • Since: 0.2
  • Access: public

[ Top ]

getAnimSpeed   [line 1043]

integer getAnimSpeed( )

Returns delay execution of the progress bar

[ Top ]

getDM   [line 667]

object &getDM( )

Returns the data model used by this progress bar.

[ Top ]

getError   [line 2234]

false|array getError( )

Pop an error off of the HTML_Progress stack

[ Top ]

getIdent   [line 1440]

string getIdent( )

Returns the current identification string.

[ Top ]

getIncrement   [line 793]

integer getIncrement( )

Returns the progress bar's increment value stored in the progress bar's data model.

The default value is +1.


[ Top ]

getListeners   [line 1471]

array getListeners( )

Returns an array of all the listeners added to this progress bar.

[ Top ]

getMaximum   [line 754]

integer getMaximum( )

Returns the progress bar's maximum value stored in the progress bar's data model.

The default value is 100.


[ Top ]

getMinimum   [line 715]

integer getMinimum( )

Returns the progress bar's minimum value stored in the progress bar's data model.

The default value is 0.


[ Top ]

getPercentComplete   [line 883]

mixed getPercentComplete( [boolean $float = true])

Returns the percent complete for the progress bar. Note that this number is between 0.00 and 1.00 or 0 and 100.

Parameters:

boolean   $float   —  (optional) float or integer format

[ Top ]

getScript   [line 1115]

string getScript( )

Get the javascript code to manage progress bar.

[ Top ]

getString   [line 631]

string getString( )

Returns the current value of the progress string.

By default, the progress bar displays the value returned by getPercentComplete() method formatted as a percent such as 33%.


[ Top ]

getStyle   [line 1093]

string getStyle( )

Get the cascading style sheet to put inline on HTML document

[ Top ]

getUI   [line 896]

object &getUI( )

Returns the look-and-feel object that renders the progress bar.

[ Top ]

getValue   [line 826]

integer getValue( )

Returns the progress bar's current value, which is stored in the progress bar's data model. The value is always between the minimum and maximum values, inclusive.

By default, the value is initialized to be equal to the minimum value.


[ Top ]

hasErrors   [line 2220]

integer hasErrors( )

Determine whether there are errors into the HTML_Progress stack

[ Top ]

hide   [line 1324]

void hide( )

Hides the progress bar.
  • Since: 1.2.0RC3
  • Access: public

[ Top ]

incValue   [line 865]

void incValue( )

Updates the progress bar's current value by adding increment value.

All change listeners are notified.


[ Top ]

isBorderPainted   [line 551]

boolean isBorderPainted( )

Determines whether the progress bar border is painted or not.

The default is false.


[ Top ]

isIndeterminate   [line 510]

boolean isIndeterminate( )

Returns mode of the progress bar (determinate or not).

[ Top ]

isStringPainted   [line 592]

boolean isStringPainted( )

Determines whether the progress bar string is painted or not.

The default is false. The progress bar displays the value returned by getPercentComplete() method formatted as a percent such as 33%.


[ Top ]

process   [line 1396]

void process( )

Performs the progress actions

[ Top ]

raiseError   [line 2151]

NULL|PEAR_Error raiseError( integer $code, string $level, array $params)

Add an error to the stack

Parameters:

integer   $code   —  Error code.
string   $level   —  The error level of the message.
array   $params   —  Associative array of error parameters

[ Top ]

removeListener   [line 1509]

boolean removeListener( object $observer)

Removes a HTML_Progress_Observer instance from the list of observers.

Parameters:

object   $observer   —  The HTML_Progress_Observer instance to detach from the list of listeners.

[ Top ]

run   [line 1416]

void run( )

Runs the progress bar (both modes: indeterminate and determinate), and execute all actions defined in user callback identified by method setProgressHandler.

[ Top ]

setAnimSpeed   [line 1059]

void setAnimSpeed( integer $delay)

Set the delays progress bar execution for the given number of miliseconds.

Parameters:

integer   $delay   —  Delay in milisecond.

[ Top ]

setBorderPainted   [line 568]

void setBorderPainted( boolean $paint)

Sets the value of $_paintBorder property, which determines whether the progress bar should paint its border. The default is false.

Parameters:

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

[ Top ]

setDM   [line 683]

void setDM( string $model)

Sets the data model used by this progress bar.

Parameters:

string   $model   —  class name of a html_progress_dm extends object

[ Top ]

setIdent   [line 1454]

void setIdent( [mixed $ident = null])

Sets this Progress instance's identification string.

Parameters:

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

[ Top ]

setIncrement   [line 809]

void setIncrement( integer $inc)

Sets the progress bar's increment value stored in the progress bar's data model.

Parameters:

integer   $inc   —  progress bar's increment value

[ Top ]

setIndeterminate   [line 530]

void setIndeterminate( boolean $continuous)

Sets the $_indeterminate property of the progress bar, which determines whether the progress bar is in determinate or indeterminate mode.

An indeterminate progress bar continuously displays animation indicating that an operation of unknown length is occuring. By default, this property is false.


Parameters:

boolean   $continuous   —  whether countinuously displays animation

[ Top ]

setMaximum   [line 772]

void setMaximum( integer $max)

Sets the progress bar's maximum value stored in the progress bar's data model.

If the maximum value is different from previous maximum, all change listeners are notified.


Parameters:

integer   $max   —  progress bar's maximal value

[ Top ]

setMinimum   [line 733]

void setMinimum( integer $min)

Sets the progress bar's minimum value stored in the progress bar's data model.

If the minimum value is different from previous minimum, all change listeners are notified.


Parameters:

integer   $min   —  progress bar's minimal value

[ Top ]

setModel   [line 946]

void setModel( string $file, string $type)

Sets the look-and-feel model that renders the progress bar.

Parameters:

string   $file   —  file name of model properties
string   $type   —  type of external ressource (phpArray, iniFile, XML ...)

[ Top ]

setProgressHandler   [line 1376]

void setProgressHandler( mixed $handler)

Sets the user callback function that execute all actions pending progress

Parameters:

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

[ Top ]

setString   [line 654]

void setString( string $str)

Sets the current value of the progress string. By default, this string is null. If you have provided a custom progress string and want to revert to the built-in-behavior, set the string back to null.

The progress string is painted only if the isStringPainted() method returns true.


Parameters:

string   $str   —  progress string

[ Top ]

setStringPainted   [line 609]

void setStringPainted( boolean $paint)

Sets the value of $_paintString property, which determines whether the progress bar should render a progress string. The default is false.

Parameters:

boolean   $paint   —  whether the progress bar should render a string

[ Top ]

setUI   [line 912]

void setUI( string $ui)

Sets the look-and-feel object that renders the progress bar.

Parameters:

string   $ui   —  class name of a html_progress_ui extends object

[ Top ]

setValue   [line 844]

void setValue( integer $val)

Sets the progress bar's current value stored in the progress bar's data model.

If the new value is different from previous value, all change listeners are notified.


Parameters:

integer   $val   —  progress bar's current value

[ Top ]

sleep   [line 1353]

void sleep( )

Default user callback when none are defined.

Delay execution of progress meter for the given number of milliseconds.

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

array toArray( )

Returns the progress bar structure in an array.
  • Return: of progress bar properties
  • Since: 1.0
  • Access: public

[ Top ]

toHtml   [line 1167]

string toHtml( )

Returns the progress structure as HTML.
  • Return: HTML Progress bar
  • Since: 0.2
  • 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.