Class StatusStars

Description

This lovely little class will print a semi-accurate series of asterisks as a

status bar for anything you want(written for the importer system). The idea is that you give it a total number of objects and a level of detail, then make sure that you update statistics when one of your total is done, and it will print directly to the end user the status of the process. Don't forget to use a javascript re-direct at the end of your process, otherwise you'll have header problems.

  • version: $Id: StatusStars.class.php,v 1.3 2007/03/21 15:51:21 adamfranco Exp $
  • license: GNU General Public License (GPL)
  • copyright: Copyright © 2005, Middlebury College
  • since: 2/22/06

Located in /harmoni/core/utilities/StatusStars.class.php (line 29)


	
			
Direct descendents
Class Description
CLIStatusStars A command-line-environment of status stars. This class will not output HTML.
Variable Summary
mixed $_completed
mixed $_detail
mixed $_ob_data
mixed $_total
Method Summary
StatusStars StatusStars ([mixed $label = ''])
void endBlock ()
void initializeStatistics (int $total, [int $detail = 100])
void startBlock ()
void _addDashes ()
void _addSpaces (int $mod)
void _jump_obs ()
void _land_obs ()
void _updateStatusBar (int $stars, bool $end)
Variables
mixed $_completed (line 37)
mixed $_currentPercent (line 39)
mixed $_detail (line 43)
mixed $_ob_data = array() (line 41)
mixed $_total (line 35)

*******************************************************

STATISTICS HANDLING *******************************************************

Methods
Constructor StatusStars (line 51)

Constructor

  • since: 2/22/06
  • access: public
StatusStars StatusStars ([mixed $label = ''])
endBlock (line 222)

Start a new line

  • since: 3/12/07
  • access: public
void endBlock ()

Redefined in descendants as:
initializeStatistics (line 64)

Gathers the total number of granules for importer status

  • since: 2/17/06
  • access: public
void initializeStatistics (int $total, [int $detail = 100])
  • int $total: the total number of items being statused
  • int $detail: the number
startBlock (line 211)

Start a new line

  • since: 3/12/07
  • access: public
void startBlock ()

Redefined in descendants as:
updateStatistics (line 78)

Updates the number of granules imported for importer status

  • since: 2/17/06
  • access: public
void updateStatistics ()
_addDashes (line 151)

Prints the right number of dashes

  • since: 2/22/06
  • access: private
void _addDashes ()
_addSpaces (line 139)

Prints the right number of Spaces

  • since: 2/22/06
  • access: private
void _addSpaces (int $mod)
  • int $mod: the number of spaces to be taken away due to numbers
_createStatusBar (line 100)

Prints the status bar to the user

  • since: 2/20/06
  • access: private
void _createStatusBar ()
_jump_obs (line 182)

Climbs down the ob ladder and saves the data to put back later

  • since: 2/20/06
  • access: private
void _jump_obs ()
_land_obs (line 196)

Climps back up the ob ladder adding back the data that was there

  • since: 2/20/06
  • access: private
void _land_obs ()
_updateStatusBar (line 165)

Updates the statys bar for the user

  • since: 2/20/06
  • access: private
void _updateStatusBar (int $stars, bool $end)
  • int $stars: the number of asterisks that need to be printed
  • bool $end: whether or not we're done and should continue

Documentation generated on Wed, 19 Sep 2007 10:26:42 -0400 by phpDocumentor 1.3.0RC3