PHP Class Piwik\API\DataTableManipulator\ReportTotalsCalculator

.. for a given report / dataTable.
Inheritance: extends Piwik\API\DataTableManipulator
Mostra file Open project: piwik/piwik Class Usage Examples

Public Methods

Method Description
__construct ( boolean $apiModule = false, boolean $apiMethod = false, array $request = [], Report $report = null ) Constructor
calculate ( DataTable $table ) : DataTable | Piwik\DataTable\Map

Protected Methods

Method Description
manipulateDataTable ( DataTable $dataTable ) : DataTable Adds ratio metrics if possible.
manipulateSubtableRequest ( array $request ) : array Make sure to get all rows of the first level table.

Private Methods

Method Description
findFirstLevelReport ( )
isAllMetricsReport ( )
makeSureToWorkOnFirstLevelDataTable ( $table )
sumColumnValueToTotal ( $columns, $metricId, $metricName )

Method Details

__construct() public method

Constructor
public __construct ( boolean $apiModule = false, boolean $apiMethod = false, array $request = [], Report $report = null )
$apiModule boolean
$apiMethod boolean
$request array
$report Piwik\Plugin\Report

calculate() public method

public calculate ( DataTable $table ) : DataTable | Piwik\DataTable\Map
$table Piwik\DataTable
return Piwik\DataTable | Piwik\DataTable\Map

manipulateDataTable() protected method

Adds ratio metrics if possible.
protected manipulateDataTable ( DataTable $dataTable ) : DataTable
$dataTable Piwik\DataTable
return Piwik\DataTable

manipulateSubtableRequest() protected method

Make sure to get all rows of the first level table.
protected manipulateSubtableRequest ( array $request ) : array
$request array
return array