public static function extensions($type = null) { if (is_null($type)) { return array_keys(static::$mimes); } return isset(static::$types[$type]) ? static::$types[$type] : array(); }