Piwik\Archive::getDataTableFromNumeric PHP Method

getDataTableFromNumeric() public method

If multiple sites were requested in {@link build()} or {@link factory()} the result will be a DataTable\Map that is indexed by site ID. If multiple periods were requested in {@link build()} or {@link factory()} the result will be a {@link DataTable\Map} that is indexed by period. The site ID index is always first, so if multiple sites & periods were requested, the result will be a {@link DataTable\Map} indexed by site ID which contains {@link DataTable\Map} instances that are indexed by period. _Note: Every DataTable instance returned will have at most one row in it. The contents of each row will be the requested metrics for the appropriate site and period._
public getDataTableFromNumeric ( string | array $names ) : DataTable | Piwik\DataTable\Map
$names string | array One or more archive names, eg, 'nb_visits', 'Referrers_distinctKeywords', etc.
return DataTable | Piwik\DataTable\Map A DataTable if multiple sites and periods were not requested. An appropriately indexed DataTable\Map if otherwise.
    public function getDataTableFromNumeric($names)
    {
        $data = $this->get($names, 'numeric');
        return $data->getDataTable($this->getResultIndices());
    }