{"id":20130480,"url":"https://github.com/drmvc/framework","last_synced_at":"2025-04-09T16:16:13.903Z","repository":{"id":56972261,"uuid":"48012991","full_name":"drmvc/framework","owner":"drmvc","description":"Simple and flexible PHP MVC framework","archived":true,"fork":false,"pushed_at":"2018-04-26T07:27:35.000Z","size":912,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-09T16:16:04.203Z","etag":null,"topics":["dependency-injection","framework","mvc","psr-11"],"latest_commit_sha":null,"homepage":"https://drmvc.com/","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/drmvc.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":"2015-12-15T01:52:38.000Z","updated_at":"2025-03-25T08:00:07.000Z","dependencies_parsed_at":"2022-08-21T12:50:16.232Z","dependency_job_id":null,"html_url":"https://github.com/drmvc/framework","commit_stats":null,"previous_names":[],"tags_count":34,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drmvc%2Fframework","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drmvc%2Fframework/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drmvc%2Fframework/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drmvc%2Fframework/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/drmvc","download_url":"https://codeload.github.com/drmvc/framework/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248065283,"owners_count":21041872,"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":["dependency-injection","framework","mvc","psr-11"],"created_at":"2024-11-13T20:38:48.292Z","updated_at":"2025-04-09T16:16:13.858Z","avatar_url":"https://github.com/drmvc.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Latest Stable Version](https://poser.pugx.org/drmvc/framework/v/stable)](https://packagist.org/packages/drmvc/framework)\n[![Build Status](https://travis-ci.org/drmvc/framework.svg?branch=master)](https://travis-ci.org/drmvc/framework)\n[![Total Downloads](https://poser.pugx.org/drmvc/framework/downloads)](https://packagist.org/packages/drmvc/framework)\n[![License](https://poser.pugx.org/drmvc/framework/license)](https://packagist.org/packages/drmvc/framework)\n[![PHP 7 ready](https://php7ready.timesplinter.ch/drmvc/framework/master/badge.svg)](https://travis-ci.org/drmvc/framework)\n[![Code Climate](https://codeclimate.com/github/drmvc/framework/badges/gpa.svg)](https://codeclimate.com/github/drmvc/framework)\n[![Scrutinizer CQ](https://scrutinizer-ci.com/g/drmvc/framework/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/drmvc/framework/)\n\n# DrMVC\\Framework\n\nA framework that combines some modules. necessary to create a full-fledged web application.\n\n    composer require drmvc/framework\n\n## How to use\n\nMore examples you can find [here](extra).\n\n### Example of `index.php` inside `public_html` folder:\n\n```php\n\u003c?php\nrequire_once __DIR__ . '/../vendor/autoload.php';\n\n$config = new \\DrMVC\\Config();\n$config-\u003eload(__DIR__ . '/../app/database.php', 'database');\n\nuse \\Psr\\Http\\Message\\ServerRequestInterface as Request;\nuse \\Psr\\Http\\Message\\ResponseInterface as Response;\n\n$app = new \\DrMVC\\App($config);\n$app\n    -\u003eget('/', \\MyApp\\Controllers\\Index::class . ':default') //-\u003e public function action_default()\n    -\u003eget('/zzz', \\MyApp\\Controllers\\Index::class) //-\u003e public function action_index()\n    -\u003eget('/zzz/\u003caction\u003e', \\MyApp\\Controllers\\Index::class)\n    -\u003eget('/aaa', function(Request $request, Response $response, $args) {\n        print_r($args);\n    });\n\necho $app-\u003erun();\n```\n\n### Example of `Index` controller inside `app/Controllers` folder:\n\n```php\n\u003c?php\n\nnamespace MyApp\\Controllers;\n\nuse \\Psr\\Http\\Message\\ServerRequestInterface as Request;\nuse \\Psr\\Http\\Message\\ResponseInterface as Response;\n\nclass Index\n{\n    public function action_index(Request $request, Response $response, $args)\n    {\n        $out = [\n            'dummy',\n            'array'\n        ];\n\n        $json = json_encode($out);\n        header('Content-Type: application/json');\n        $response-\u003egetBody()-\u003ewrite($json);\n    }\n\n    public function action_defaultRequest $request, Response $response, $args)\n    {\n        $out = [\n            'test1',\n            'test2'\n        ];\n\n        $json = json_encode($out);\n        header('Content-Type: application/json');\n        $response-\u003egetBody()-\u003ewrite($json);\n    }\n}\n```\n\n## Where to get help\n\nIf you found the bug, please report about this on [GitHub Issues](https://github.com/drmvc/framework/issues) page.\n\n## About PHP Unit Tests\n\nFirst need to install all dev dependencies via `composer update`, then\nyou can run tests by hands from source directory via `./vendor/bin/phpunit` command.\n\n## Links\n\n* [DrMVC Framework](https://drmvc.com)\n* [Slim](https://github.com/slimphp/Slim) - Is a PHP micro framework, I really like how there are implemented the PSR-4 conception.\n* [SimpleMVC](https://github.com/simple-mvc-framework/framework) - it was a very exciting project, before the author renamed this to Nova\n* [Phalcon](https://github.com/phalcon) - Simple and clean code of your application\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrmvc%2Fframework","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrmvc%2Fframework","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrmvc%2Fframework/lists"}