{"id":16226976,"url":"https://github.com/abbychau/hackish","last_synced_at":"2025-04-08T04:23:21.281Z","repository":{"id":146758798,"uuid":"98199871","full_name":"abbychau/hackish","owner":"abbychau","description":"A 14-line full functional php framework with a safe and protected template system, a database wrapper with error handling, and a full functional router!","archived":false,"fork":false,"pushed_at":"2017-09-10T06:06:31.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-14T03:15:30.405Z","etag":null,"topics":["hackathon","minimalist","php","php-router","phpframework","router"],"latest_commit_sha":null,"homepage":"","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/abbychau.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-07-24T14:28:12.000Z","updated_at":"2017-11-10T12:16:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"407d3bdf-4919-4498-a714-361b21a77f48","html_url":"https://github.com/abbychau/hackish","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abbychau%2Fhackish","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abbychau%2Fhackish/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abbychau%2Fhackish/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abbychau%2Fhackish/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abbychau","download_url":"https://codeload.github.com/abbychau/hackish/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247774767,"owners_count":20993801,"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":["hackathon","minimalist","php","php-router","phpframework","router"],"created_at":"2024-10-10T12:51:15.814Z","updated_at":"2025-04-08T04:23:21.252Z","avatar_url":"https://github.com/abbychau.png","language":"PHP","readme":"# hackish\n\nThis is the smallest (14 lines) full functional PHP framework with following features:\n\n## Safe and protected template system\n\n```html\n\u003cdiv\u003e{name}\u003cdiv\u003e\n```\n```php\nrender('name',['name'=\u003e'Abby']);\n```\n\n## Database wrapper with error handling\n\n```php\n$conn = @mysqli_connect(DB_HOSTNAME, DB_USERNAME, DB_PASSWORD); //declare once\n$a = dbAr(\"SELECT * FROM test\"); //output an assoc array\n```\n\n## Full functional router\n\n```php\n$routes['ALL']['/^\\/blog\\/(\\w+)\\/(\\d+)\\/?$/'] = function($category, $id){\n    print \"category={$category}, id={$id}\";\n};\n$routes['GET']['/^\\/blog\\/(\\w+)\\/(\\d+)\\/?$/'] = function($category, $id){\n    print \"category={$category}, id={$id}\";\n};\n$routes['ALL']['/watch\\?v=(\\w+)/'] = function($id){\n        include('view.php');\n};\n```\n\n## Migration (to-do)\n``` php\n//todo\nfunction migrate($csv){\n    foreach(explode(PHP_EOL, file_get_contents($csv)) as $line){\n        if($x++ == 0){dbAr(\"CREATE TABLE $csv\"\n        foreach(explode(\",\", file_get_contents($csv)) as $line){\n            \n        }\n    }\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabbychau%2Fhackish","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabbychau%2Fhackish","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabbychau%2Fhackish/lists"}