public static function parseContentTypeToRepresentation($contentType)
    {
        $matches = array();

        preg_match('/^application\/(.*)\+json; charset=utf-8$/im', $contentType, $matches);

        if (count($matches) == 2) {
            return $matches[1];
        }

        return false;
    }
public static function parseContentTypeToRepresentation($contentType)
    {
        $matches = array();

        preg_match('/^application\/(.*)\+json; charset=utf-8$/im', $contentType, $matches);

        if (count($matches) == 2) {
            return $matches[1];
        }

        return false;
    }
public static function parseContentTypeToRepresentation ( $ contentType ) { $ matches = array ( ) ; preg_match ( '/^application\/(.*)\+json; charset=utf-8$/im' , $ contentType , $ matches ) ; if ( count ( $ matches ) == 2 ) { return $ matches [ 1 ] ; } return false ; }
Parse a content-type header to a representation name

@param string $contentType
@return bool
Parse a content - type header to a representation name