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

Class: HTML_Progress

Source Location: /HTML_Progress-1.2.0RC1/Progress.php

Class Overview




Methods


Inherited Variables

Inherited Methods


Class Details

[line 86]


[ Top ]


Method Detail

HTML_Progress (Constructor)   [line 260]

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);

  • See: setIndeterminate(), setBorderPainted(), setStringPainted(), setString(), setDM(), setUI(), setIdent()
  • Throws: HTML_PROGRESS_ERROR_INVALID_INPUT
  • Since: 1.0
  • Access: public

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

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.
  • Return: True if the observer is successfully attached.
  • Tutorial: progress.addlistener.pkg
  • See: getListeners(), removeListener()
  • Since: 1.0
  • Access: public

Parameters:

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

[ Top ]

apiVersion   [line 369]

float apiVersion( )

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

[ Top ]

display   [line 1086]

void display( )

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

[ Top ]

getAnimSpeed   [line 850]

integer getAnimSpeed( )

Returns delay execution of the progress bar
  • Tutorial: progress.getanimspeed.pkg
  • See: setAnimSpeed()
  • Since: 1.2.0
  • Access: public

[ Top ]

getDM   [line 547]

object &getDM( )

Returns the data model used by this progress bar.
  • See: setDM()
  • Since: 1.0
  • Access: public

[ Top ]

getIdent   [line 1136]

string getIdent( )

Returns the current identification string.
  • Return: current Progress instance's identification string
  • See: setIdent()
  • Since: 1.0
  • Access: public

[ Top ]

getIncrement   [line 678]

integer getIncrement( )

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

The default value is +1.

  • Tutorial: dm.getincrement.pkg
  • See: setIncrement(), HTML_Progress_DM::getIncrement()
  • Since: 1.0
  • Access: public

[ Top ]

getListeners   [line 1168]

array getListeners( )

Returns an array of all the listeners added to this progress bar.
  • Tutorial: progress.getlisteners.pkg
  • See: addListener(), removeListener()
  • Since: 1.0
  • Access: public

[ Top ]

getMaximum   [line 637]

integer getMaximum( )

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

The default value is 100.

  • Tutorial: dm.getmaximum.pkg
  • See: setMaximum(), HTML_Progress_DM::getMaximum()
  • Since: 1.0
  • Access: public

[ Top ]

getMinimum   [line 596]

integer getMinimum( )

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

The default value is 0.

  • Tutorial: dm.getminimum.pkg
  • See: setMinimum(), HTML_Progress_DM::getMinimum()
  • Since: 1.0
  • Access: public

[ Top ]

getPercentComplete   [line 771]

float getPercentComplete( )

Returns the percent complete for the progress bar. Note that this number is between 0.00 and 1.00.
  • Tutorial: dm.getpercentcomplete.pkg
  • See: getValue(), getMaximum(), HTML_Progress_DM::getPercentComplete()
  • Since: 1.0
  • Access: public

[ Top ]

getScript   [line 923]

string getScript( )

Get the javascript code to manage progress bar.
  • Return: JavaScript URL or inline code to manage progress bar
  • Tutorial: ui.getscript.pkg
  • See: HTML_Progress_UI::getScript()
  • Since: 1.0
  • Access: public

[ Top ]

getString   [line 510]

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%.

  • Tutorial: progress.getstring.pkg
  • See: setString(), isStringPainted()
  • Since: 1.0
  • Access: public

[ Top ]

getStyle   [line 902]

string getStyle( )

Get the cascading style sheet to put inline on HTML document
  • Tutorial: ui.getstyle.pkg
  • See: HTML_Progress_UI::getStyle()
  • Since: 1.0
  • Access: public

[ Top ]

getUI   [line 784]

object &getUI( )

Returns the look-and-feel object that renders the progress bar.
  • See: setUI()
  • Since: 1.0
  • Access: public

[ Top ]

getValue   [line 713]

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.

  • Tutorial: dm.getvalue.pkg
  • See: setValue(), incValue(), HTML_Progress_DM::getValue()
  • Since: 1.0
  • Access: public

[ Top ]

incValue   [line 754]

void incValue( )

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

All change listeners are notified.

  • Tutorial: dm.incvalue.pkg
  • See: getValue(), setValue(), HTML_Progress_DM::incValue()
  • Since: 1.0
  • Access: public

[ Top ]

isBorderPainted   [line 426]

boolean isBorderPainted( )

Determines whether the progress bar border is painted or not.

The default is false.

  • Tutorial: progress.isborderpainted.pkg
  • See: setBorderPainted()
  • Since: 1.0
  • Access: public

[ Top ]

isIndeterminate   [line 383]

boolean isIndeterminate( )

Returns mode of the progress bar (determinate or not).
  • Tutorial: progress.isindeterminate.pkg
  • See: setIndeterminate()
  • Since: 1.0
  • Access: public

[ Top ]

isStringPainted   [line 469]

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%.

  • Tutorial: progress.isstringpainted.pkg
  • See: setStringPainted(), setString()
  • Since: 1.0
  • Access: public

[ Top ]

raiseError   [line 1644]

array raiseError( integer $code, string $level, array $params, array $trace)

Add an error to the stack Dies if the error is an exception (and would have died anyway)
  • Return: PEAR_ErrorStack instance. And with context info (if PHP 4.3+)
  • Since: 1.2.0
  • Access: public

Parameters:

integer   $code   —  Error code.
string   $level   —  The error level of the message. Valid are PEAR_LOG_* constants
array   $params   —  Associative array of error parameters
array   $trace   —  Error context info (see debug_backtrace() contents)

[ Top ]

removeListener   [line 1208]

boolean removeListener( object $observer)

Removes a HTML_Progress_Observer instance from the list of observers.
  • Return: True if the observer is successfully detached.
  • Tutorial: progress.removelistener.pkg
  • See: getListeners(), addListener()
  • Since: 1.0
  • Access: public

Parameters:

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

[ Top ]

setAnimSpeed   [line 867]

void setAnimSpeed( integer $delay)

Set the delays progress bar execution for the given number of miliseconds.
  • Tutorial: progress.setanimspeed.pkg
  • See: getAnimSpeed()
  • Throws: HTML_PROGRESS_ERROR_INVALID_INPUT
  • Since: 1.1
  • Access: public

Parameters:

integer   $delay   —  Delay in milisecond.

[ Top ]

setBorderPainted   [line 444]

void setBorderPainted( boolean $paint)

Sets the value of $_paintBorder property, which determines whether the progress bar should paint its border. The default is false.
  • Tutorial: progress.setborderpainted.pkg
  • See: isBorderPainted()
  • Throws: HTML_PROGRESS_ERROR_INVALID_INPUT
  • Since: 1.0
  • Access: public

Parameters:

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

[ Top ]

setDM   [line 563]

void setDM( string $model)

Sets the data model used by this progress bar.
  • See: getDM()
  • Throws: HTML_PROGRESS_ERROR_INVALID_INPUT
  • Since: 1.0
  • Access: public

Parameters:

string   $model   —  class name of a html_progress_dm extends object

[ Top ]

setIdent   [line 1150]

void setIdent( [mixed $ident = null])

Sets this Progress instance's identification string.
  • See: getIdent()
  • Since: 1.0
  • Access: public

Parameters:

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

[ Top ]

setIncrement   [line 695]

void setIncrement( integer $inc)

Sets the progress bar's increment value stored in the progress bar's data model.
  • Tutorial: dm.setincrement.pkg
  • See: getIncrement(), HTML_Progress_DM::setIncrement()
  • Since: 1.0
  • Access: public

Parameters:

integer   $inc   —  progress bar's increment value

[ Top ]

setIndeterminate   [line 404]

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.

  • Tutorial: progress.setindeterminate.pkg
  • See: isIndeterminate()
  • Throws: HTML_PROGRESS_ERROR_INVALID_INPUT
  • Since: 1.0
  • Access: public

Parameters:

boolean   $continuous   —  whether countinuously displays animation

[ Top ]

setMaximum   [line 656]

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.

  • Tutorial: dm.setmaximum.pkg
  • See: getMaximum(), HTML_Progress_DM::setMaximum()
  • Since: 1.0
  • Access: public

Parameters:

integer   $max   —  progress bar's maximal value

[ Top ]

setMinimum   [line 615]

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.

  • Tutorial: dm.setminimum.pkg
  • See: getMinimum(), HTML_Progress_DM::setMinimum()
  • Since: 1.0
  • Access: public

Parameters:

integer   $min   —  progress bar's minimal value

[ Top ]

setModel   [line 834]

void setModel( string $file, string $type)

Sets the look-and-feel model that renders the progress bar.
  • Tutorial: progress.setmodel.pkg
  • See: setUI()
  • Since: 1.0
  • Access: public

Parameters:

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

[ Top ]

setString   [line 534]

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.

  • Tutorial: progress.setstring.pkg
  • See: getString(), isStringPainted(), setStringPainted()
  • Since: 1.0
  • Access: public

Parameters:

string   $str   —  progress string

[ Top ]

setStringPainted   [line 487]

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.
  • Tutorial: progress.setstringpainted.pkg
  • See: isStringPainted(), setString()
  • Throws: HTML_PROGRESS_ERROR_INVALID_INPUT
  • Since: 1.0
  • Access: public

Parameters:

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

[ Top ]

setUI   [line 800]

void setUI( string $ui)

Sets the look-and-feel object that renders the progress bar.
  • See: getUI()
  • Throws: HTML_PROGRESS_ERROR_INVALID_INPUT
  • Since: 1.0
  • Access: public

Parameters:

string   $ui   —  class name of a html_progress_ui extends object

[ Top ]

setValue   [line 732]

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.

  • Tutorial: dm.setvalue.pkg
  • See: getValue(), incValue(), HTML_Progress_DM::setValue()
  • Since: 1.0
  • Access: public

Parameters:

integer   $val   —  progress bar's current value

[ Top ]

toArray   [line 937]

array toArray( )

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

[ Top ]

toHtml   [line 975]

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 10:15:09 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.