定制 brightnucleus/mime-types 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

brightnucleus/mime-types

Composer 安装命令:

composer require brightnucleus/mime-types

包简介

Automatically updated MIME types database, using the Apache HTTP Server configuration.

README 文档

README

Latest Stable Version Total Downloads Latest Unstable Version License

This is a Composer plugin that provides an automated version of the MIME types as defined by the Apache HTTP Server.

The main advantage is that the downloaded database will be updated on each composer install and composer update.

Table Of Contents

Attribution

This package uses data from the Apache HTTP Server, licensed under the Apache License v2.0.

You can read a copy of this license at http://svn.apache.org/repos/asf/httpd/httpd/trunk/LICENSE.

Installation

The only thing you need to do to make this work is adding this package as a dependency to your project:

composer require brightnucleus/mime-types

Basic Usage

On each composer install or composer update, a check will be made to see whether there's a new version of the database available. If there is, that new version is downloaded.

Usage is pretty straight-forward. Just use one of the two provided static methods:

<?php

use BrightNucleus\MimeTypes\MimeTypes;

// Get the extensions for a given MIME type.
$extensions = MimeTypes::getExtensionsForType( 'image/jpeg' ); // Returns array( 'jpeg', 'jpg', 'jpe' ).

// Get the MIME types for a given extension.
$mimeTypes = MimeTypes::getTypesForExtension( 'jpg' ); // Returns array( 'image/jpeg' ).

Contributing

All feedback / bug reports / pull requests are welcome.

License

This code is released under the MIT license.

For the full copyright and license information, please view the LICENSE file distributed with this source code.

统计信息

  • 总下载量: 2.26k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-09-26

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固