adding formatter for list in spreadsheet (ods, xlsx)

This commit is contained in:
2018-11-07 13:23:11 +01:00
parent c1b46b9cb0
commit f937e9d12c
7 changed files with 311 additions and 3 deletions

View File

@@ -206,6 +206,14 @@ class CSVListFormatter implements FormatterInterface
$this->prepareCacheLabels();
}
if (!\array_key_exists($key, $this->labelsCache)){
throw new \OutOfBoundsException(sprintf("The key \"%s\" "
. "is not present in the list of keys handled by "
. "this query. Check your `getKeys` and `getLabels` "
. "methods. Available keys are %s.", $key,
\implode(", ", \array_keys($this->labelsCache))));
}
return $this->labelsCache[$key]($value);
}