{"id":20023981,"url":"https://github.com/thebojda/jin-webcore","last_synced_at":"2026-04-20T14:31:15.703Z","repository":{"id":31747155,"uuid":"35313235","full_name":"TheBojda/jin-webcore","owner":"TheBojda","description":"Automatically exported from code.google.com/p/jin-webcore","archived":false,"fork":false,"pushed_at":"2015-05-10T20:38:51.000Z","size":144,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-02T04:19:05.387Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TheBojda.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-05-09T03:22:54.000Z","updated_at":"2020-04-18T05:54:35.000Z","dependencies_parsed_at":"2022-08-29T16:00:53.507Z","dependency_job_id":null,"html_url":"https://github.com/TheBojda/jin-webcore","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/TheBojda/jin-webcore","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheBojda%2Fjin-webcore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheBojda%2Fjin-webcore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheBojda%2Fjin-webcore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheBojda%2Fjin-webcore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TheBojda","download_url":"https://codeload.github.com/TheBojda/jin-webcore/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheBojda%2Fjin-webcore/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32050873,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T11:35:06.609Z","status":"ssl_error","status_checked_at":"2026-04-20T11:34:48.899Z","response_time":94,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":"2024-11-13T08:48:51.223Z","updated_at":"2026-04-20T14:31:15.684Z","avatar_url":"https://github.com/TheBojda.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"jin-webcore is a minimalistic web framework. Base entity of webcore is the handler. Handlers are assigned to paths which are defined by regular expressions, and activated through URL-s or web actions. Every handler is a class, which implements the WebcoreHandler interface, and it's process method. \n\nLook at a simple PHP handler:\n\n```php\nclass TestHandler implements WebcoreHandler {\n\t\t\n  public function process(\u0026$context) {\n    echo \"The id is \" . $context['request/parameters']['id'];\n  }\n\n}\n\nWebcoreSingleton::getInstance()-\u003eregisterHandler(\"^/test/(?P\u003cid\u003e\\d+)$\", new TestHandler);\n```\n\nThis example defines a handler, and assign it to the {{{^/test/(?P\u003cid\u003e\\d+)$}}} path. When the framework calls the handler, put the GET, POST and URL parameters to the context with the 'request/parameters' key. When you look at the http://.../test/1234?param=5 URL, the parameters value will be id =\u003e 1234, and param =\u003e 5. There is another way to call handlers. Handlers can be called by special submit buttons. If the button name starts with the 'action/' string, the framework will find and call the assigned handler.\n\nLook at a simple example, a simple forum view with 3 buttons:\n\n```html\n...\n\u003cform method=\"POST\"\u003e\n  ...\n  \u003cinput type=\"submit\" name=\"action/button_test/button1\" value=\"Button 1\"/\u003e\n  \u003cinput type=\"submit\" name=\"action/button_test/button2\" value=\"Button 2\"/\u003e\n\u003c/form\u003e\n...\n```\n\nAnd the handler in PHP:\n\n```php\t\nWebcoreSingleton::getInstance()-\u003eregisterHandler(\"^button_test/(?P\u003cname\u003e\\w+)$\", new ButtonHandler);\n```\n\nWhen the user push the first button, the framework will call the ButtonHandler, and put the 'button1' string to the name variable. If the user push the second button, the framework will also call the ButtonHandler with the 'button2' name parameter. After the action handler the framework calls the handler, assigned to the URL. In most cases the action handler do some data manipulation (add a new forum post, delete a row from a table, etc.), and the URL handler renders the view. For better understanding, please look at the code in the subversion repository.\n\nSee also:\n\n[jin-plugin](https://github.com/TheBojda/jin-plugin) - simple plugin framework for Java and PHP \n\n[jin-template](https://github.com/TheBojda/jin-template) - simple template engine for Java and PHP, using plain HTML as source\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthebojda%2Fjin-webcore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthebojda%2Fjin-webcore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthebojda%2Fjin-webcore/lists"}