public function __construct($data, $case_sensitive = true)
{
// Auto flip
if (is_array($data) && key($data) === 0) {
$data = array_flip($data);
}
$this->data = [];
foreach ($data as $rawkey => $value) {
$key = $case_sensitive ? $rawkey : strtolower($rawkey);
$this->data[$key] = $value;
}
$this->caseSensitive = $case_sensitive;
}