original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: Puts an archive data row in an index.
docstring_tokens: Puts an archive data row in an index .