src/Common.php
private static function _mime_extension(string $fname) {
		$pinfo = pathinfo($fname);
		// @codeCoverageIgnoreStart
		if (!isset($pinfo['extension']))
			return null;
		// @codeCoverageIgnoreEnd
		# Because these things are magically ambiguous, we'll
		# resort to extension.
		switch (strtolower($pinfo['extension'])) {
			case 'css':
				return 'text/css';
			case 'js':
				return 'application/javascript';
			case 'json':
				return 'application/json';
			case 'htm':
			case 'html':
				# always assume UTF-8
				return 'text/html; charset=utf-8';
		}
		return null;
	}
private static function _mime_extension(string $fname) {
		$pinfo = pathinfo($fname);
		// @codeCoverageIgnoreStart
		if (!isset($pinfo['extension']))
			return null;
		// @codeCoverageIgnoreEnd
		# Because these things are magically ambiguous, we'll
		# resort to extension.
		switch (strtolower($pinfo['extension'])) {
			case 'css':
				return 'text/css';
			case 'js':
				return 'application/javascript';
			case 'json':
				return 'application/json';
			case 'htm':
			case 'html':
				# always assume UTF-8
				return 'text/html; charset=utf-8';
		}
		return null;
	}
private static function _mime_extension ( string $ fname ) { $ pinfo = pathinfo ( $ fname ) ; // @codeCoverageIgnoreStart if ( ! isset ( $ pinfo [ 'extension' ] ) ) return null ; // @codeCoverageIgnoreEnd # Because these things are magically ambiguous, we'll # resort to extension. switch ( strtolower ( $ pinfo [ 'extension' ] ) ) { case 'css' : return 'text/css' ; case 'js' : return 'application/javascript' ; case 'json' : return 'application/json' ; case 'htm' : case 'html' : # always assume UTF-8 return 'text/html; charset=utf-8' ; } return null ; }
Get MIME by extension.

Useful for serving typical text files that don't have unique
magic numbers.
Get MIME by extension .