src/ministruts/Request.php
public function getContentType() {
        $contentType = $this->getHeaderValue('Content-Type');

        if ($contentType) {
            $headers     = explode(',', $contentType, 2);
            $contentType = \array_shift($headers);

            $values      = explode(';', $contentType, 2);
            $contentType = trim(\array_shift($values));
        }
        return $contentType;
    }
public function getContentType() {
        $contentType = $this->getHeaderValue('Content-Type');

        if ($contentType) {
            $headers     = explode(',', $contentType, 2);
            $contentType = \array_shift($headers);

            $values      = explode(';', $contentType, 2);
            $contentType = trim(\array_shift($values));
        }
        return $contentType;
    }
public function getContentType ( ) { $ contentType = $ this -> getHeaderValue ( 'Content-Type' ) ; if ( $ contentType ) { $ headers = explode ( ',' , $ contentType , 2 ) ; $ contentType = \ array_shift ( $ headers ) ; $ values = explode ( ';' , $ contentType , 2 ) ; $ contentType = trim ( \ array_shift ( $ values ) ) ; } return $ contentType ; }
Return the "Content-Type" header of the request. If multiple "Content-Type" headers have been transmitted the first
one is returned.

@return string|null - "Content-Type" header or NULL if no "Content-Type" header was transmitted.
Return the Content - Type header of the request . If multiple Content - Type headers have been transmitted the first one is returned .