{"id":20003037,"url":"https://github.com/broneq/minifw","last_synced_at":"2026-04-15T20:05:48.270Z","repository":{"id":56951358,"uuid":"150155480","full_name":"broneq/miniFW","owner":"broneq","description":"MiniFw - Mini framework inspired by Phalcon framework","archived":false,"fork":false,"pushed_at":"2019-02-22T08:07:07.000Z","size":20,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-01-12T13:24:47.453Z","etag":null,"topics":["framework","framework-php","php7"],"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/broneq.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}},"created_at":"2018-09-24T19:14:40.000Z","updated_at":"2022-02-12T12:23:06.000Z","dependencies_parsed_at":"2022-08-21T03:40:25.801Z","dependency_job_id":null,"html_url":"https://github.com/broneq/miniFW","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/broneq%2FminiFW","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/broneq%2FminiFW/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/broneq%2FminiFW/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/broneq%2FminiFW/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/broneq","download_url":"https://codeload.github.com/broneq/miniFW/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241441252,"owners_count":19963379,"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":["framework","framework-php","php7"],"created_at":"2024-11-13T05:24:04.848Z","updated_at":"2026-04-15T20:05:48.218Z","avatar_url":"https://github.com/broneq.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"**MiniFw - Mini framework inspired by Phalcon framework**\n\nFramework inspired by Phalcon to do simple thinks on not dedicated servers.\n\n**Usage**\n\ncomposer install broneq/miniFW\n\n```\nuse MiniFwSample\\Config\\Sample;\n\ninclude __DIR__.'/Lib/Autoloader.php';\n$autoloader = new \\MiniFw\\Lib\\Autoloader();\n$autoloader-\u003eregisterNamespace('MiniFw', __DIR__.'/pathtovendor');\n$autoloader-\u003eregisterNamespace('SomeOtherNameSpace', __DIR__.'/otherdir');\n\ntry {\n    new Sample();\n} catch (Exception $e) {\n    http_response_code(500);\n    echo 'FATAL: ' . $e-\u003egetMessage();\n}\n\n``` \n\n*Sample config*\n\n```\nnamespace MiniFwSample\\Config;\n\n\nuse MiniFw\\Lib\\Auth;\nuse MiniFw\\Lib\\Db;\nuse MiniFw\\Lib\\Di\\BaseConfig;\nuse MiniFw\\Lib\\Di\\Dependency;\nuse MiniFw\\Lib\\Router;\nuse MiniFw\\Lib\\View;\n\nclass Sample extends BaseConfig\n{\n    /**\n     * Sample constructor.\n     * @throws \\Exception\n     */\n    public function __construct()\n    {\n        $this-\u003eaddDependency((new Dependency('auth', Auth::class))\n            -\u003eaddCall('addUser', 'broneq', 'sha1password')\n            -\u003eaddCall('authRequest'));\n        //\n        $this-\u003eaddDependency((new Dependency('router', Router::class))\n            -\u003eaddParameter('\\'MiniFwSample\\Controller\\\\')\n            -\u003eaddCall('registerNotFoundAction', function () {\n                header(\"HTTP/1.0 404 Not Found\");\n                echo \"Page not found.\\n\";\n                die();\n            })\n            -\u003eaddCall('registerDefaultController', 'index')\n            -\u003eaddCall('handle', $_GET)\n        );\n        //\n        $this-\u003eaddDependency((new Dependency('db', Db::class))\n            -\u003eaddParameter(__DIR__ . '/../db.sqlite'));\n        //\n        $this-\u003eaddDependency((new Dependency('view', View::class))\n            -\u003eaddParameter(__DIR__ . '/../tpl'));\n        //\n        //\n        $this-\u003eautorun('auth');\n        $this-\u003eautorun('router');\n        $this-\u003eautorun('view');\n        //\n        $this-\u003ebuild();\n    }\n}\n```\n\n*Sample controller*\n```\nclass File extends BaseController\n{\n    public function indexAction(): void\n    {\n        $this-\u003eview-\u003erender('file/list', ['data' =\u003e ['title'=\u003e'test']);\n    }\n}\n```\n\n*Sample model*\n```\nclass InquiryFile extends BaseModel\n{\n    public $inquiry_id;\n\n    public $title;\n\n    public $file_name;\n\n    public $file;\n\n    protected function sanitize(): void\n    {\n        if ($this-\u003eid) {\n            $this-\u003eid = (int)$this-\u003eid;\n        }\n        $this-\u003einquiry_id = (int)$this-\u003einquiry_id;\n        if (!$this-\u003einquiry_id) {\n            throw new \\ErrorException('No inquiry_id provided');\n        }\n        $this-\u003etitle = strip_tags(trim($this-\u003etitle), ENT_QUOTES);\n        $this-\u003efile_name = strip_tags(trim($this-\u003efile_name), ENT_QUOTES);\n    }\n}\n```\n*Issues*\n\nIf you are using PHP running in CGI mode you have to add rule to your .htaccess file:\n\nRewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbroneq%2Fminifw","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbroneq%2Fminifw","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbroneq%2Fminifw/lists"}