Class: HTML_Progress2
Source Location: /HTML_Progress2-2.0.0RC2/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 197]
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 393]
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 419]
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 297]
The cell count of the progress bar. The default is 10.
$dispatcher =
[line 174]
Stores the event dispatcher which handles notifications
$fillWay =
[line 287]
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 374]
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 165]
The label that uniquely identifies this progress object.
$increment =
[line 240]
The progress bar's increment value. The default is +1.
$indeterminate =
[line 144]
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 449]
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 229]
The progress bar's maximum value. The default is 100.
$minimum =
[line 218]
The progress bar's minimum value. The default is 0.
$orientation =
[line 261]
Whether the progress bar is horizontal, vertical, polygonal or circle. The default is horizontal.
$script =
[line 459]
External Javascript file to override internal default code
$value =
[line 250]
The progress bar's current value.
Method Detail
__construct (Constructor) [line 565]
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 535]
HTML_Progress2 HTML_Progress2(
[
$errorPrefs = array()], [
$orient = HTML_PROGRESS2_BAR_HORIZONTAL], [
$min = 0], [
$max = 100], [
$percentLabel = 'pct1'])
|
|
Constructor (ZE1)
Parameters:
addLabel [line 1729]
void addLabel(
string
$type, string
$name, [string
$value = ' '])
|
|
Add a new label to the progress bar.
Parameters:
addListener [line 2807]
void addListener(
mixed
$callback)
|
|
Adds a new observer to the Event Dispatcher that will listen for all messages emitted by this HTML_Progress2 instance.
Parameters:
apiVersion [line 668]
Returns the current API version compatible with php.version_compare()
display [line 2638]
Renders the new value of progress bar.
drawCircleSegments [line 2120]
array drawCircleSegments(
[string
$dir = '.'], [string
$fileMask = 'c%s.png'])
|
|
Draw all circle segment pictures
Parameters:
getAnimSpeed [line 2193]
Returns delay execution of the progress bar
getBorderAttributes [line 1506]
mixed getBorderAttributes(
[bool
$asString = false])
|
|
Returns the progress bar's border attributes. Assoc array (defaut) or string.
Parameters:
getCellAttributes [line 1291]
mixed getCellAttributes(
[bool
$asString = false])
|
|
Returns the common and private cell attributes. Assoc array (defaut) or string
Parameters:
getCellCoordinates [line 1399]
array getCellCoordinates(
)
|
|
Returns the coordinates of each cell for a polygonal progress shape.
getCellCount [line 1241]
Returns the number of cell in the progress bar. The default value is 10.
getError [line 3627]
false|array|PEAR_Error getError(
)
|
|
Pop an error off of the HTML_Progress2 stack
getFillWay [line 1194]
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 1563]
mixed getFrameAttributes(
[bool
$asString = false])
|
|
Returns the frame attributes. Assoc array (defaut) or string.
Parameters:
getIdent [line 2770]
Returns the current identification string.
getIncrement [line 893]
Returns the progress bar's increment value. The default value is +1.
getLabelAttributes [line 1643]
mixed getLabelAttributes(
string
$name, [bool
$asString = false])
|
|
Returns the label attributes. Assoc array (defaut) or string.
Parameters:
getMaximum [line 829]
Returns the progress bar's maximum value. The default value is 100.
getMinimum [line 765]
Returns the progress bar's minimum value. The default value is 0.
getOrientation [line 1123]
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 1089]
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 1905]
mixed getProgressAttributes(
[bool
$asString = false])
|
|
Returns the progress attributes. Assoc array (defaut) or string.
Parameters:
getScript [line 1968]
string getScript(
[boolean
$raw = true])
|
|
Get the javascript URL or inline code to manage progress bar.
Parameters:
getStyle [line 2247]
string getStyle(
[boolean
$raw = true])
|
|
Get the cascading style sheet to put inline on HTML document
Parameters:
getValue [line 940]
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 3613]
Determine whether there are errors into the HTML_Progress2 stack
hide [line 2652]
incValue [line 1000]
Updates the progress bar's current value by adding increment value. All change listeners are notified.
isBorderPainted [line 725]
boolean isBorderPainted(
)
|
|
Determines whether the progress bar border is painted or not. The default is false.
isIndeterminate [line 682]
boolean isIndeterminate(
)
|
|
Returns mode of the progress bar (determinate or not).
moveNext [line 1065]
Changes value of the progress bar to the next step. All change listeners are notified.
moveStep [line 1022]
void moveStep(
integer
$step)
|
|
Changes new step value of the progress bar. All change listeners are notified.
Parameters:
process [line 2719]
Performs the progress actions
raiseError [line 3593]
A basic wrapper around the default PEAR_Error object
removeLabel [line 1872]
void removeLabel(
string
$name)
|
|
Removes a label to the progress bar.
Parameters:
removeListener [line 2834]
bool removeListener(
mixed
$callback)
|
|
Removes a registered observer.
Parameters:
run [line 2740]
Runs the progress bar (both modes: indeterminate and determinate), and execute all actions defined in user callback identified by method setProgressHandler.
setAnimSpeed [line 2210]
void setAnimSpeed(
integer
$delay)
|
|
Set the delays progress bar execution for the given number of miliseconds.
Parameters:
setBorderAttributes [line 1544]
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 743]
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 1349]
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 1418]
void setCellCoordinates(
integer
$xgrid, integer
$ygrid, [array
$coord = array()])
|
|
Set the coordinates of each cell for a polygonal progress shape.
Parameters:
setCellCount [line 1258]
void setCellCount(
integer
$cells)
|
|
Sets the number of cell in the progress bar
Parameters:
setFillWay [line 1212]
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 1594]
void setFrameAttributes(
[null|array
$attributes = array()])
|
|
Build a frame around the progress bar.
Parameters:
setIdent [line 2785]
void setIdent(
[mixed
$ident = null])
|
|
Sets this Progress instance's identification string.
Parameters:
setIncrement [line 910]
void setIncrement(
integer
$inc)
|
|
Sets the progress bar's increment value.
Parameters:
setIndeterminate [line 703]
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 1696]
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 848]
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 784]
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 1142]
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 1951]
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 2698]
void setProgressHandler(
mixed
$handler)
|
|
Sets the user callback function that execute all actions pending progress
Parameters:
setScript [line 2080]
void setScript(
string
$url)
|
|
Set the external JavaScript code (file) to manage progress element.
Parameters:
setValue [line 959]
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 2674]
toArray [line 2352]
Returns the progress bar structure in an array.
toHtml [line 2385]
Returns the progress structure as HTML.
Documentation generated on Mon, 11 Mar 2019 14:16:23 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|
|