Class: HTML_Progress2
Source Location: /HTML_Progress2-2.0.0RC1/Progress2.php
HTML_Common
|
--HTML_Progress2
The HTML_Progress2 class allow you to add a loading bar to any of your xhtml document.
Author(s):
Version:
- Release: @package_version@
Copyright:
|
|
|
Inherited Variables
|
Inherited Methods
|
Class Details
Class Variables
$animSpeed =
[line 186]
Delay in milisecond before each progress cells display. 1000 ms === sleep(1) <strong>usleep()</strong> function does not run on Windows platform.
$border = array()
[line 382]
Progress bar border properties
$border = array(
'class' => 'progressBorder%s', # css class selector
'width' => 0, # width size in pixel
'style' => 'solid', # style (solid, dashed, dotted ...)
'color' => '#000000' # color
);
$cell = array()
[line 408]
Progress bar cells properties
$cell = array(
'id' => 'pcel%01s', # cell identifier mask
'class' => 'cell%s', # css class selector
'active-color' => '#006600', # active color
'inactive-color' => '#CCCCCC', # inactive color
'font-family' => 'Courier, Verdana', # font family
'font-size' => 8, # font size
'color' => '#000000', # foreground color
'background-color' => '#FFFFFF', # background color
'width' => 15, # cell width
'height' => 20, # cell height
'spacing' => 2 # cell spacing
);
$cellCount =
[line 286]
The cell count of the progress bar. The default is 10.
$fillWay =
[line 276]
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
$frame = array()
[line 363]
Progress bar frame properties
$frame = array(
'show' => false, # frame show (true/false)
'left' => 200, # position from left
'top' => 100, # position from top
'width' => 320, # width
'height' => 90, # height
'color' => '#C0C0C0', # color
'border' => 2, # border width
'border-style' => 'solid', # border style
# (solid, dashed, dotted ...)
'border-color' => '#DFDFDF #404040 #404040 #DFDFDF' # border color (3dfx)
);
$ident =
[line 164]
The label that uniquely identifies this progress object.
$increment =
[line 229]
The progress bar's increment value. The default is +1.
$indeterminate =
[line 143]
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.
$label = array()
[line 438]
Progress bar labels properties
$label = array(
'name' => array( # label name
'type' => 'text', # label type
# (text,button,step,percent,crossbar)
'value' => ' ', # label value
'left' => ($left), # label position from left
'top' => ($top - 16), # label position from top
'width' => 0, # label width
'height' => 0, # label height
'align' => 'left', # label align
'background-color' => '', # label background color
'font-family' => 'Verdana, Tahoma, Arial', # label font family
'font-size' => 11, # label font size
'font-weight' => 'normal', # label font weight
'color' => '#000000', # label font color
'class' => 'progressPercentLabel%s' # css class selector
);
$maximum =
[line 218]
The progress bar's maximum value. The default is 100.
$minimum =
[line 207]
The progress bar's minimum value. The default is 0.
$orientation =
[line 250]
Whether the progress bar is horizontal, vertical, polygonal or circle. The default is horizontal.
$script =
[line 448]
External Javascript file to override internal default code
$value =
[line 239]
The progress bar's current value.
Method Detail
__construct (Constructor) [line 555]
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 no labels. The initial and minimum values are 0, and the maximum is 100.
Parameters:
HTML_Progress2 (Constructor) [line 524]
HTML_Progress2 HTML_Progress2(
[
$errorPrefs = array()], [
$orient = HTML_PROGRESS2_BAR_HORIZONTAL], [
$min = 0], [
$max = 100], [
$percentLabel = 'pct1'])
|
|
Constructor (ZE1)
Parameters:
addLabel [line 1778]
void addLabel(
string
$type, string
$name, [string
$value = ' '])
|
|
Add a new label to the progress bar.
Parameters:
addListener [line 2819]
boolean addListener(
object
$observer)
|
|
Adds a HTML_Progress2_Observer instance to the list of observers that are listening for messages emitted by this HTML_Progress2 instance. Returns TRUE if the observer is successfully attached.
Parameters:
apiVersion [line 659]
Returns the current API version compatible with php.version_compare()
display [line 2641]
Renders the new value of progress bar.
drawCircleSegments [line 2145]
array drawCircleSegments(
[string
$dir = '.'], [string
$fileMask = 'c%s.png'])
|
|
Draw all circle segment pictures
Parameters:
getAnimSpeed [line 2218]
Returns delay execution of the progress bar
getBorderAttributes [line 1555]
mixed getBorderAttributes(
[bool
$asString = false])
|
|
Returns the progress bar's border attributes. Assoc array (defaut) or string.
Parameters:
getCellAttributes [line 1340]
mixed getCellAttributes(
[bool
$asString = false])
|
|
Returns the common and private cell attributes. Assoc array (defaut) or string
Parameters:
getCellCoordinates [line 1448]
array getCellCoordinates(
)
|
|
Returns the coordinates of each cell for a polygonal progress shape.
getCellCount [line 1290]
Returns the number of cell in the progress bar. The default value is 10.
getError [line 3539]
false|array|PEAR_Error getError(
)
|
|
Pop an error off of the HTML_Progress2 stack
getFillWay [line 1243]
Returns 'natural' or 'reverse', depending of the fill way of progress bar. 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'.
getFrameAttributes [line 1612]
mixed getFrameAttributes(
[bool
$asString = false])
|
|
Returns the frame attributes. Assoc array (defaut) or string.
Parameters:
getIdent [line 2767]
Returns the current identification string.
getIncrement [line 884]
Returns the progress bar's increment value. The default value is +1.
getLabelAttributes [line 1692]
mixed getLabelAttributes(
string
$name, [bool
$asString = false])
|
|
Returns the label attributes. Assoc array (defaut) or string.
Parameters:
getListeners [line 2800]
Returns an array of all the listeners added to this progress bar.
getMaximum [line 820]
Returns the progress bar's maximum value. The default value is 100.
getMinimum [line 756]
Returns the progress bar's minimum value. The default value is 0.
getOrientation [line 1172]
integer getOrientation(
)
|
|
Returns HTML_PROGRESS2_BAR_HORIZONTAL or HTML_PROGRESS2_BAR_VERTICAL, depending on the orientation of the progress bar. The default orientation is HTML_PROGRESS2_BAR_HORIZONTAL.
getPercentComplete [line 1138]
float getPercentComplete(
[boolean
$float = true])
|
|
Returns the percent complete for the progress bar. Note that this number is between 0.00 and 1.00.
Parameters:
getProgressAttributes [line 1954]
mixed getProgressAttributes(
[bool
$asString = false])
|
|
Returns the progress attributes. Assoc array (defaut) or string.
Parameters:
getScript [line 2014]
Get the javascript URL or inline code to manage progress bar.
getStyle [line 2269]
Get the cascading style sheet to put inline on HTML document
getValue [line 931]
Returns the progress bar's current value. The value is always between the minimum and maximum values, inclusive. By default, the value is initialized with the minimum value.
hasErrors [line 3525]
Determine whether there are errors into the HTML_Progress2 stack
hide [line 2655]
incValue [line 991]
Updates the progress bar's current value by adding increment value. All change listeners are notified.
isBorderPainted [line 716]
boolean isBorderPainted(
)
|
|
Determines whether the progress bar border is painted or not. The default is false.
isIndeterminate [line 673]
boolean isIndeterminate(
)
|
|
Returns mode of the progress bar (determinate or not).
moveNext [line 1119]
Changes value of the progress bar to the next step. All change listeners are notified.
moveStep [line 1013]
void moveStep(
integer
$step)
|
|
Changes new step value of the progress bar. All change listeners are notified.
Parameters:
process [line 2722]
Performs the progress actions
raiseError [line 3505]
A basic wrapper around the default PEAR_Error object
removeLabel [line 1921]
void removeLabel(
string
$name)
|
|
Removes a label to the progress bar.
Parameters:
removeListener [line 2842]
boolean removeListener(
object
$observer)
|
|
Removes a HTML_Progress2_Observer instance from the list of observers. Returns TRUE if the observer is successfully detached.
Parameters:
run [line 2743]
Runs the progress bar (both modes: indeterminate and determinate), and execute all actions defined in user callback identified by method setProgressHandler.
setAnimSpeed [line 2235]
void setAnimSpeed(
integer
$delay)
|
|
Set the delays progress bar execution for the given number of miliseconds.
Parameters:
setBorderAttributes [line 1593]
void setBorderAttributes(
mixed
$attributes)
|
|
Sets the progress bar's border attributes. Defaults are: - class = progressBorder%s
- width = 0
- style = solid
- color = #000000
Parameters:
setBorderPainted [line 734]
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:
setCellAttributes [line 1398]
void setCellAttributes(
mixed
$attributes, [int
$cell = null])
|
|
Sets the cell attributes for an existing cell. Defaults are: - Common :
- 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 (added for progress circle shape on release 1.2.0)
- Horizontal Bar :
- Vertical Bar :
Parameters:
setCellCoordinates [line 1467]
void setCellCoordinates(
integer
$xgrid, integer
$ygrid, [array
$coord = array()])
|
|
Set the coordinates of each cell for a polygonal progress shape.
Parameters:
setCellCount [line 1307]
void setCellCount(
integer
$cells)
|
|
Sets the number of cell in the progress bar
Parameters:
setFillWay [line 1261]
void setFillWay(
string
$way)
|
|
Sets the progress bar's fill way, which must be 'natural' or 'reverse'. The default fill way is 'natural'.
Parameters:
setFrameAttributes [line 1643]
void setFrameAttributes(
[null|array
$attributes = array()])
|
|
Build a frame around the progress bar.
Parameters:
setIdent [line 2782]
void setIdent(
[mixed
$ident = null])
|
|
Sets this Progress instance's identification string.
Parameters:
setIncrement [line 901]
void setIncrement(
integer
$inc)
|
|
Sets the progress bar's increment value.
Parameters:
setIndeterminate [line 694]
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:
setLabelAttributes [line 1745]
void setLabelAttributes(
string
$name, mixed
$attributes)
|
|
Sets label attributes. Defaults are: - class = progressPercentLabel%s
- width = 50
- height = 0
- font-size = 11
- font-family = Verdana, Tahoma, Arial
- font-weight = normal
- color = #000000
- background-color =
- align = right
- valign = right
Parameters:
setMaximum [line 839]
void setMaximum(
integer
$max)
|
|
Sets the progress bar's maximum value. If the maximum value is different from previous maximum, all change listeners are notified.
Parameters:
setMinimum [line 775]
void setMinimum(
integer
$min)
|
|
Sets the progress bar's minimum value. If the minimum value is different from previous minimum, all change listeners are notified.
Parameters:
setOrientation [line 1191]
void setOrientation(
integer
$orient)
|
|
Sets the progress bar's orientation, which must be HTML_PROGRESS2_BAR_HORIZONTAL or HTML_PROGRESS2_BAR_VERTICAL. The default orientation is HTML_PROGRESS2_BAR_HORIZONTAL.
Parameters:
setProgressAttributes [line 2000]
void setProgressAttributes(
mixed
$attributes)
|
|
Sets the common progress bar attributes. Defaults are: - background-color = #FFFFFF
- auto-size = true
- 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:
setProgressHandler [line 2701]
void setProgressHandler(
mixed
$handler)
|
|
Sets the user callback function that execute all actions pending progress
Parameters:
setScript [line 2105]
void setScript(
string
$url)
|
|
Set the external JavaScript code (file) to manage progress element.
Parameters:
setValue [line 950]
void setValue(
integer
$val)
|
|
Sets the progress bar's current value. If the new value is different from previous value, all change listeners are notified.
Parameters:
sleep [line 2677]
toArray [line 2354]
Returns the progress bar structure in an array.
toHtml [line 2387]
Returns the progress structure as HTML.
Documentation generated on Mon, 11 Mar 2019 14:18:22 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright Š PHP Group 2004.
|
|