public function withContentType($contentType)
    {
        $contentType = $this->normalizeContentType($contentType);

        $contentType = explode(';', $contentType, 2);

        $this->type = $contentType[0];

        $contentType[0] .= ';' . (isset($contentType[1]) ? $contentType[1] : ' charset=utf-8');

        return $this->withHeader('Content-Type', $contentType[0]);
    }
public function withContentType($contentType)
    {
        $contentType = $this->normalizeContentType($contentType);

        $contentType = explode(';', $contentType, 2);

        $this->type = $contentType[0];

        $contentType[0] .= ';' . (isset($contentType[1]) ? $contentType[1] : ' charset=utf-8');

        return $this->withHeader('Content-Type', $contentType[0]);
    }
public function withContentType ( $ contentType ) { $ contentType = $ this -> normalizeContentType ( $ contentType ) ; $ contentType = explode ( ';' , $ contentType , 2 ) ; $ this -> type = $ contentType [ 0 ] ; $ contentType [ 0 ] .= ';' . ( isset ( $ contentType [ 1 ] ) ? $ contentType [ 1 ] : ' charset=utf-8' ) ; return $ this -> withHeader ( 'Content-Type' , $ contentType [ 0 ] ) ; }
Add Content-Type to header.

@param   string $contentType The content type.

@return  static
Add Content - Type to header .