src/ChickenWire/Core/Mime.php
public static function byExtension($extension, $quality = 1.0)
		{

			// Trim it!
			$extension = trim($extension, '. ');

			// Look it up
			if (!array_key_exists($extension, self::$extensionMap)) {
				return false;
			} else {

				return new Mime(self::$extensionMap[$extension], $quality);

			}

		}
public static function byExtension($extension, $quality = 1.0)
		{

			// Trim it!
			$extension = trim($extension, '. ');

			// Look it up
			if (!array_key_exists($extension, self::$extensionMap)) {
				return false;
			} else {

				return new Mime(self::$extensionMap[$extension], $quality);

			}

		}
public static function byExtension ( $ extension , $ quality = 1.0 ) { // Trim it! $ extension = trim ( $ extension , '. ' ) ; // Look it up if ( ! array_key_exists ( $ extension , self :: $ extensionMap ) ) { return false ; } else { return new Mime ( self :: $ extensionMap [ $ extension ] , $ quality ) ; } }
Find a Mime type by its extension
@param string $extension The file extension
@param float $quality  (default: 1) The quality of the mime in a HTTP Accept header (i.e. it's rank)
@return Mime|false      A Mime instance, or false when extension is not known.
Find a Mime type by its extension