{"id":25456441,"url":"https://github.com/autoframe/components-filemime","last_synced_at":"2025-05-16T18:11:14.170Z","repository":{"id":159810741,"uuid":"634858094","full_name":"autoframe/components-filemime","owner":"autoframe","description":"PHP server side file mime SOLID","archived":false,"fork":false,"pushed_at":"2023-06-04T22:27:34.000Z","size":73,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-18T01:40:22.689Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/autoframe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-01T11:45:33.000Z","updated_at":"2023-06-05T07:44:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"b81c0987-a0f9-471a-b31c-f4a5a527951c","html_url":"https://github.com/autoframe/components-filemime","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/autoframe%2Fcomponents-filemime","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/autoframe%2Fcomponents-filemime/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/autoframe%2Fcomponents-filemime/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/autoframe%2Fcomponents-filemime/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/autoframe","download_url":"https://codeload.github.com/autoframe/components-filemime/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254582907,"owners_count":22095518,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-18T01:38:35.507Z","updated_at":"2025-05-16T18:11:14.164Z","avatar_url":"https://github.com/autoframe.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Autoframe is a low level framework that is oriented on SOLID flexibility\n\n[![Build Status](https://github.com/autoframe/components-filemime/workflows/PHPUnit-tests/badge.svg?branch=main)](https://github.com/autoframe/components-filemime/actions?query=branch:main)\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)\n![Packagist Version](https://img.shields.io/packagist/v/autoframe/components-filemime?label=packagist%20stable)\n[![Downloads](https://img.shields.io/packagist/dm/autoframe/components-filemime.svg)](https://packagist.org/packages/autoframe/components-filemime)\n\n*PHP server side file mime SOLID*\n\nNamespace:\n- Autoframe\\\\Component\\\\FileMime\n\nClass is a SINGLETON:\n- AfrFileMimeClass + AfrFileMimeInterface + AfrFileMimeTrait\n- Methods:\n  - getFileMimeTypes: array  *[... 'image/jpeg' =\u003e ['jpeg','jpg','jpe'], ...]*\n  - getFileMimeExtensions: array  *[... 'jpeg' =\u003e 'image/jpeg', ...]*\n  - getFileMimeFallback: string  *'application/octet-stream'*\n  - getAllMimesFromFileName: array *Input: '/dir/test.wmz' Output: ['application/x-ms-wmz','application/x-msmetafile'] (wmz extension has multiple mimes)*\n  - getMimeFromFileName: string *Input: '/dir/test.jpg'  Output: 'image/jpeg'*\n  - getExtensionsForMime: array *Input: 'image/jpeg' Output: ['jpeg','jpg','jpe']*\n  - getExtensionFromPath: string *Input: '/dir/test.jpg' Output: 'jpg'*\n  \nTraits:\n- AfrFileMimeTypes *public static array $aAfrFileMimeTypes = [...]*\n- AfrFileMimeExtensions *public static array $aAfrFileMimeExtensions = [...]*\n\nUtility class reads/updates the file 'mime.types' and writes new traits AfrFileMimeExtensions and AfrFileMimeTypes\n- AfrFileMimeGeneratorClass\n- Runs only in local tests (not from inside vendor dir)\n- mime.types is updated from https://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fautoframe%2Fcomponents-filemime","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fautoframe%2Fcomponents-filemime","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fautoframe%2Fcomponents-filemime/lists"}