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

Class: HTML_Progress2_Lite

Source Location: /HTML_Progress2-2.1.0/Progress2_Lite.php

Class Overview


Standalone 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 105]
Standalone HTML loading bar with only PHP and JS interface.

The HTML_Progress2_Lite class allow you to add a quick horizontal or vertical loading bar to any of your xhtml document. You should have a browser that accept DHTML feature.

This class has no dependency and can be used completely outside the PEAR infrastructure.

Here is a basic example:

  1.  <html>
  2.  <body>
  3.  <?php
  4.  require_once 'HTML/Progress2_Lite.php';
  5.  
  6.  function myProcess()
  7.  {
  8.      for ($i=0; $i<100000; $i++}
  9.  }
  10.  
  11.  $pbl = new HTML_Progress2_Lite();
  12.  $pbl->addLabel('text','txt1','Progress2 Lite - Basic Example');
  13.  $pbl->display();
  14.  
  15.  for($i=1; $i<=100; $i++{
  16.      $pbl->moveStep($i);
  17.      myProcess();
  18.  }
  19.  ?>
  20.  </body>
  21.  </html>



[ Top ]


Class Variables

$background_color =  '#C0C0C0'

[line 222]

Progress bar foreground color.
  • Since: 2.0.0
  • Access: public

Type:   string


[ Top ]

$border = array('width' => 1, 'style' => 'solid', 'color' => '#000000')

[line 239]

Progress bar border properties

  1.  $border = array(
  2.     'width' => 1          # width size in pixel
  3.     'style' => 'solid'    # style (solid, dashed, dotted ...)
  4.     'color' => '#000000'  # color
  5.  );

  • Since: 2.0.0
  • Access: public

Type:   array


[ Top ]

$direction =  'right'

[line 248]

Direction of motion (right, left, up, down).
  • Since: 2.0.0
  • Access: public

Type:   string


[ Top ]

$foreground_color =  '#0033FF'

[line 213]

Progress bar foreground color.
  • Since: 2.0.0
  • Access: public

Type:   string


[ Top ]

$frame = array('show' => false)

[line 273]

Progress bar frame properties

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


Type:   array


[ Top ]

$height =

[line 195]

Progress bar height in pixel.
  • Since: 2.0.0
  • Access: public

Type:   integer


[ Top ]

$label = array()

[line 303]

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.       'font-style' => 'normal',                     # label font style
  16.       'color' => '#000000'                          # label font color
  17.  );


Type:   array


[ Top ]

$left =

[line 168]

Progress bar position from left.
  • Since: 2.0.0
  • Access: public

Type:   integer


[ Top ]

$max =

[line 150]

Maximum steps of the progress bar.
  • Since: 2.0.0
  • Access: public

Type:   integer


[ Top ]

$min =

[line 141]

Minimum steps of the progress bar.
  • Since: 2.0.0
  • Access: public

Type:   integer


[ Top ]

$padding =

[line 204]

Progress bar padding in pixel.
  • Since: 2.0.0
  • Access: public

Type:   integer


[ Top ]

$position =

[line 159]

Progress bar position (absolute, relative).
  • Since: 2.0.0
  • Access: public

Type:   string


[ Top ]

$top =

[line 177]

Progress bar position from top.
  • Since: 2.0.0
  • Access: public

Type:   integer


[ Top ]

$width =

[line 186]

Progress bar width in pixel.
  • Since: 2.0.0
  • Access: public

Type:   integer


[ Top ]



Method Detail

__construct (Constructor)   [line 327]

object __construct( [array $options = array()], [string $id = null])

Constructor (ZE2) Summary.
  • Since: 2.0.0
  • Access: protected

Parameters:

array   $options   —  (optional) has of style parameters for the progress bar
string   $id   —  (optional) progress bar unique identifier

[ Top ]

HTML_Progress2_Lite (Constructor)   [line 311]

HTML_Progress2_Lite HTML_Progress2_Lite( [ $options = array()], [ $id = null])

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

Parameters:

   $options   — 
   $id   — 

[ Top ]

addButton   [line 525]

void addButton( string $name, string $value, string $action, [string $target = 'self'])

Add a new button with the progress bar.

Parameters:

string   $name   —  Button name
string   $value   —  Label value
string   $action   —  Action to do (see QUERY_STRING)
string   $target   —  (optional) Frame target (default is self)

[ Top ]

addLabel   [line 402]

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

Add a new label to the progress bar.

Parameters:

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

[ Top ]

display   [line 975]

void display( )

Show the renders of the progress bar.

[ Top ]

hide   [line 988]

void hide( )

Hides the progress bar.
  • Since: 2.0.0
  • Access: public

[ Top ]

moveMin   [line 792]

void moveMin( )

Changes value of the progress bar to the minimum step.

[ Top ]

moveNext   [line 779]

void moveNext( )

Changes value of the progress bar to the next step.

[ Top ]

moveStep   [line 732]

void moveStep( integer $step)

Changes new step value of the progress bar.
  • Since: 2.0.0
  • Access: public

Parameters:

integer   $step   —  new step value

[ Top ]

removeButton   [line 542]

void removeButton( string $name)

Removes a button to the progress bar.

Parameters:

string   $name   —  Label name

[ Top ]

removeLabel   [line 505]

void removeLabel( string $name)

Removes a label to the progress bar.

Parameters:

string   $name   —  Label name

[ Top ]

setBarAttributes   [line 593]

void setBarAttributes( [array $attributes = array()])

Defines main style of a progress bar.
  • Since: 2.0.0
  • Access: public

Parameters:

array   $attributes   —  (optional) hash of style parameters

[ Top ]

setDirection   [line 370]

void setDirection( string $direction)

Moves the progress bar in all directions (left, right, up , down).
  • Since: 2.0.0
  • Access: public

Parameters:

string   $direction   —  fill way of the progress bar

[ Top ]

setFrameAttributes   [line 558]

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

Build a frame around the progress bar.
  • Since: 2.0.0
  • Access: public

Parameters:

array   $attributes   —  (optional) hash of style parameters

[ Top ]

setLabelAttributes   [line 645]

void setLabelAttributes( string $name, [array $attributes = array()])

Defines style of a progress bar label.

Parameters:

string   $name   —  Label identifier
array   $attributes   —  (optional) hash of style parameters

[ Top ]

show   [line 1003]

void show( )

Shows a progress bar hidden.
  • Since: 2.0.0
  • Access: public

[ Top ]

toHtml   [line 805]

string toHtml( )

Returns the progress bar structure as HTML.

[ Top ]


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