\CGExtensions\reportstabular_report_generator

An abstract class to aide in generating a tabular report.

Summary

Methods
Properties
Constants
__construct()
generate()
get_output()
No public properties found
No constants found
before_line()
after_line()
before_group_footers()
after_group_footers()
before_group_headers()
after_group_headers()
draw_cell()
get_cell_contents()
get_group_cell_contents()
before_row()
after_row()
changed()
before_group_header()
after_group_header()
before_group_footer()
after_group_footer()
report()
start()
finish()
each_row()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

generate()

generate() : void

Generate the report output.

get_output()

get_output() : mixed

Get the generated output.

This method may return textual data suitable for echoing/displaying. Or it it may generate a static file and return nothing.

Returns

mixed

before_line()

before_line() : void

A callback function that is called before each and every line.

after_line()

after_line() : void

A callback function that is called after each and every line.

before_group_footers()

before_group_footers() : void

A callback function that is called before the start of outputing group footers.

after_group_footers()

after_group_footers() : void

A callback function that is called after the outputing group footers.

before_group_headers()

before_group_headers() : void

A callback function that is called before the outputing group headers.

after_group_headers()

after_group_headers() : void

A callback function that is called after the outputing group headers.

draw_cell()

draw_cell(\CGExtensions\reports\tabular_report_cellfmt $cell, string $contents)

A callback function to draw a cell.

Parameters

\CGExtensions\reports\tabular_report_cellfmt $cell
string $contents

the cell contents.

get_cell_contents()

get_cell_contents(string $col_key, string $tpl, array $row) : string

A function to get cell contents for the specified column of the current row.

Parameters

string $col_key

The column key (must be a registered column)

string $tpl

The cell template.

array $row

The current row array (usually used internally)

Returns

string —

The formatted cell contents.

get_group_cell_contents()

get_group_cell_contents(string $col_key, string $grp_key, string $tpl, array $row) : string

A function to get cell contents for a group header or footer cell.

Parameters

string $col_key

The column key (must be a registered column)

string $grp_key

The group key.

string $tpl

The cell template.

array $row

The current resultset row. Only for internal use.

Returns

string —

The formatted cell contents.

before_row()

before_row() : void

A callback function called before each row.

after_row()

after_row() : void

A callback function called after each row.

changed()

changed(\CGExtensions\reports\tabular_report_defn_group $grp, array $row) : bool

Test if the value for a specified group has changed.

Parameters

\CGExtensions\reports\tabular_report_defn_group $grp

The group that references the watched column.

array $row

The data row.

Returns

bool

before_group_header()

before_group_header(\CGExtensions\reports\tabular_report_defn_group $grp, bool $is_first) : void

A callback function that is called before a single group header is output.

Parameters

\CGExtensions\reports\tabular_report_defn_group $grp
bool $is_first

True if this is the first of all group headers (subject to change)

after_group_header()

after_group_header(\CGExtensions\reports\tabular_report_defn_group $grp) : void

A callback function that is called after a single group header is output.

Parameters

\CGExtensions\reports\tabular_report_defn_group $grp

before_group_footer()

before_group_footer(\CGExtensions\reports\tabular_report_defn_group $grp) : void

A callback function that is called before a single group footer is generated.

Parameters

\CGExtensions\reports\tabular_report_defn_group $grp

after_group_footer()

after_group_footer(\CGExtensions\reports\tabular_report_defn_group $grp) : void

A callback function that is called after a single group footer is generated.

Parameters

\CGExtensions\reports\tabular_report_defn_group $grp

start()

start() : void

A callback function when the report is started.

finish()

finish() : void

A callback function for when the report is finished.

each_row()

each_row(array $row)

A callback functon for each data row.

Parameters

array $row

The row returned from the query.