PHPackages                             alex-kalanis/kw\_mime - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. alex-kalanis/kw\_mime

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

alex-kalanis/kw\_mime
=====================

Determine file mime type in KWCMS

v3.1.0(1y ago)05421BSD-3-ClausePHPPHP &gt;=7.4.0CI passing

Since Mar 6Pushed 1y ago1 watchersCompare

[ Source](https://github.com/alex-kalanis/kw_mime)[ Packagist](https://packagist.org/packages/alex-kalanis/kw_mime)[ RSS](/packages/alex-kalanis-kw-mime/feed)WikiDiscussions master Synced 5d ago

READMEChangelog (8)Dependencies (8)Versions (7)Used By (1)

kw\_mime
========

[](#kw_mime)

[![Build Status](https://github.com/alex-kalanis/kw_mime/actions/workflows/code_checks.yml/badge.svg)](https://github.com/alex-kalanis/kw_mime/actions/workflows/code_checks.yml/badge.svg)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/5cdc9068f9d58a7bcc0343cac2681025e8c4b5bfecac4dce579f71c3e3894c1c/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f616c65782d6b616c616e69732f6b775f6d696d652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/alex-kalanis/kw_mime/?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/ec31b87e1ef61dd5f2c96af47571309fd755d3a5cb3d8d16c19386357d508be0/68747470733a2f2f706f7365722e707567782e6f72672f616c65782d6b616c616e69732f6b775f6d696d652f762f737461626c652e7376673f763d31)](https://packagist.org/packages/alex-kalanis/kw_mime)[![Minimum PHP Version](https://camo.githubusercontent.com/0e9ac047546796cfdbe1423d1f4d91c8f37d2fbb11614a7900bb7686aaa5401f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230372e342d3838393242462e737667)](https://php.net/)[![Downloads](https://camo.githubusercontent.com/c0b6b50801b7a4724ec971470ff243d1adfd7c36282b5ccbc5500c5b0092e5bc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616c65782d6b616c616e69732f6b775f6d696d652e7376673f7631)](https://packagist.org/packages/alex-kalanis/kw_mime)[![License](https://camo.githubusercontent.com/dc67debbc68aaa39357590abcb159880cda5a8222e73332f6c0614f85b431228/68747470733a2f2f706f7365722e707567782e6f72672f616c65782d6b616c616e69732f6b775f6d696d652f6c6963656e73652e7376673f763d31)](https://packagist.org/packages/alex-kalanis/kw_mime)[![Code Coverage](https://camo.githubusercontent.com/25ef870b76dc7b8118944cb5147a8f23352097eaeed72a9bc0d0efc6ac7d9555/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f616c65782d6b616c616e69732f6b775f6d696d652f6261646765732f636f7665726167652e706e673f623d6d617374657226763d31)](https://scrutinizer-ci.com/g/alex-kalanis/kw_mime/?branch=master)

Simple library to access mime type of sent file. Just makes nice facade to mime libraries.

PHP Installation
----------------

[](#php-installation)

```
composer.phar require alex-kalanis/kw_mime
```

(Refer to [Composer Documentation](https://github.com/composer/composer/blob/master/doc/00-intro.md#introduction) if you are not familiar with composer)

PHP Usage
---------

[](#php-usage)

1.) Use your autoloader (if not already done via Composer autoloader)

2.) Connect the "\\kalanis\\kw\_mime\\MimeType" into your app. Extends it for setting your case.

3.) Just call setting and render

```
// Somewhere in DI
return function ($params): \kalanis\kw_mime\Interfaces\IMime {
    return (new \kalanis\kw_mime\Check\Factory())->getLibrary($params);
}
```

```
// In code
class MimeExample
{
    public function __construct(
        // ...
        protected readonly \kalanis\kw_mime\Interfaces\IMime $mime,
        // ...
    ) {
    }

    public function which(string $file): string
    {
        $path = (new \kalanis\kw_paths\ArrayPath())->setString($file);
        return $this->mime->getMime($path->getArray());
    }
}
```

Caveats
-------

[](#caveats)

If not specified by time of construction it uses external libraries in extension ext-fileinfo. Be aware of that.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance49

Moderate activity, may be stable

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~231 days

Recently: every ~261 days

Total

6

Last Release

371d ago

Major Versions

v1.1.2 → v2.0.02023-05-08

v2.1.0 → v3.0.02024-03-31

PHP version history (3 changes)v1.1.1PHP &gt;=7.2.0

v2.0.0PHP &gt;=7.3.0

v3.0.0PHP &gt;=7.4.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/499b0a541b787cdb31412f578c7b94c9790bcbee7de12c65b6101c6ce45ef6f0?d=identicon)[alex-kalanis](/maintainers/alex-kalanis)

---

Top Contributors

[![alex-kalanis](https://avatars.githubusercontent.com/u/59184183?v=4)](https://github.com/alex-kalanis "alex-kalanis (24 commits)")

---

Tags

mimefilefilesmimetype

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/alex-kalanis-kw-mime/health.svg)

```
[![Health](https://phpackages.com/badges/alex-kalanis-kw-mime/health.svg)](https://phpackages.com/packages/alex-kalanis-kw-mime)
```

###  Alternatives

[symfony/mime

Allows manipulating MIME messages

2.8k668.8M911](/packages/symfony-mime)[zbateson/mail-mime-parser

MIME email message parser

53949.2M79](/packages/zbateson-mail-mime-parser)[php-mime-mail-parser/php-mime-mail-parser

A fully tested email parser for PHP 8.0+ (mailparse extension wrapper).

9979.6M27](/packages/php-mime-mail-parser-php-mime-mail-parser)[nette/mail

📧 Nette Mail: A handy library for creating and sending emails in PHP.

5389.8M246](/packages/nette-mail)[zbateson/stream-decorators

PHP psr7 stream decorators for mime message part streams

4748.6M6](/packages/zbateson-stream-decorators)[xobotyi/php-mime-type

A comprehensive MIME-types lib for PHP.

317.2k](/packages/xobotyi-php-mime-type)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
