{"id":19147167,"url":"https://github.com/janst123/jsmf","last_synced_at":"2026-06-17T18:02:07.314Z","repository":{"id":56996544,"uuid":"78941740","full_name":"JanST123/JSMF","owner":"JanST123","description":"Small PHP framework for building MVC-based applications","archived":false,"fork":false,"pushed_at":"2019-06-24T06:17:35.000Z","size":1991,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-03T16:53:17.222Z","etag":null,"topics":["orm-php-framework","php","php-framework","php-library","php7"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JanST123.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":"2017-01-14T13:26:50.000Z","updated_at":"2022-02-12T09:07:21.000Z","dependencies_parsed_at":"2022-08-21T14:10:13.649Z","dependency_job_id":null,"html_url":"https://github.com/JanST123/JSMF","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JanST123%2FJSMF","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JanST123%2FJSMF/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JanST123%2FJSMF/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JanST123%2FJSMF/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JanST123","download_url":"https://codeload.github.com/JanST123/JSMF/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240229976,"owners_count":19768597,"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":["orm-php-framework","php","php-framework","php-library","php7"],"created_at":"2024-11-09T07:49:11.048Z","updated_at":"2026-06-12T13:30:15.916Z","avatar_url":"https://github.com/JanST123.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Welcome to the JSMF - The Jan S. MVC Framework\n\nWith this framework you can build a whole MVC (Model-View-Controller)-based PHP Application or just use it as a collection of useful PHP classes. All parts of the framework can be used individually.\n\nSee the [ApiIndex](docs/ApiIndex.md) for all available classes and methods.\n\nPlease refer to the **example application** while the documentation is in this incomplete state.\n\n## Installation\nYou can install JSMF via Composer. Add the following dependency to your composer.json\n```json\n{\n  \"require\": {\n    \"janst123/jsmf\":\"\u003e=1.0.0\"\n}\n```\n\nYou can also clone JSMF from this repository (use the version tags or clone the master branch for latest changes). In this case you have to write your own autoloader.\n\n## Sample Application Bootstrap\nThis is only needed if you want to base your whole application on JSMF. You can also use single Classes, using the JSMF autoloader or your own.\n\nPlace this code in your applications index file. Route all request thru this file (See this [Gist](https://gist.github.com/RaVbaker/2254618) for an introduction on how to route all requests to index.php with Apache)\nUsing this minimal setup will let the JSMF\\Application class determine the Model/Controller/Action from the request url (http://host/module/controller/action).\n\nIf one or more url parts are not present, the application will always use the \"index\" action (the \"index\" controller, the \"index\" module). \n\nExample: Requesting http://host will try to call module \"index\" -\u003e IndexController -\u003e indexAction, Request to http://host/misc/faq will call module \"misc\" -\u003e FaqController -\u003e indexAction\n\n```php\n\u003c?php\ndefine('DEV_SERVER', true); // define this \ndefine('SRC', realpath(dirname(__FILE__) . '/../'));\nrequire(SRC . '/vendor/autoload.php');\n\ntry {\n  // optional: load an application wide config\n  JSMF\\Config::load(SRC . '/config/base.config.php');\n\n  // optional: load application wide translations\n  JSMF\\Language::loadTranslations(SRC . '/language/translations', 'de');\n\n  // optional: route special URLs to special modules / controllers / actions ( I always place the legal texts in a Module named misc)\n  JSMF\\Request::addRoute('/^\\/disclaimer\\/?$/i', 'misc', 'index', 'disclaimer'); // route a request to /disclaimer to the disclaimer Action in the IndexController in the module \"misc\"\n  JSMF\\Request::addRoute('/^\\/privacy\\/?$/i', 'misc', 'index', 'privacy');\n\n  // register the autoloader and run the application\n  JSMF\\Application::registerAutoloader();\n  JSMF\\Application::run();\n\n  // output the applications response (can be HTML, JSON ...)\n  JSMF\\Response::output();\n\n} catch(JSMF\\Exception\\NotFound $e) {\n  // do some special things for not-found errors e.g. redirect to a static 404 page\n  JSMF\\Request::redirect('/404.html');\n  JSMF\\Response::output(); // output method also sends the headers (here: the Location header)\n\n} catch(JSMF\\Exception $e) {\n  // output is done by JSMF\n  JSMF\\Response::setException($e);\n  JSMF\\Response::output();\n\n} catch(Exception $e) {\n  // do something on common non-JSMF Exception\n}\n```\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjanst123%2Fjsmf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjanst123%2Fjsmf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjanst123%2Fjsmf/lists"}