CORE POS - Fannie
The CORE POS back end
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
COREPOS\Fannie\Plugin\CoreWarehouse\CwReportDataSource Class Reference
Inheritance diagram for COREPOS\Fannie\Plugin\CoreWarehouse\CwReportDataSource:
COREPOS\Fannie\Plugin\CoreWarehouse\sources\GeneralDayDataSource COREPOS\Fannie\Plugin\CoreWarehouse\sources\ZipCodeDataSource

Public Member Functions

 fetchReportData ($report_class_name,\FannieConfig $config,\SQLManager $connection)
 
 additionalFields ($report_class_name)
 

Static Public Member Functions

static getDataSource ($report_class_name)
 

Protected Member Functions

 sourceForReport ($report_class_name)
 
 dateToID ($date)
 

Protected Attributes

 $valid_reports = array()
 

Detailed Description

Base class for extracting transaction data from Core Warehouse Plugin tables and feeding that data back into default reports

Member Function Documentation

COREPOS\Fannie\Plugin\CoreWarehouse\CwReportDataSource::additionalFields (   $report_class_name)

Get list of additional fields, if any, that can be used with this data source and the specified report

Parameters
[string]$report_class_name name of report
Returns
[array] of CwReportField objects
COREPOS\Fannie\Plugin\CoreWarehouse\CwReportDataSource::dateToID (   $date)
protected

Convert a date string to a warehouse format date ID Ex: 2000-10-31 => 20001031

Parameters
$date[string] date representation
Returns
[integer] equivalent date ID
COREPOS\Fannie\Plugin\CoreWarehouse\CwReportDataSource::fetchReportData (   $report_class_name,
\FannieConfig  $config,
\SQLManager  $connection 
)

Fetch data for the specified report

Parameters
[string]$report_class_name name of report
[FannieConfig]$config current configuration
[SQLManager]$connection database connection
Returns
[array] report records
static COREPOS\Fannie\Plugin\CoreWarehouse\CwReportDataSource::getDataSource (   $report_class_name)
static

Find a data source class for the existing name

Parameters
[string]$report_class_name name of report
Returns
[CwReportDataSource] data source object or [boolean] false if none exists
COREPOS\Fannie\Plugin\CoreWarehouse\CwReportDataSource::sourceForReport (   $report_class_name)
protected

Can this source be used with the given report

Parameters
[string]$report_class_name name of report
Returns
[boolean]

The documentation for this class was generated from the following file: