- /**
- * Replace the hashedUrl keys in $results with the unhashed URL from the
- * request, as recorded in $urlHashMap.
- */
- private function replaceUrlHashes(array $results, array $urlHashMap) {
- $newResults = [];
- foreach($results as $hash => $res) {
- if (isset($urlHashMap[$hash])) {
- $newResults[$urlHashMap[$hash]] = $res;
- } else {
- $newResults[$hash] = $res;
- }
- }
- return $newResults;