private function putRowInIndex(&$index, $metadataNamesToIndexBy, $row, $idSite, $period)
    {
        $currentLevel = & $index;

        foreach ($metadataNamesToIndexBy as $metadataName) {
            if ($metadataName == DataTableFactory::TABLE_METADATA_SITE_INDEX) {
                $key = $idSite;
            } elseif ($metadataName == DataTableFactory::TABLE_METADATA_PERIOD_INDEX) {
                $key = $period;
            } else {
                $key = $row[self::METADATA_CONTAINER_ROW_KEY][$metadataName];
            }

            if (!isset($currentLevel[$key])) {
                $currentLevel[$key] = array();
            }

            $currentLevel = & $currentLevel[$key];
        }

        $currentLevel = $row;
    }
private function putRowInIndex(&$index, $metadataNamesToIndexBy, $row, $idSite, $period)
    {
        $currentLevel = & $index;

        foreach ($metadataNamesToIndexBy as $metadataName) {
            if ($metadataName == DataTableFactory::TABLE_METADATA_SITE_INDEX) {
                $key = $idSite;
            } elseif ($metadataName == DataTableFactory::TABLE_METADATA_PERIOD_INDEX) {
                $key = $period;
            } else {
                $key = $row[self::METADATA_CONTAINER_ROW_KEY][$metadataName];
            }

            if (!isset($currentLevel[$key])) {
                $currentLevel[$key] = array();
            }

            $currentLevel = & $currentLevel[$key];
        }

        $currentLevel = $row;
    }
private function putRowInIndex ( & $ index , $ metadataNamesToIndexBy , $ row , $ idSite , $ period ) { $ currentLevel = & $ index ; foreach ( $ metadataNamesToIndexBy as $ metadataName ) { if ( $ metadataName == DataTableFactory :: TABLE_METADATA_SITE_INDEX ) { $ key = $ idSite ; } elseif ( $ metadataName == DataTableFactory :: TABLE_METADATA_PERIOD_INDEX ) { $ key = $ period ; } else { $ key = $ row [ self :: METADATA_CONTAINER_ROW_KEY ] [ $ metadataName ] ; } if ( ! isset ( $ currentLevel [ $ key ] ) ) { $ currentLevel [ $ key ] = array ( ) ; } $ currentLevel = & $ currentLevel [ $ key ] ; } $ currentLevel = $ row ; }
Puts an archive data row in an index.
Puts an archive data row in an index .