ModelRelationsAndAttributesToSummableReportAdapter Class Reference

Inheritance diagram for ModelRelationsAndAttributesToSummableReportAdapter:
ModelRelationsAndAttributesToReportAdapter ModelRelationsAndAttributesToMatrixReportAdapter ModelRelationsAndAttributesToSummationReportAdapter

Public Member Functions

 getAttributesForFilters ()
 getAttributeLabel ($attribute)
 getAttributesForDisplayAttributes ($existingGroupBys=array(), RedBeanModel $precedingModel=null, $precedingRelation=null)
 resolveDisplayAttributeTypeAndAddSelectClause (RedBeanModelSelectQueryAdapter $selectQueryAdapter, $attribute, $tableName, $columnName, $columnAliasName, $queryStringExtraPart=null)
 resolveOrderByStringForCalculationOrModifier ($attribute, $tableName, $columnName, $queryStringExtraPart=null)
 relationIsReportedAsAttribute ($relation)
 isAttributeACalculationOrModifier ($attribute)
 isAttributeACalculatedGroupByModifier ($attribute)
 getCalculationOrModifierType ($attribute)
 getAttributesForGroupBys ()
 isAttributeIndexOrDerivedTypeADisplayCalculation ($attributeIndexOrDerivedType)
 isDisplayAttributeMadeViaSelect ($attribute)
 getDisplayElementType ($attribute)

Static Public Member Functions

static forgetAll ()
static resolveRealAttributeName ($attribute)

Data Fields

const DISPLAY_CALCULATION_COUNT = 'Count'
const DISPLAY_CALCULATION_SUMMMATION = 'Summation'
const DISPLAY_CALCULATION_AVERAGE = 'Average'
const DISPLAY_CALCULATION_MINIMUM = 'Minimum'
const DISPLAY_CALCULATION_MAXIMUM = 'Maximum'
const GROUP_BY_CALCULATION_DAY = 'Day'
const GROUP_BY_CALCULATION_WEEK = 'Week'
const GROUP_BY_CALCULATION_MONTH = 'Month'
const GROUP_BY_CALCULATION_QUARTER = 'Quarter'
const GROUP_BY_CALCULATION_YEAR = 'Year'

Protected Member Functions

 getDisplayCalculationAttributes ()
 getDisplayCalculationAttribute (&$attributes, $attribute)
 resolveGroupByAttributesForDisplayAttributes (RedBeanModel $precedingModel=null, $precedingRelation=null, &$attributes, $existingGroupBys)
 resolveDisplayCalculationAttributeData (&$attributes, $attribute, $type)
 resolveDisplayCalculationLabel ($attribute, $type)
 getGroupByModifierAttributes ()
 getGroupByCalculatedModifierAttributes ()
 resolveGroupByCalculationAttributeData (&$attributes, $attribute, $type)
 getGroupByCalculationTypeByAttribute ($attribute)
 resolveGroupByCalculationLabel ($attribute, $type)
 getDisplayAttributeForMakingViaSelectType ($attribute)

Static Protected Member Functions

static getTranslatedDisplayCalculationShortLabel ($type)
static getDisplayCalculationTypes ()
static translatedDisplayCalculationShortLabels ()
static getTranslatedGroupByCalculationShortLabel ($type)
static translatedGroupByCalculationShortLabels ()
static getAttributeTypesToExcludeAsGroupByModifiers ()

Protected Attributes

 $shouldIncludeIdAsGroupByAttribute = true

Detailed Description

Base kelper class for managing adapting model relations and attributes into a summable report

Definition at line 40 of file ModelRelationsAndAttributesToSummableReportAdapter.php.


Member Function Documentation

static getTranslatedDisplayCalculationShortLabel ( type  )  [static, protected]
Parameters:
$type 
Returns:
string

Definition at line 90 of file ModelRelationsAndAttributesToSummableReportAdapter.php.

static getDisplayCalculationTypes (  )  [static, protected]
Returns:
array

Definition at line 105 of file ModelRelationsAndAttributesToSummableReportAdapter.php.

static translatedDisplayCalculationShortLabels (  )  [static, protected]
Returns:
array

Definition at line 119 of file ModelRelationsAndAttributesToSummableReportAdapter.php.

static getTranslatedGroupByCalculationShortLabel ( type  )  [static, protected]
Parameters:
$type 
Returns:
string

Definition at line 134 of file ModelRelationsAndAttributesToSummableReportAdapter.php.

static translatedGroupByCalculationShortLabels (  )  [static, protected]
Returns:
array

Definition at line 144 of file ModelRelationsAndAttributesToSummableReportAdapter.php.

getAttributesForFilters (  ) 
Returns:
array

Reimplemented from ModelRelationsAndAttributesToReportAdapter.

Definition at line 158 of file ModelRelationsAndAttributesToSummableReportAdapter.php.

getAttributeLabel ( attribute  ) 
Parameters:
string $attribute

Reimplemented from ModelRelationsAndAttributesToReportAdapter.

Definition at line 169 of file ModelRelationsAndAttributesToSummableReportAdapter.php.

getAttributesForDisplayAttributes ( existingGroupBys = array(),
RedBeanModel precedingModel = null,
precedingRelation = null 
)
Parameters:
array $existingGroupBys
null|RedBeanModel $precedingModel
null|string $precedingRelation
Returns:
array
Exceptions:
NotSupportedException if there the preceding model and relation are not either both defined or both null

Definition at line 193 of file ModelRelationsAndAttributesToSummableReportAdapter.php.

resolveDisplayAttributeTypeAndAddSelectClause ( RedBeanModelSelectQueryAdapter selectQueryAdapter,
attribute,
tableName,
columnName,
columnAliasName,
queryStringExtraPart = null 
)
Parameters:
RedBeanModelSelectQueryAdapter $selectQueryAdapter
string $attribute
string $tableName
string $columnName
string $columnAliasName
null|string $queryStringExtraPart

Definition at line 222 of file ModelRelationsAndAttributesToSummableReportAdapter.php.

resolveOrderByStringForCalculationOrModifier ( attribute,
tableName,
columnName,
queryStringExtraPart = null 
)
Parameters:
string $attribute
string $tableName
string $columnName
null|string $queryStringExtraPart
Returns:
string
Exceptions:
NotSupportedException if the type is invalid or null

Definition at line 289 of file ModelRelationsAndAttributesToSummableReportAdapter.php.

relationIsReportedAsAttribute ( relation  ) 
Parameters:
string $relation
Returns:
bool

Reimplemented from ModelRelationsAndAttributesToReportAdapter.

Definition at line 350 of file ModelRelationsAndAttributesToSummableReportAdapter.php.

isAttributeACalculationOrModifier ( attribute  ) 
Parameters:
string $attribute
Returns:
bool

Definition at line 364 of file ModelRelationsAndAttributesToSummableReportAdapter.php.

isAttributeACalculatedGroupByModifier ( attribute  ) 
Parameters:
string $attribute
Returns:
bool

Definition at line 380 of file ModelRelationsAndAttributesToSummableReportAdapter.php.

static resolveRealAttributeName ( attribute  )  [static]
Parameters:
string $attribute
Returns:
string

Reimplemented from ModelRelationsAndAttributesToReportAdapter.

Definition at line 395 of file ModelRelationsAndAttributesToSummableReportAdapter.php.

getCalculationOrModifierType ( attribute  ) 
Parameters:
string $attribute
Returns:
string

Definition at line 409 of file ModelRelationsAndAttributesToSummableReportAdapter.php.

getAttributesForGroupBys (  ) 
Returns:
array

Reimplemented from ModelRelationsAndAttributesToReportAdapter.

Definition at line 422 of file ModelRelationsAndAttributesToSummableReportAdapter.php.

isAttributeIndexOrDerivedTypeADisplayCalculation ( attributeIndexOrDerivedType  ) 
Parameters:
string $attributeIndexOrDerivedType
Returns:
bool

Definition at line 439 of file ModelRelationsAndAttributesToSummableReportAdapter.php.

isDisplayAttributeMadeViaSelect ( attribute  ) 
Parameters:
string $attribute
Returns:
bool

Reimplemented from ModelRelationsAndAttributesToReportAdapter.

Definition at line 458 of file ModelRelationsAndAttributesToSummableReportAdapter.php.

getDisplayElementType ( attribute  ) 
Parameters:
string $attribute
Returns:
string
Exceptions:
NotSupportedException if the attribute is an invalid display calculation

Reimplemented from ModelRelationsAndAttributesToReportAdapter.

Definition at line 475 of file ModelRelationsAndAttributesToSummableReportAdapter.php.

static getAttributeTypesToExcludeAsGroupByModifiers (  )  [static, protected]
getDisplayCalculationAttributes (  )  [protected]
Returns:
array

Definition at line 531 of file ModelRelationsAndAttributesToSummableReportAdapter.php.

getDisplayCalculationAttribute ( &$  attributes,
attribute 
) [protected]
Parameters:
array $attributes
string $attribute

Definition at line 550 of file ModelRelationsAndAttributesToSummableReportAdapter.php.

resolveGroupByAttributesForDisplayAttributes ( RedBeanModel precedingModel = null,
precedingRelation = null,
&$  attributes,
existingGroupBys 
) [protected]
Parameters:
null|RedBeanModel $precedingModel
null|string $precedingRelation
array $attributes
array $existingGroupBys

Reimplemented in ModelRelationsAndAttributesToMatrixReportAdapter.

Definition at line 581 of file ModelRelationsAndAttributesToSummableReportAdapter.php.

resolveDisplayCalculationAttributeData ( &$  attributes,
attribute,
type 
) [protected]
Parameters:
array $attributes
string $attribute
string $type

Definition at line 638 of file ModelRelationsAndAttributesToSummableReportAdapter.php.

resolveDisplayCalculationLabel ( attribute,
type 
) [protected]
Parameters:
string $attribute
string $type
Returns:
string

Definition at line 652 of file ModelRelationsAndAttributesToSummableReportAdapter.php.

getGroupByModifierAttributes (  )  [protected]
Returns:
array

Definition at line 662 of file ModelRelationsAndAttributesToSummableReportAdapter.php.

getGroupByCalculatedModifierAttributes (  )  [protected]
Returns:
array

Definition at line 679 of file ModelRelationsAndAttributesToSummableReportAdapter.php.

resolveGroupByCalculationAttributeData ( &$  attributes,
attribute,
type 
) [protected]
Parameters:
array $attributes
string $attribute
string $type

Definition at line 707 of file ModelRelationsAndAttributesToSummableReportAdapter.php.

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

Definition at line 720 of file ModelRelationsAndAttributesToSummableReportAdapter.php.

resolveGroupByCalculationLabel ( attribute,
type 
) [protected]
Parameters:
string $attribute
string $type
Returns:
string

Definition at line 732 of file ModelRelationsAndAttributesToSummableReportAdapter.php.

getDisplayAttributeForMakingViaSelectType ( attribute  )  [protected]
Parameters:
string $attribute
Returns:
string

Definition at line 743 of file ModelRelationsAndAttributesToSummableReportAdapter.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Wed Jun 28 07:10:27 2017