public static function GetByExtension( string $extension ) : string
   {

      $normalizedExtension = \strtolower( \ltrim( $extension, '.' ) );

      if ( isset( static::$mimeTypes[ $normalizedExtension ] ) )
      {
         return static::$mimeTypes[ $normalizedExtension ];
      }

      return 'application/octet-stream';

   }
public static function GetByExtension( string $extension ) : string
   {

      $normalizedExtension = \strtolower( \ltrim( $extension, '.' ) );

      if ( isset( static::$mimeTypes[ $normalizedExtension ] ) )
      {
         return static::$mimeTypes[ $normalizedExtension ];
      }

      return 'application/octet-stream';

   }
public static function GetByExtension ( string $ extension ) : string { $ normalizedExtension = \ strtolower ( \ ltrim ( $ extension , '.' ) ) ; if ( isset ( static :: $ mimeTypes [ $ normalizedExtension ] ) ) { return static :: $ mimeTypes [ $ normalizedExtension ] ; } return 'application/octet-stream' ; }
Returns the MIME type, associated with the defined file name extension.

@param  string $extension The file name extension (with or without the leading dot)
@return string            Returns the MIME type
Returns the MIME type associated with the defined file name extension .