piwik/core/Archive/DataTableFactory.php
/**
     * Creates a DataTable|Set instance using an index of
     * archive data.
     *
     * @param array $index @see DataCollection
     * @param array $resultIndices an array mapping metadata names with pretty metadata
     *                             labels.
     * @return DataTable|DataTable\Map
     */
Creates a DataTable|Set instance using an index of
archive data.

@param array $index @see DataCollection
@param array $resultIndices an array mapping metadata names with pretty metadata
labels.
Creates a DataTable|Set instance using an index of archive data . @param array $index @see DataCollection @param array $resultIndices an array mapping metadata names with pretty metadata labels .
public function make($index, $resultIndices)
    {
        if (empty($resultIndices)) {
            if (empty($index)
                && $this->dataType == 'numeric'
            ) {
                $index = $this->defaultRow;
            }
            $dataTable = $this->createDataTable($index, $keyMetadata = array());
        } else {
            $dataTable = $this->createDataTableMapFromIndex($index, $resultIndices, $keyMetadata = array());
        }
        $this->transformMetadata($dataTable);
        return $dataTable;
    }
public function make ( $ index , $ resultIndices ) { if ( empty ( $ resultIndices ) ) { if ( empty ( $ index ) && $ this -> dataType == 'numeric' ) { $ index = $ this -> defaultRow ; } $ dataTable = $ this -> createDataTable ( $ index , $ keyMetadata = array ( ) ) ; } else { $ dataTable = $ this -> createDataTableMapFromIndex ( $ index , $ resultIndices , $ keyMetadata = array ( ) ) ; } $ this -> transformMetadata ( $ dataTable ) ; return $ dataTable ; }
Creates a DataTable|Set instance using an index of
 archive data.
Creates a DataTable|Set instance using an index of archive data .
// for numeric data, if there's no index (and thus only 1 site & period in the query), // we want to display every queried metric name