public function getIndexedArray($resultIndices)
    {
        $indexKeys = array_keys($resultIndices);

        $result = $this->createOrderedIndex($indexKeys);
        foreach ($this->data as $idSite => $rowsByPeriod) {
            foreach ($rowsByPeriod as $period => $row) {
                // FIXME: This hack works around a strange bug that occurs when getting
                //         archive IDs through ArchiveProcessing instances. When a table
                //         does not already exist, for some reason the archive ID for
                //         today (or from two days ago) will be added to the Archive
                //         instances list. The Archive instance will then select data
                //         for periods outside of the requested set.
                //         working around the bug here, but ideally, we need to figure
                //         out why incorrect idarchives are being selected.
                if (empty($this->periods[$period])) {
                    continue;
                }

                $this->putRowInIndex($result, $indexKeys, $row, $idSite, $period);
            }
        }

        return $result;
    }
public function getIndexedArray($resultIndices)
    {
        $indexKeys = array_keys($resultIndices);

        $result = $this->createOrderedIndex($indexKeys);
        foreach ($this->data as $idSite => $rowsByPeriod) {
            foreach ($rowsByPeriod as $period => $row) {
                // FIXME: This hack works around a strange bug that occurs when getting
                //         archive IDs through ArchiveProcessing instances. When a table
                //         does not already exist, for some reason the archive ID for
                //         today (or from two days ago) will be added to the Archive
                //         instances list. The Archive instance will then select data
                //         for periods outside of the requested set.
                //         working around the bug here, but ideally, we need to figure
                //         out why incorrect idarchives are being selected.
                if (empty($this->periods[$period])) {
                    continue;
                }

                $this->putRowInIndex($result, $indexKeys, $row, $idSite, $period);
            }
        }

        return $result;
    }
public function getIndexedArray ( $ resultIndices ) { $ indexKeys = array_keys ( $ resultIndices ) ; $ result = $ this -> createOrderedIndex ( $ indexKeys ) ; foreach ( $ this -> data as $ idSite => $ rowsByPeriod ) { foreach ( $ rowsByPeriod as $ period => $ row ) { // FIXME: This hack works around a strange bug that occurs when getting //         archive IDs through ArchiveProcessing instances. When a table //         does not already exist, for some reason the archive ID for //         today (or from two days ago) will be added to the Archive //         instances list. The Archive instance will then select data //         for periods outside of the requested set. //         working around the bug here, but ideally, we need to figure //         out why incorrect idarchives are being selected. if ( empty ( $ this -> periods [ $ period ] ) ) { continue ; } $ this -> putRowInIndex ( $ result , $ indexKeys , $ row , $ idSite , $ period ) ; } } return $ result ; }
Returns archive data as an array indexed by metadata.

@param array $resultIndices An array mapping metadata names to pretty labels
for them. Each archive data row will be indexed
by the metadata specified here.

Eg, array('site' => 'idSite', 'period' => 'Date')
@return array
Returns archive data as an array indexed by metadata .