ReportDataProvider Class Reference

Inheritance diagram for ReportDataProvider:
MatrixReportDataProvider RowsAndColumnsReportDataProvider SummationReportDataProvider CalendarRowsAndColumnsReportDataProvider SummationDrillDownReportDataProvider

Public Member Functions

 __construct (Report $report, array $config=array())
 setRunReport ($runReport)
 getReport ()
 resolveDisplayAttributes ()
 resolveGroupBys ()
 calculateTotalItemCount ()
 makeTotalCountSqlQueryForDisplay ()
 makeSqlQueryForDisplay ()
 resolveFiltersForReadPermissions (array $filters, &$filtersStructure)
 resolveFiltersForVariableStates ($filters, &$filtersStructure)
 getData ($refresh=false)
 setOffset ($offset)
 runQueryAndGrandTotalsData ()

Protected Member Functions

 isReportValidType ()
 fetchData ()
 resolveOffset ()
 resolveLimit ()
 runQueryAndGetResolveResultsData ($offset, $limit)
 getRowsData ($sql)
 getGrandTotalsRowsData ()
 fetchKeys ()
 makeSqlQueryForFetchingData (RedBeanModelSelectQueryAdapter $selectQueryAdapter, $offset, $limit)
 makeSqlQueryForFetchingTotalItemCount ($selectQueryAdapter, $selectJustCount=false)
 getDisplayAttributesForGrandTotals ()
 makeSqlQueryForGrandTotals ()
 makeDisplayAttributes (RedBeanModelJoinTablesQueryAdapter $joinTablesAdapter, RedBeanModelSelectQueryAdapter $selectQueryAdapter)
 makeFiltersContent (RedBeanModelJoinTablesQueryAdapter $joinTablesAdapter)
 makeOrderBysContent (RedBeanModelJoinTablesQueryAdapter $joinTablesAdapter)
 makeGroupBysContent (RedBeanModelJoinTablesQueryAdapter $joinTablesAdapter)
 makeGroupBysContentForGrandTotals (RedBeanModelJoinTablesQueryAdapter $joinTablesAdapter)
 makeGroupBysContentForCount (RedBeanModelJoinTablesQueryAdapter $joinTablesAdapter)
 resolveFilterForReadPermissionAttributeIndex ($attributeIndexOrDerivedTypePrefix, $attributeOrDerivedAttributeType)
 makeReadPermissionsAttributeIndexes (array $filters)
 resolveFilterForVariableStateAttributeIndex ($attributeIndexOrDerivedTypePrefix, $variableStateData)
 makeVariableStatesAttributeIndexes (array $filters)
 getDisplayAttributeByAttribute ($attribute)
 getDisplayAttributeKeyByAttribute ($attribute)
 makeSelectQueryAdapter ($isDistinct=false)
 resolveSqlQueryAdapterForCount (RedBeanModelSelectQueryAdapter $selectQueryAdapter)

Static Protected Member Functions

static resolveIdByOffset ($offset)

Protected Attributes

 $report
 $runReport = false
 $offset
 $haveGrandTotals = false

Detailed Description

Base class for constructing a ReportDataProvider

Definition at line 40 of file ReportDataProvider.php.


Constructor & Destructor Documentation

__construct ( Report report,
array $  config = array() 
)
Parameters:
Report $report
array $config

Reimplemented in MatrixReportDataProvider, and SummationReportDataProvider.

Definition at line 80 of file ReportDataProvider.php.


Member Function Documentation

isReportValidType (  )  [abstract, protected]

In each child class, this method can be used to determine if the report specified is valid for this reportDataProvider

Returns:
boolean

Reimplemented in MatrixReportDataProvider, RowsAndColumnsReportDataProvider, SummationDrillDownReportDataProvider, and SummationReportDataProvider.

setRunReport ( runReport  ) 
Parameters:
bool $runReport

Definition at line 93 of file ReportDataProvider.php.

getReport (  ) 
Returns:
Report

Definition at line 102 of file ReportDataProvider.php.

resolveDisplayAttributes (  ) 
resolveGroupBys (  ) 
Returns:
array

Reimplemented in MatrixReportDataProvider.

Definition at line 118 of file ReportDataProvider.php.

calculateTotalItemCount (  ) 

See the yii documentation. This function is made public for unit testing.

Returns:
int|string

Reimplemented in MatrixReportDataProvider, and SummationReportDataProvider.

Definition at line 127 of file ReportDataProvider.php.

makeTotalCountSqlQueryForDisplay (  ) 
Returns:
string

Definition at line 142 of file ReportDataProvider.php.

makeSqlQueryForDisplay (  ) 
Returns:
string

Definition at line 151 of file ReportDataProvider.php.

resolveFiltersForReadPermissions ( array $  filters,
&$  filtersStructure 
)

Public for testing purposes only

Parameters:
$filters 
$filtersStructure 
Returns:
array

Definition at line 165 of file ReportDataProvider.php.

resolveFiltersForVariableStates ( filters,
&$  filtersStructure 
)

Public for testing purposes only

Parameters:
$filters 
$filtersStructure 
Returns:
array

Definition at line 214 of file ReportDataProvider.php.

getData ( refresh = false  ) 

Override so when refresh is true it resets _rowsData

Definition at line 249 of file ReportDataProvider.php.

fetchData (  )  [protected]
Returns:
array

Reimplemented in CalendarRowsAndColumnsReportDataProvider.

Definition at line 261 of file ReportDataProvider.php.

resolveOffset (  )  [protected]
Returns:
int|null

Definition at line 275 of file ReportDataProvider.php.

resolveLimit (  )  [protected]
Returns:
int|null

Definition at line 304 of file ReportDataProvider.php.

runQueryAndGetResolveResultsData ( offset,
limit 
) [protected]
Parameters:
int $offset
int $limit
Returns:
array

Reimplemented in MatrixReportDataProvider.

Definition at line 325 of file ReportDataProvider.php.

static resolveIdByOffset ( offset  )  [static, protected]
Parameters:
int $offset
Returns:
int

Definition at line 371 of file ReportDataProvider.php.

getRowsData ( sql  )  [protected]
Parameters:
$sql 
Returns:
array

Definition at line 385 of file ReportDataProvider.php.

fetchKeys (  )  [protected]

See the yii documentation.

Returns:
array

Definition at line 408 of file ReportDataProvider.php.

makeSqlQueryForFetchingData ( RedBeanModelSelectQueryAdapter selectQueryAdapter,
offset,
limit 
) [protected]
Parameters:
RedBeanModelSelectQueryAdapter $selectQueryAdapter
int $offset
int $limit
Returns:
string

Definition at line 424 of file ReportDataProvider.php.

makeSqlQueryForFetchingTotalItemCount ( selectQueryAdapter,
selectJustCount = false 
) [protected]
Parameters:
$selectQueryAdapter 
bool $selectJustCount
Returns:
string

Definition at line 444 of file ReportDataProvider.php.

makeDisplayAttributes ( RedBeanModelJoinTablesQueryAdapter joinTablesAdapter,
RedBeanModelSelectQueryAdapter selectQueryAdapter 
) [protected]
Parameters:
RedBeanModelJoinTablesQueryAdapter $joinTablesAdapter
RedBeanModelSelectQueryAdapter $selectQueryAdapter

Definition at line 511 of file ReportDataProvider.php.

makeFiltersContent ( RedBeanModelJoinTablesQueryAdapter joinTablesAdapter  )  [protected]
Parameters:
RedBeanModelJoinTablesQueryAdapter $joinTablesAdapter
Returns:
null|string

Definition at line 523 of file ReportDataProvider.php.

makeOrderBysContent ( RedBeanModelJoinTablesQueryAdapter joinTablesAdapter  )  [protected]
Parameters:
RedBeanModelJoinTablesQueryAdapter $joinTablesAdapter
Returns:
null|string

Reimplemented in SummationDrillDownReportDataProvider.

Definition at line 537 of file ReportDataProvider.php.

makeGroupBysContent ( RedBeanModelJoinTablesQueryAdapter joinTablesAdapter  )  [protected]
Parameters:
RedBeanModelJoinTablesQueryAdapter $joinTablesAdapter
Returns:
null|string

Reimplemented in SummationDrillDownReportDataProvider.

Definition at line 547 of file ReportDataProvider.php.

makeGroupBysContentForGrandTotals ( RedBeanModelJoinTablesQueryAdapter joinTablesAdapter  )  [protected]
Parameters:
RedBeanModelJoinTablesQueryAdapter $joinTablesAdapter
Returns:
null|string

Reimplemented in MatrixReportDataProvider.

Definition at line 557 of file ReportDataProvider.php.

makeGroupBysContentForCount ( RedBeanModelJoinTablesQueryAdapter joinTablesAdapter  )  [protected]
Parameters:
RedBeanModelJoinTablesQueryAdapter $joinTablesAdapter
Returns:
null|string

Reimplemented in MatrixReportDataProvider.

Definition at line 566 of file ReportDataProvider.php.

resolveFilterForReadPermissionAttributeIndex ( attributeIndexOrDerivedTypePrefix,
attributeOrDerivedAttributeType 
) [protected]
Parameters:
string|null $attributeIndexOrDerivedTypePrefix
string $attributeOrDerivedAttributeType
Returns:
FilterForReportForm
Exceptions:
NotSupportedException 

Definition at line 577 of file ReportDataProvider.php.

makeReadPermissionsAttributeIndexes ( array $  filters  )  [protected]
Parameters:
array $filters
Returns:
array

Reimplemented in SummationDrillDownReportDataProvider.

Definition at line 607 of file ReportDataProvider.php.

resolveFilterForVariableStateAttributeIndex ( attributeIndexOrDerivedTypePrefix,
variableStateData 
) [protected]
Parameters:
string $attributeIndexOrDerivedTypePrefix
array $variableStateData
Returns:
FilterForReportForm

Definition at line 629 of file ReportDataProvider.php.

makeVariableStatesAttributeIndexes ( array $  filters  )  [protected]
Parameters:
array $filters
Returns:
array

Definition at line 647 of file ReportDataProvider.php.

getDisplayAttributeByAttribute ( attribute  )  [protected]
Parameters:
$attribute 
Returns:
mixed

Definition at line 668 of file ReportDataProvider.php.

getDisplayAttributeKeyByAttribute ( attribute  )  [protected]
Parameters:
$attribute 
Returns:
int|string

Definition at line 683 of file ReportDataProvider.php.

makeSelectQueryAdapter ( isDistinct = false  )  [protected]

Makes sql query adapter.

Parameters:
bool $isDistinct

Reimplemented in CalendarRowsAndColumnsReportDataProvider.

Definition at line 698 of file ReportDataProvider.php.

resolveSqlQueryAdapterForCount ( RedBeanModelSelectQueryAdapter selectQueryAdapter  )  [protected]

Resolve sql query adapter for count query.

Parameters:
RedBeanModelSelectQueryAdapter $selectQueryAdapter
Returns:
RedBeanModelSelectQueryAdapter
Exceptions:
NotSupportedException 

Reimplemented in CalendarRowsAndColumnsReportDataProvider.

Definition at line 709 of file ReportDataProvider.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Sat Apr 29 07:10:28 2017