Class ArrayExport

Description

Construct an array for exporting the data

Create a monolithic array with all the data for export. The array is an intermediary form for creating PDF and HTML tables of data.

Located in /inc/export/arrayexport.php (line 33)


	
			
Variable Summary
string $author
string $breakfield
string $creator
array $export
unknown? $exporter
string $header
string $keywords
string $subject
array $_totals
Method Summary
ArrayExport ArrayExport (DBList &$dblist, string $breakfield)
void appendEA (ArrayExport &$ea)
void makeExportArray ()
array _formatRowData (array &$row)
string _formatVal (string $val,  $format)
array _getColWidths (integer $numcols, array $entry)
array _getMetaData ()
void _getTotals ()
void _incrementTotals ( $row)
void _resetTotals ()
string _sectionHeader (array $row)
Variables
string $author = 'Bumblebee' (line 45)
  • var: report Author (report metadata)
string $breakfield (line 37)
  • var: field name on which the report should be broken into sections
string $creator = 'Bumblebee Instrument Management System : bumblebeeman.sf.net' (line 47)
  • var: report Creator (report metadata)
DBList $dblist (line 35)
  • var: raw data list
array $export = array() (line 41)
  • var: data array of exported data
unknown? $exporter (line 39)
  • var: unused?
string $header (line 43)
  • var: header for the report
string $keywords = 'instruments, consumables, usage, report, billing, invoicing' (line 51)
  • var: report Keywords (report metadata)
string $subject = 'Instrument and consumable usage report' (line 49)
  • var: report Subject (report metadata)
boolean $_doingTotalCalcs = false (line 55)
  • var: calculate column totals
array $_totals (line 53)
  • var: list of subtotals for each section of the report for fields that are totalled
Methods
Constructor ArrayExport (line 63)

Create a new array export object to be used by both HTML and PDF export

ArrayExport ArrayExport (DBList &$dblist, string $breakfield)
  • DBList &$dblist: data to be exported (passed by reference for efficiency only)
  • string $breakfield: name of field to use to break report into sections
appendEA (line 265)

join another ArrayExport object into this one.

void appendEA (ArrayExport &$ea)
  • ArrayExport &$ea: ArrayExport object to be appended to this one
makeExportArray (line 71)

Parsed the exported data and create the marked-up array of data

void makeExportArray ()
_formatRowData (line 214)

format a row of data using the formmatting information defined

  • return: formatted data row
array _formatRowData (array &$row)
  • array &$row: data row
_formatVal (line 229)

format a data value according to the defined rules for decimal places and currency

  • return: formatted value
string _formatVal (string $val,  $format)
  • string $val: value to be formatted
  • $format
_getColWidths (line 142)

get the column widths for the columns (if defined)

  • return: number of columns and a picture of the column widths spec
array _getColWidths (integer $numcols, array $entry)
  • integer $numcols: number of columns
  • array $entry: a row from the table
_getMetaData (line 158)

create an array of metadata to include in the output

  • return: key => value metadata
array _getMetaData ()
_getTotals (line 198)

get the column subtotals

void _getTotals ()
_incrementTotals (line 186)

increment each column subtotal

void _incrementTotals ( $row)
  • $row
_resetTotals (line 171)

reset the column subtotals to 0

void _resetTotals ()
_sectionHeader (line 125)

create the section header

  • return: header string
string _sectionHeader (array $row)
  • array $row: current data row

Documentation generated on Tue, 06 Mar 2007 10:00:35 +0000 by phpDocumentor 1.3.0