Exemplo n.º 1
0
 /**
  * Get Media Type (type/subtype within Content Type header)
  *
  * @return string|null
  */
 public static function getMediaType()
 {
     $contentType = static::getContentType();
     if ($contentType) {
         $contentTypeParts = preg_split('/\\s*[;,]\\s*/', $contentType);
         return Internal::strToLower($contentTypeParts[0]);
     }
     return null;
 }