src/Request.php
public function getContentType()
    {
        if (isset($this->_contentType)) {
            return $this->_contentType;
        }
        if (isset($_SERVER["CONTENT_TYPE"])) {
            return $this->_contentType = $_SERVER["CONTENT_TYPE"];
        } elseif (isset($_SERVER["HTTP_CONTENT_TYPE"])) {
            //fix bug https://bugs.php.net/bug.php?id=66606
            return $this->_contentType = $_SERVER["HTTP_CONTENT_TYPE"];
        }

        return null;
    }
public function getContentType()
    {
        if (isset($this->_contentType)) {
            return $this->_contentType;
        }
        if (isset($_SERVER["CONTENT_TYPE"])) {
            return $this->_contentType = $_SERVER["CONTENT_TYPE"];
        } elseif (isset($_SERVER["HTTP_CONTENT_TYPE"])) {
            //fix bug https://bugs.php.net/bug.php?id=66606
            return $this->_contentType = $_SERVER["HTTP_CONTENT_TYPE"];
        }

        return null;
    }
public function getContentType ( ) { if ( isset ( $ this -> _contentType ) ) { return $ this -> _contentType ; } if ( isset ( $ _SERVER [ "CONTENT_TYPE" ] ) ) { return $ this -> _contentType = $ _SERVER [ "CONTENT_TYPE" ] ; } elseif ( isset ( $ _SERVER [ "HTTP_CONTENT_TYPE" ] ) ) { //fix bug https://bugs.php.net/bug.php?id=66606 return $ this -> _contentType = $ _SERVER [ "HTTP_CONTENT_TYPE" ] ; } return null ; }
Returns request content-type.

The Content-Type header field indicates the MIME type of the data
contained in the case of the HEAD method, the
media type that would have been sent had the request been a GET.
For the MIME-types the user expects in response, see {@see \rock\request\Request::getAcceptableContentTypes()} .
@return string request content-type. Null is returned if this information is not available.
@link http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17
HTTP 1.1 header field definitions
Returns request content - type .