alex-kalanis / kw_mime
Determine file mime type in KWCMS
v3.0.0
2024-03-31 14:30 UTC
Requires
- php: >=7.4.0
- alex-kalanis/kw_paths: >=4.0 <5
Requires (Dev)
- ext-fileinfo: *
- alex-kalanis/kw_files: >=4.0 <5
- alex-kalanis/kw_storage: >=5.0 <6
- friendsofphp/php-cs-fixer: ^3.0
- phpstan/phpstan: ^1.0
- phpstan/phpstan-phpunit: ^1.0
- phpunit/phpunit: >=8.0 <=9
- shipmonk/composer-dependency-analyser: ^1.4
Suggests
- ext-fileinfo: *
- alex-kalanis/kw_files: Accessing stored entries as files on some volume
- alex-kalanis/kw_storage: Universal storage library for store data as key-value pairs
README
Simple library to access mime type of sent file. Just makes nice facade to mime libraries.
PHP Installation
composer.phar require alex-kalanis/kw_mime
(Refer to Composer Documentation if you are not familiar with composer)
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
Caveats
If not speified by time of construction it uses external libraries in extension ext-fileinfo. Be aware of that.