{"id":18517828,"url":"https://github.com/femtopixel/nano-framework","last_synced_at":"2025-04-09T08:31:08.021Z","repository":{"id":62504082,"uuid":"60839988","full_name":"femtopixel/nano-framework","owner":"femtopixel","description":"PHP - Nano Framework - Easier than easiest framework","archived":false,"fork":false,"pushed_at":"2024-05-02T16:09:50.000Z","size":120,"stargazers_count":6,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-05-03T02:38:41.921Z","etag":null,"topics":["nano-framework","php","route","site"],"latest_commit_sha":null,"homepage":"https://brands.jaymoulin.me/femtopixel/nano-framework/","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/femtopixel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["jaymoulin"],"patreon":null,"open_collective":null,"ko_fi":"jaymoulin","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":["https://www.paypal.me/jaymoulin","https://www.buymeacoffee.com/jaymoulin","https://www.tipeeestream.com/cursedware/donation","https://streamlabs.com/cursedware/tip"]}},"created_at":"2016-06-10T10:26:12.000Z","updated_at":"2024-05-02T16:09:54.000Z","dependencies_parsed_at":"2023-01-23T14:31:28.233Z","dependency_job_id":null,"html_url":"https://github.com/femtopixel/nano-framework","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/femtopixel%2Fnano-framework","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/femtopixel%2Fnano-framework/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/femtopixel%2Fnano-framework/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/femtopixel%2Fnano-framework/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/femtopixel","download_url":"https://codeload.github.com/femtopixel/nano-framework/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223381994,"owners_count":17136292,"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":["nano-framework","php","route","site"],"created_at":"2024-11-06T17:09:35.692Z","updated_at":"2024-11-06T17:09:36.373Z","avatar_url":"https://github.com/femtopixel.png","language":"PHP","funding_links":["https://github.com/sponsors/jaymoulin","https://ko-fi.com/jaymoulin","https://www.paypal.me/jaymoulin","https://www.buymeacoffee.com/jaymoulin","https://www.tipeeestream.com/cursedware/donation","https://streamlabs.com/cursedware/tip","https://www.ko-fi.com/jaymoulin"],"categories":[],"sub_categories":[],"readme":"\u003e [!CAUTION]\n\u003e As-of 2021, this product does not have a free support team anymore. If you want this product to be maintained, please support my work.\n \n\u003e [!NOTE]\n\u003e (This product is available under a free and permissive license, but needs financial support to sustain its continued improvements. In addition to maintenance and stability there are many  desirable features yet to be added.)\n\n![logo](logo.png)\n\nNano Framework\n==============\n\n[![Build Status](https://scrutinizer-ci.com/g/femtopixel/nano-framework/badges/build.png?b=master)](https://scrutinizer-ci.com/g/femtopixel/nano-framework/build-status/master)\n[![Latest Stable Version](https://poser.pugx.org/femtopixel/nano-framework/v/stable)](https://packagist.org/packages/femtopixel/nano-framework) \n[![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%207.0-8892BF.svg?style=flat-square)](https://php.net/)\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/femtopixel/nano-framework/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/femtopixel/nano-framework/?branch=master)\n[![Code Coverage](https://scrutinizer-ci.com/g/femtopixel/nano-framework/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/femtopixel/nano-framework/?branch=master)\n[![License](https://poser.pugx.org/femtopixel/nano-framework/license)](https://packagist.org/packages/femtopixel/nano-framework)\n[![PayPal donation](https://github.com/jaymoulin/jaymoulin.github.io/raw/master/ppl.png \"PayPal donation\")](https://www.paypal.me/jaymoulin)\n[![Buy me a coffee](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png \"Buy me a coffee\")](https://www.buymeacoffee.com/jaymoulin)\n[![Buy me a coffee](https://ko-fi.com/img/githubbutton_sm.svg \"Buy me a coffee\")](https://www.ko-fi.com/jaymoulin)\n\nNano is a simple stupid framework, really easy to handle, and really efficient.\n\nIt only implements the C part (Controller) of the MVC design pattern which allows developers to use any other existing library for others parts\n\nInstallation\n---\n\n    composer require femtopixel/nano-framework\n\nBootstrap\n---\n\nall your request can be redirected to your bootstrap (assuming index.php)\n\n```php\n\u003c?php\nrequire_once ('vendor/autoload.php');\n$nano = new \\Nano\\Framework();\n$nano-\u003edispatch();\n```\n\nThat's all!\n\nHow it works?\n---\n\nWith that on, you can now access to your pages like this :\n\nhttp://mysite.tld/ \\\u003ccontroller\u003e/\\\u003caction\u003e\n\nAnd it will load the class \\Project\\Controller\\\\\\\u003ccontroller\u003e::\\\u003cmethod\u003e\\\u003caction\u003eAction\n\nYou can easily configure your namespace, controller package and action suffix!\n\n*\\\u003cmethod\u003e* represents the HTTP method used (usually *get* but you can use post/update/delete etc...). This is optional.\n\nEither \\\u003ccontroller\u003e or \\\u003caction\u003e are optional and considered as 'index' if not defined.\n\nTherefore\n\nurl                                            | class::method\n---------------------------------------------- | ---------------------------------------\nhttp://mysite.tld/                             | \\Project\\Controller\\Index::indexAction\nhttp://mysite.tld/test                         | \\Project\\Controller\\Test::indexAction\nhttp://mysite.tld/test/action                  | \\Project\\Controller\\Test::actionAction\nhttp://mysite.tld/also/work/with/full/path     | \\Project\\Controller\\Also\\Work\\With\\Full::pathAction\nhttp://mysite.tld/my/normal                    | \\Project\\Controller\\My::getNormalAction\nhttp://mysite.tld/my/normal (with HTTP post)   | \\Project\\Controller\\My::postNormalAction\n\n## Parameter Matching\n\nSince 0.6.0, you can use *\"Parameter Matching\"*\n\nSimply activate it when dispatching :\n\n```php\nrequire_once ('vendor/autoload.php');\n$nano = new \\Nano\\Framework();\n$nano-\u003esetParameterMatching()-\u003edispatch();\n``` \n\nAnd then you'll be able to use it like this :\n\n```php\n\u003c?php\nnamespace \\Project\\Controller;\n\nclass MyAwesomeController\n{\n    public function getHelloAction($age, $name)\n    {\n        echo \"Hello $name, I'm {$age}yo\"; //please, use this code for test only\n    }\n}\n```\n\nand call `http://mysite.tld/myawesomecontroller/hello?name=World\u0026age=900` to display \"Hello World, I'm 900yo\" !\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffemtopixel%2Fnano-framework","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffemtopixel%2Fnano-framework","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffemtopixel%2Fnano-framework/lists"}