src/Request.php
public function getContentType() {
		if (!isset($this->contentType)) {
			$numOfMatches = preg_match('/^([^;]*)/', $this->getHeader('Content-Type'), $matches);
			if ($numOfMatches) {
				$this->contentType = trim($matches[1]);
			} else {
				$this->contentType = '';
			}
		}
		return $this->contentType;
	}
public function getContentType() {
		if (!isset($this->contentType)) {
			$numOfMatches = preg_match('/^([^;]*)/', $this->getHeader('Content-Type'), $matches);
			if ($numOfMatches) {
				$this->contentType = trim($matches[1]);
			} else {
				$this->contentType = '';
			}
		}
		return $this->contentType;
	}
public function getContentType ( ) { if ( ! isset ( $ this -> contentType ) ) { $ numOfMatches = preg_match ( '/^([^;]*)/' , $ this -> getHeader ( 'Content-Type' ) , $ matches ) ; if ( $ numOfMatches ) { $ this -> contentType = trim ( $ matches [ 1 ] ) ; } else { $ this -> contentType = '' ; } } return $ this -> contentType ; }
Get content type.

@return string
Get content type .