Checks if the Content-Type is of a certain type. This is useful if the Content-Type header contains charset information and you need to know if the Content-Type matches a particular type.
string $type Content type to check against:
bool
public function isContentType($type) {
return stripos($this
->getContentType(), $type) !== false;
}