PHP Class Piwik\API\DataTableManipulator\Flattener

It loads subtables and combines them into a single table by concatenating the labels. This manipulator is triggered by using flat=1 in the API request.
Inheritance: extends Piwik\API\DataTableManipulator
Afficher le fichier Open project: piwik/piwik Class Usage Examples

Méthodes publiques

Свойство Type Description
$recursiveLabelSeparator string Separator for building recursive labels (or paths)

Méthodes publiques

Méthode Description
flatten ( DataTable $dataTable, string $recursiveLabelSeparator ) : DataTable | Piwik\DataTable\Map
includeAggregateRows ( ) If the flattener is used after calling this method, aggregate rows will be included in the result. This can be useful when they contain data that the leafs don't have (e.g. conversion stats in some cases).

Méthodes protégées

Méthode Description
flattenDataTableInto ( $dataTable, $newDataTable, $prefix = '', $logo = false )
manipulateDataTable ( DataTable $dataTable ) : DataTable Template method called from self::manipulate.
manipulateSubtableRequest ( array $request ) : array Remove the flat parameter from the subtable request

Private Methods

Méthode Description
flattenRow ( Row $row, $rowId, DataTable $dataTable, string $labelPrefix = '', boolean $parentLogo = false )

Method Details

flatten() public méthode

public flatten ( DataTable $dataTable, string $recursiveLabelSeparator ) : DataTable | Piwik\DataTable\Map
$dataTable Piwik\DataTable
$recursiveLabelSeparator string
Résultat Piwik\DataTable | Piwik\DataTable\Map

flattenDataTableInto() protected méthode

protected flattenDataTableInto ( $dataTable, $newDataTable, $prefix = '', $logo = false )
$dataTable DataTable
$newDataTable

includeAggregateRows() public méthode

If the flattener is used after calling this method, aggregate rows will be included in the result. This can be useful when they contain data that the leafs don't have (e.g. conversion stats in some cases).

manipulateDataTable() protected méthode

Flatten each data table.
protected manipulateDataTable ( DataTable $dataTable ) : DataTable
$dataTable Piwik\DataTable
Résultat Piwik\DataTable

manipulateSubtableRequest() protected méthode

Remove the flat parameter from the subtable request
protected manipulateSubtableRequest ( array $request ) : array
$request array
Résultat array

Property Details

$recursiveLabelSeparator public_oe property

Separator for building recursive labels (or paths)
public string $recursiveLabelSeparator
Résultat string