public function contentType() {
        $headers = array('CONTENT_TYPE', 'HTTP_CONTENT_TYPE');

        foreach ($headers as $header) {
            if (!empty($this->serverVariables[$header])) {
                return $this->serverVariables[$header];
            }
        }

        return '';
    }
public function contentType() {
        $headers = array('CONTENT_TYPE', 'HTTP_CONTENT_TYPE');

        foreach ($headers as $header) {
            if (!empty($this->serverVariables[$header])) {
                return $this->serverVariables[$header];
            }
        }

        return '';
    }
public function contentType ( ) { $ headers = array ( 'CONTENT_TYPE' , 'HTTP_CONTENT_TYPE' ) ; foreach ( $ headers as $ header ) { if ( ! empty ( $ this -> serverVariables [ $ header ] ) ) { return $ this -> serverVariables [ $ header ] ; } } return '' ; }
Returns Content-Type of the request or empty string.

@return string
Returns Content - Type of the request or empty string .