{"id":24738667,"url":"https://github.com/zweifisch/zf","last_synced_at":"2025-07-23T00:32:34.573Z","repository":{"id":57092361,"uuid":"9727718","full_name":"zweifisch/zf","owner":"zweifisch","description":"a micro php framework/router for both web and cli","archived":false,"fork":false,"pushed_at":"2014-10-29T01:16:50.000Z","size":907,"stargazers_count":34,"open_issues_count":0,"forks_count":16,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-03T18:08:33.602Z","etag":null,"topics":[],"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/zweifisch.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":"2013-04-28T08:47:45.000Z","updated_at":"2024-01-29T01:52:43.000Z","dependencies_parsed_at":"2022-08-22T21:40:12.331Z","dependency_job_id":null,"html_url":"https://github.com/zweifisch/zf","commit_stats":null,"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"purl":"pkg:github/zweifisch/zf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zweifisch%2Fzf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zweifisch%2Fzf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zweifisch%2Fzf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zweifisch%2Fzf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zweifisch","download_url":"https://codeload.github.com/zweifisch/zf/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zweifisch%2Fzf/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266596689,"owners_count":23953891,"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","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"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":"2025-01-27T22:55:17.503Z","updated_at":"2025-07-23T00:32:34.512Z","avatar_url":"https://github.com/zweifisch.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# zf [![Build Status](https://travis-ci.org/zweifisch/zf.png?branch=master)](https://travis-ci.org/zweifisch/zf)\n\na micro php framework for both web and cli\n\n*requires php 5.6*\n\n## a taste of zf\n\n```php\n\u003c?php\n\nrequire 'vendor/autoload.php';\n\n$app = new zf\\App;\n\n/**\n * @param int $times an optional param\n */\n$app-\u003eget('/hello/:name', function($name, $times=1) {\n\treturn ['hello' =\u003e $name, 'times' =\u003e $times];\n});\n\n$app-\u003eget('/', function() {\n\treturn $this-\u003erender('landing-page');\n});\n\n$app-\u003eresource('post', 'user');\n\n$app-\u003erun();\n```\n\n```\n$ php -S localhost:8000/index.php \u0026\u003e /tmp/server.log\n$ curl localhost:8000/hello/foo?times=3\n{\"hello\": \"foo\", \"times': 3}\n```\n\n### cli\n\n```php\n\u003c?php\n\nrequire 'vendor/autoload.php';\n\n$app = new zf\\App;\n\n/**\n * @param string $name your name\n * @param int $times times to repeat\n */\n$app-\u003ecmd('hello \u003cname\u003e', function($name, $times=1) {\n    return str_repeat(\"hello $name\\n\", $times);\n})\n\n/**\n * @param bool $showDate also print date\n */\n$app-\u003ecmd('time', function($showDate=false) {\n\treturn date($showDate ? 'Y-m-d H:i:s' : 'H:i:s');\n});\n\n$app-\u003erun();\n```\n\n```sh\n$ php cli.php\nUsage:\n\n  php cli.php hello \u003cname\u003e\n      name   \tyour name      \n      --times\ttimes to repeat\n\n  php cli.php time\n      --show-date\talso print date\n```\n\n```sh\n$ php cli.php hello --times=2 zf\nhello zf\nhello zf\n```\n\nwork in progress [documentation](http://zweifisch.github.io/zf-doc/getting_started.html)\n\n## tests\n\nto run tests\n\n```sh\ncomposer.phar install --dev\nCONFIG_FILE=test/configs.php vendor/bin/phpunit -c test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzweifisch%2Fzf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzweifisch%2Fzf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzweifisch%2Fzf/lists"}