protected function getHeaderType($headers, $header)
{
if (!$headers->has($header)) {
return 'application/json';
}
$accept = $headers->get($header);
$value = $accept->getFieldValue();
$value = explode(';', $value, 2);
$accept = array_shift($value);
$accept = strtolower(trim($accept));
switch ($accept) {
case 'application/json':
case 'application/vnd.zfcampus.v1.config+json':
return $accept;
default:
return 'application/json';
}
}