Check if the collection of headers has a particular value
string $searchValue Value to search for:
bool $caseInsensitive Set to TRUE to use a case insensitive search:
bool
public function hasValue($searchValue, $caseInsensitive = false) {
foreach ($this
->toArray() as $value) {
if ($value == $searchValue) {
return true;
}
elseif ($caseInsensitive && !strcasecmp($value, $searchValue)) {
return true;
}
}
return false;
}