Xataface HTML Reports Module 0.2
HTML Reports Module for Xataface
Public Member Functions | Static Public Member Functions | Data Fields
modules_htmlreports Class Reference

The main HTML Report module class. This includes all of the core module tasks. More...

Public Member Functions

 __construct ()
 Constructor for the module. This is called only once per request when the module is initialized.
 getBaseURL ()
 Returns the base URL to this module's directory. Useful for including Javascripts and CSS.
 getReportById ($id)
 Returns a report by its report id.

Static Public Member Functions

static getReportsTableSQL ()
 Returns the SQL required to build the reports table.
static q ($sql)
 Performs an SQL query or an array of queries.
static queryReports ($sql)
 Performs an SQL query - but catches errors and tries to create the reports table if it fails the first time. This allows the reports table to be created on demand if necessary. Kind of a cheap trick for an auto install.

Data Fields

const REPORTS_TABLE = 'dataface__htmlreports_reports'
 The name of the table that stores the report template.

Detailed Description

The main HTML Report module class. This includes all of the core module tasks.

Accessing Objects Of This Class

 $moduleTool = Dataface_ModuleTool::getInstance();
 $reportsModule = $moduleTool->loadModule('modules_htmlreports');

Definition at line 34 of file htmlreports.php.


Constructor & Destructor Documentation

__construct ( )

Constructor for the module. This is called only once per request when the module is initialized.

Definition at line 129 of file htmlreports.php.


Member Function Documentation

getBaseURL ( )

Returns the base URL to this module's directory. Useful for including Javascripts and CSS.

Definition at line 192 of file htmlreports.php.

getReportById ( id)

Returns a report by its report id.

Parameters:
int$idThe integer id.
Returns:
Dataface_Record The report.

Definition at line 205 of file htmlreports.php.

static getReportsTableSQL ( ) [static]

Returns the SQL required to build the reports table.

Returns:
string The SQL string

Definition at line 54 of file htmlreports.php.

static q ( sql) [static]

Performs an SQL query or an array of queries.

Parameters:
mixed$sqlThe SQL query string to be run or an array of queries.
Returns:
resource The MySQL resource.
Exceptions:
ExceptionIf there is an error.

Definition at line 87 of file htmlreports.php.

static queryReports ( sql) [static]

Performs an SQL query - but catches errors and tries to create the reports table if it fails the first time. This allows the reports table to be created on demand if necessary. Kind of a cheap trick for an auto install.

Parameters:
mixed$sqlThe SQL query string to be run or an array of queries.
Returns:
resource The MySQL resource.
Exceptions:
ExceptionIf there is an error.

Definition at line 113 of file htmlreports.php.


Field Documentation

const REPORTS_TABLE = 'dataface__htmlreports_reports'

The name of the table that stores the report template.

Definition at line 39 of file htmlreports.php.


The documentation for this class was generated from the following file:
 All Data Structures Files Functions Variables Enumerations